#!/usr/bin/env python # coding: utf-8 # # Introduction # **Plasma physics: multidisciplinary science at the frontier of knowledge** # # The physics of plasma is rich area of physical science. The simplest models combine fluid dynamics, electromagnetism and statistical mechanics. However, the wealths of plasma resides in the interaction of complex systems, strongly coupled and responding quite rapidly to changes and instabilities. The physics of plasma goes beyond the simple science of electrons and ions interacting via Coulomb collisions. It also grapples with nuclear synthesis and quantum mechanics. # # ## What are plasmas? # # All we see in the sky, from stars to galaxies, is plasma. Yet plasmas are *poorly understood*. Further, we are now facing a new era of plasma physics where the physics of highly dense material is driven by quantum mechanical affects. This new science offers new directions to study in *high energy density plasmas*. # The physics of plasma is a difficult topic because **it couples different areas of physics, across many different geometrical and temporal scales.** At the largest scale, It combines fluid mechanics electromagnetism and radiation. As scales become smaller, temporal behaviors are also compressed. At this level, **kinetic effects** become important and anisotropic. When this happens, the fluid approximation breaks down and kinetic theory has to be used. # ## The spirit of the class # **Developing an intuition in plasma physics.** # # We will use python to test different models describing the physics of plasma in many different regimes. To make most of the this you need to follow the guidelines listed below: # 1. Bring your laptop with you to every lectures, fully loaded with [Anaconda](https://www.anaconda.com/download/) # 2. See each lecture as a workshop. And yes, "workshop" contains the word **work**. So work together. Solve problems. Have fun! # 3. Make sure you spend time practicing our work environment (e.g. python) outside the classroom. # Besides plasma physics, you will learn how to use one of the most exciting, simple and efficient tools used by scientists and engineers today: namely *python*. This is a very high level language (i.e. more **bang** for your code) that has an immense user-based community. The reason almost everything you think about coding as already been coded and is available in python. It does not mean that this class has its entire set of problems on the Internet. Unfortunately, NO!. But most of the basic tools you will need to succeed this class is pretty out there already. # **Learning Python** # # Python is really the remedy against reinventing the wheel. Yet, it does not mean that you should ignore how the wheel work. In fact, reinventing the wheel is a good exercise to develop your own skills, *by learning to do simple things first!* # Python is a scripting language that can be used very effectively to analyze data, and possibly to solve problems. However, python is very slow because it is a high level language, that is far removed from what a computer can use to do fast, efficient computations. # Unlike Fortran or C++, python makes a lot of assumptions about the coder, *you*, did not write. It is short for you to write and python does the **big** job of turning your "prose" into a code that the computer can understand. Well that comes at a cost: speed! Python can be turned into efficient code one way or another. But, ultimately, this is a cumbersome process for Python. But it's great for you! # So, see Python as an entry point to the world of computing, a free alternative to MATLAB or Mathematica. # ## Outline of the class # ### The physics of plasmas # # 1. Introduction # 1. Single particle motion # 1. Collisions in plasma # 1. Plasma as a fluid # 1. Conservation laws # 1. Magnetohydrodynamics # 1. Waves in plasmas # 1. Magnetohydrodynamics instabilities # 1. Shock in plasmas # # ### Plasmas in astrophysics # # # 1. Equilibrium of self-graviting spherical masses # 1. Warm dense matter and planetary cores # 1. The solar wind # 1. Nuclear synthesis # 1. Accretion disks and spiral density waves # 1. Gravitational collapse and star formation # 1. Active galactic nuclei and black holes # 1. Plasma jets # # ### Plasmas for fusion energy # # # 1. Fusion energy # 1. Fusion reactors and the Lawson criterion # 1. Linear confinement and mirror machines # 1. Axisymmetric toroidal Confinement and tokamaks # 1. Non-axisymmetric toroidal confinement and stellerators # 1. Inertial confinement fusion and lasers # 1. Z-pinches and pulsed-power generators # # ### Practical plasma applications I # #### Plasmas for propulsion # # # 1. Gas dynamics # 1. Nozzles # 1. Hall thrusters # 1. Electrodeless thrusters # #### Plasma for life sciences # # # 1. Plasma skin healing # 1. Plasma cancer treatment # 1. Plasma disinfection # # ### Practical plasma applications II # #### Plasmas for manufacturing # # # 1. Welding # 1. Cutting # 1. Printing # # # ## Class Organization # ### Lectures # The lectures will use notebooks to present and discuss different aspects of plasma physics. To fully benefit from the course, students should consider each lecture as a workshop. Bring your laptops in the lectures and let's code plasma physics together. # ### Homeworks # Homeworks are given on Wednesdays and are due the following **Wednesday**. You can send me your notebook or upload it on [kyso](https://kyso.io/), and send me the link so I can grade it. # ### Preliminary exam # The exam will take place on Nov. 8th in class. # ### Project # Towards the end of the semester, you will have to pick a project and present it to the whole class during the last two lectures, at the end of the semester. # ### Office hours # 456 Bausch and Lomb Hall # # Phone: (585) 275-3089 # # E-mail: gourdain@pas.rochester.edu # # **T 3-4pm R 2-3pm** # ### Grade # | Type | Grade percentage | # | --- | --- | # | Class participation | 20% | # | Homeworks | 10% | # | Preliminary Exam | 30% | # | Final Project | 40% | # ## Toolkit # We to install several tools for this class. # 1. The main one is [Anaconda](https://www.anaconda.com/download/). It contains the environment that we will use throughout the semester to study plasmas. # 2. Some python code will require a [c++ compiler](https://visualstudio.microsoft.com/downloads/) # # ### Let's prepare our python environment using Anaconda # ![Capture.PNG](attachment:Capture.PNG) # We need to update our environment first. Update Anaconda from root prompt. In the Anaconda Navigator, click on Environments, choose root, then Open terminal from the drop down menu. Then type `conda update -n root conda`. After, do a full update using `conda update --all`. Make sure you have updated the notebook `conda install -c anaconda notebook`. # # As Anaconda, Python has its own updater, *pip*. You can use it to install (much faster) several important packages.For instance, you can install a spellchecker and line numbering tool with # # `pip install jupyter_nbextensions_configurator` # # `jupyter nbextensions_configurator enable` # # `pip install jupyter_contrib_nbextensions` # # `jupyter contrib nbextension install --user` # # And let's add a slide capability for your final project! `pip install RISE` and then `jupyter-nbextension install rise --py --sys-prefix`. If you have a version of Jupyter older than 5.3.0 (please don't) then add `jupyter-nbextension enable rise --py --sys-prefix`. RISE's documentation can be found [here](https://rise.readthedocs.io/en/docs_hot_fixes/index.html) # ### Let's add our C++ compiler # In the Anaconda Nagivator, go to Environments, and search for the package Mingw in the top menu. Choose _not installed_. Mingw should appear on the screen. Add it to the list and click Apply # ![Capture1.PNG](attachment:Capture1.PNG) # ### What about Python? # "Python is an interpreted high-level programming language for general-purpose programming. Python has a design philosophy that emphasizes code readability, notably using significant whitespace. It provides constructs that enable clear programming on both small and large scales." from Ref. [1](https://en.wikipedia.org/wiki/Python_(programming_language)). In other word, use python when you want to be readable and don't mind some inefficiencies associated with improved readability. # # We use python in class because readable code is good when you are learning. And it is pretty quick to learn Python! It has a huge amount of libraries. it's a gift because almost anything you can think of has been done in Python. But it is also a curse because it steepens the learning curve. # # We will learn Python as we go. I estimate that you will be Python enthusiast by lecture 5. In the mean time search for cheat sheets. Here is a set of good [ones](https://ehmatthes.github.io/pcc/cheatsheets/README.html). # # ### And let's not forget about NumPy # "NumPy is the fundamental package for scientific computing with Python. It contains among other things: # 1. a powerful N-dimensional array object # 2. sophisticated (broadcasting) functions # 3. tools for integrating C/C++ and Fortran code # 4. useful linear algebra, Fourier transform, and random number capabilities # # Besides its obvious scientific uses, NumPy can also be used as an efficient multi-dimensional container of generic data. Arbitrary data-types can be defined. This allows NumPy to seamlessly and speedily integrate with a wide variety of databases." from Ref. [2](http://www.numpy.org/) And there is also [a good cheat sheet](https://s3.amazonaws.com/assets.datacamp.com/blog_assets/Numpy_Python_Cheat_Sheet.pdf) for NumPy. # # © Pierre Gourdain, The University of Rochester, 2020 # In[ ]: