Download - Introduction to computational plasma physics
![Page 2: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/2.jpg)
课程概况• http://www.phy.pku.edu.cn/~fusion/forum/
viewtopic.php?t=77
• 上机• 成绩评定为期末大作业
![Page 3: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/3.jpg)
Related disciplines
• Computation fluid dynamics (CFD)
• Applied mathematics, PDE, ODE
• Computational algorithms
• Programming language, C, Fortran
• Parallel programming, OpenMP, MPI
• Plasma physics, space, fusion, …
• Unix, Linux, …
![Page 4: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/4.jpg)
![Page 5: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/5.jpg)
大规模数值模拟的特殊性
![Page 6: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/6.jpg)
Contents
• What is plasma
• Basic properties of plasma
• Plasma simulation challenges
• Simulation principles
![Page 7: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/7.jpg)
What is plasma
• Partially ionized gas, quasi-neutral• Widely existed
– Fire, lightning, ionosphere, polar aurora– Stars, solar wind, interplanetary (stellar, galactic)
medium, accretion disc, nebula– Lamps, neon signs, ozone generator, fusion energy,
electric arc, laser-material interaction
• Basic properties– Density, degree of ionization, temperature, conductivity,
quasi-neutrality– magnetization
![Page 8: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/8.jpg)
Plasma vs gas
Property Gas Plasma
Conductivity Very low, insulator Very high, conductor
Species Usually one At least two, ion, electron
Distribution Usually Maxwellian Usually non-Maxwellian
Interaction Binary, short range Collective, long range
![Page 9: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/9.jpg)
![Page 10: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/10.jpg)
Basic properties
• Temperature
• Quasi-neutrality
• Thermal speed
• Plasma frequency
• Plasma period
![Page 11: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/11.jpg)
Debye length
• System size and time
• Debye shielding
λD
U→0
![Page 12: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/12.jpg)
Debye lengths
![Page 13: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/13.jpg)
Plasma parameter
• Strong coupling
• Weak coupling
![Page 14: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/14.jpg)
Weakly coupled plasmas
![Page 15: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/15.jpg)
Collision frequency
• Mean-free-path
• Collisional plasma
• (Collisionless)
• Collisioning frequency
![Page 16: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/16.jpg)
Magnetized plasma
• Anisotropic
• Gyroradius
• Gyrofrequency
• Magnetization parameter
• Plasma beta
![Page 17: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/17.jpg)
Simulation challenges
• Problem size: 1014 ~ 1024 particles
• Debye sphere size: 102 ~ 106 particles
• Time steps: 104 ~ 106
• Point particle, computational unstable, sigularities
![Page 18: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/18.jpg)
Solution
• No details, essence of the plasma
• One or two dimension to reduce the size
• No high frequency phenomenon, increase time step length
• Reduce ND, mi / me
• Smoothing particle charge, clouds
• Fluidal approaches, single or double
• Kinetic approaches, f/f
![Page 19: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/19.jpg)
Simple Simulation
• Electrostatic 1 dimensional simulation, ES1
• Self and applied electrostatic field
• Applied magnetic field
• Couple with both theory and experiment, and complementing them
![Page 20: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/20.jpg)
Basic model
![Page 21: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/21.jpg)
Basic model
![Page 22: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/22.jpg)
Basic model
• Field -> force -> motion -> field -> …
• Field: Maxwell's equations
• Force: Newton-Lorentz equations
• Discretized time and space
• Finite size particle
• Beware of nonphysical effects
![Page 23: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/23.jpg)
Computational cycle
![Page 24: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/24.jpg)
Equation of motion
• vi, pi, trajectory
• Integration method, fastest and least storage• Runge-Kutta• Leap-frog
![Page 25: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/25.jpg)
Planet Problem
tdt
d ii
1
x0 = 1; vx0 = 0; y0 = 0; vy0 = 1read (*,*) dtN = 30/dt
do i = 0, N+3 x1 = x0 + vx0*dt y1 = y0 + vy0*dt r = sqrt(x0*x0 + y0*y0) fx = -x0/r**3 fy = -y0/r**3 vx1 = vx0 + fx*dt vy1 = vy0 + fy*dt ! if(mod(i,N/10).eq.2) write(*,*) x0, y0, -1/r+(vx0*vx0+vy0*vy0)/2 x0 = x1; y0 = y1; vx0 = vx1; vy0 = vy1enddoend
Forward differencing
t
xx
dt
dx ii
1
![Page 26: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/26.jpg)
Planet Problem
./a.out > data
0.1
$ gnuplot
Gnuplot> plot “data” u 1:2
![Page 27: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/27.jpg)
Planet Problem
./a.out > data
0.01
$ gnuplot
Gnuplot> plot “data” u 1:2
![Page 28: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/28.jpg)
Planet Problemx0 = 1; vx0 = 0; y0 = 0; vy0 = 1read (*,*) dtN = 30/dt
x1 = x0 + vx0*dty1 = y0 + vy0*dtxh0 = (x0+x1)/2; yh0 = (y0+y1)/2do i = 0, N xh1 = xh0+vx0*dt; yh1 = yh0 + vy0*dt; r = sqrt(xh0*xh0 + yh0 *yh0 ) fx = -xh1/r**3 fy = -yh1/r**3 vx1 = vx0 + fx*dt vy1 = vy0 + fy*dt! if(mod(i,N/100).eq.0) write(*,*) xh0, yh0, -1/r+(vx0*vx0+vy0*vy0)/2 xh0 = xh1; yh0 = yh1; vx0 = vx1; vy0 = vy1enddoend
Leap Frog
tdt
d ii
1
t
xx
dt
dx ii
2123
![Page 29: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/29.jpg)
Planet Problem
./a.out > data
0.1
$ gnuplot
Gnuplot> plot “data” u 1:2
![Page 30: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/30.jpg)
Planet Problem
./a.out > data
0.01
$ gnuplot
Gnuplot> plot “data” u 1:2
![Page 31: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/31.jpg)
Field equations
• Poisson’s equation
![Page 32: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/32.jpg)
Field equations
• Poisson’s equation is solvable• In periodic boundary conditions, fast Fourier
transform (FFT) is used, filtering the high frequency part (smoothing), is easy to calculate
![Page 33: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/33.jpg)
Particle and force weighting
• Particle positions are continuous, but fields and charge density are not, interpolating
• Zero-order weighting
• First-order weighting, cloud-in-cell
![Page 34: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/34.jpg)
![Page 35: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/35.jpg)
![Page 36: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/36.jpg)
Higher order weighting
• Quadratic or cubic splines, rounds of roughness, reduces noise, more computation
![Page 37: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/37.jpg)
Initial values
• Number of particles and cells
• Weighting method
• Initial distribution and perturbation
• The simplest case: perturbed cold plasma, with fixed ions.
• Warm plasma, set velocities
![Page 38: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/38.jpg)
![Page 39: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/39.jpg)
![Page 40: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/40.jpg)
Initial values
![Page 41: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/41.jpg)
Diagnostics
• Graphical snapshots of the history
• x, v, , , E, etc.
• Not all ti
• For particle quantities, phase space, velocity space, density in velocity
• For grid quantities, charge density, potential, electrical field, electrostatic energy distribution in k space
![Page 42: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/42.jpg)
Tests
• Compare with theory and experiment, with answer known
• Change nonphysical initial values (NP, NG, t, x, …)• Simple test problems
![Page 43: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/43.jpg)
Server connection
• SshHost: 162.105.23.110, protocol: ssh2
• Your username & password• Vnc connection
In ssh shell: “vncserver”, input vnc passwd, remember xwindow number
• Tightvnc: 162.105.23.110:xx (the xwindow number)
• Kill vncserver: “vncserver –kill :xx” (x-win no.)
![Page 44: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/44.jpg)
Xes1
• Xes1 document
• Xgrafix already compiled in /usr/local
• Xes1 makefile
• make
• ./xes1 -i inp/ee.inp
LIBDIRS = -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib64
![Page 45: Introduction to computational plasma physics](https://reader035.vdocuments.pub/reader035/viewer/2022062221/56813654550346895d9ddafe/html5/thumbnails/45.jpg)
Clients
• Sshputty.exe
• Vncviewerhttp://www.phy.pku.edu.cn/~lei/vncviewer.exe
• Pscp:
• http://www.phy.pku.edu.cn/~lei/pscp.exe