Plasma Simulations Using Particles
Plasma Simulations Using Particles
Plasma lamp, illustrating some of the more complex phenomena of a plasma, including lamentation. The colors are a result of relaxation of electrons in excited states to lower energy states after they have recombined with ions. These processes emit light in a spectrum characteristic of the gas being excited.
1D Plasma
Particles
x p , up ,
qp = Q, mp = M,
p = 1, . . . , N
d E= dx
dxp = up dt
1 i = H
d2 = 2 dx 0
dup = F (xp ) = QE (xp ) M dt
X
Density of Particles SOLVE for the potential Get the Electric field
Q + 0
i H 2 = 0
particles in cell i
i1 2i + i+1
Ei = i1 i+1 2H
+1 n+1/2 xn = xn t p p + up
Use an extra point for each moment you wish to conserve Use the fact that interpolation points are on a regular grid
moments
Xp X g = h
Xp - Xg
wp wp xp
wp wp xp
w2 =
wp
w1 + w2 = (w1 + w2 ) x1 + w2 h =
wp wp xp
w1 = (1 ) wp
w1 + w2 = w2 =
Friday, April 19, 13
wp wp
xp x1 h
Interpolation Stencils
1 2 3 (1 + ) 2 2
( 1) 2
(2 ) 2
Xp X g = h
Xp - Xg
In higher dimensions
Rd
= d i=1 Wi (xi ) . They are used independently in each dimension and the weights are multiplied:
Particle in Cell
Hybrid particle-grid for eld calculations Project particle strength on grid points Use a Poisson solver on that grid Differentiate on the grid to get grid eld values Interpolate back elds on particles
(x) =
p (x xp )
p (t) ( x xp ) : values are assigned to grid points by interpolation u(x) = Hybrid particle-grid methods E (x) = ui = 1
d p
!
Xp
i (xp )
while t T do mereka about approximation of delta-functions: computation for l = 1 to 3; / of the ODE Solver * stages */ do Interpolate onto the grid ( ijk ); 2 2 y Compute velocity uijk from x 1 ijk ; ( )||dxdy + 2 u1 L = uijk onto 0 Interpolate the particles; 2 a b 153 u0 u + l u0; d 0 d + l d 0 ; /* = (0, 5 9 , 128 ) */ x x + t l u0; + t l d 0 ; m centerend and orientation. end Algorithm 1: A Particle-in-Cell method using Williamsons Runge-Kutta scheme no.7.
(u) Xi + = 0 15 t x into and it ) is memory efcient, ( uu p requiring only one N additional storage per ( u)the ow, + The overall procedure = is illustrated by Algorithm 1. variable. t Set up, initial x x conditions, etc. , t = 0; (E uquantities ) (stored pu) in arrays, (E/ )* Particle + = RN . For the ODE solver we e.g. vorticity: t x x need two temporary variables: u0, and d 0 /
*
of the
Renormalization
Elliptic Equations
Motivation: Problems in Electrostatics, Fluid Mechanics, Elasticity, Electromagnetics Equations: of the type
2 = g
Given a distribution of electric charges in a dielectric medium, a constant electric field is created
Coulombs Law
r e = 3 qe = r
q
e
Derivation
S1 = unit sphere S1 S n
ZZ
S
~ e
e through an The flux of vector arbitrary closed volume with surface S enclosing the charge satisfies the equation:
2 Z Z 0 0
~ e~ n dS =
ZZ
S1
~ r qe ~ n dS = 3 r
~ r q ~ n dS e 1 3 r
2 Z Z 0 0
~ r ~ r qe (r sin d)(rd) = 3 r r
2 Z Z 0 0
qe sin d d = 4 qe
Coulombs Law
In the case of a continuous distribution of charges we refer to a charge density and we may consider as point charge the quantity dV where dV is an infinitesimal volume. From flux conservation we have that:
4 ZZZ
V
dV = }
this replaces qe
{z
ZZ
S
E n dS
this replaces e
(5.1)
= F
q1 q 2 ( r r ) 1 2 |r1 r2 |3
Electrostatics : Derivation
The field of a point charge is expressed as a gradient of a potential, hence the field E , being a superposition of gradient fields, will be also a potential so that :
E =
and for any closed curve:
E dl =
dl = 0
(6.1)
Electrostatics : Derivation
From Eq. (5.1) we have ZZZ ZZ 4 dV =
V S
Gauss-Ostrogradsky
E n dS =
ZZZ
V
div
dV
= div
I E dl =
= 4 E
= const
4 =
2
Stokes
ZZ
E n dS = 0
E =0
velocity of the fluid: u(x, y, z ; t) density of the fluid: (x, y, z ; t) fluid source:
f (x, y, z ; t)
We consider a volume V surrounding the source and the surface S of this volume
Continuity Equation
The mass flow rate of the fluid is denoted by Q and it is computed as
Q=
ZZ
S
~ u~ n dS + Q= t ZZZ
ZZZ
V
f dV =
ZZZ
V
[ (~ u) + f ] dV
With
dV
we obtain
+ ( u) = f t
Friday, April 19, 13
= const + ( u) = f t
=
u =
2
f u=
f = =0
2
Definitions
We consider the Poissons equation in 2D domain
xx + yy = = q (x, y )
(11.1)
(11.1) in
(x, y ) = g (x, y ) on
Dirichlet Problem
(11.1) in
(11.1) in
Friday, April 19, 13
Poissons Equation
Without loss of generality, the problem is discretized in a rectangular domain in (x, y) with a uniformly spaced mesh. Domain Discretization:
j=N . N+1 . points . ( y ) 1 j=0 i=0 1
Poissons Equation
Let
x = y = h
2 2 2 = f = + = f x2 y2
Ax = b
Friday, April 19, 13
1 1
1 4 .. . .. .. .
. 1
The matrix is a block-tridiagonal matrix. The blocks are (M-1)(M-1) and there are N-1 of them on the main diagonal.
Friday, April 19, 13
Discretization with higher order schemes would lead to other block-banded matrices, such as the block-pentadiagonal obtained with the fourth order central differencing scheme.
= g (y ) b.c. at x = 0 is x
We use 2nd order one-sided finite differences to approximate it
Notes
For this discretization in 2D, uniform mesh and rectangular domains, we get a relatively simple system to solve. This block-tridiagonal system can be solved efficiently using direct methods of solution (e.g. Fourier expansions) But this geometric regularity is not always available and the matrix could be too large for direct inversion techniques Alternative is ITERATIVE METHODS
Friday, April 19, 13
Poisson Equation
Poisson Equation:
2 2 + 2 = f (x, y ) 2 x y = 0 on
Domain Discretization:
j=N . N+1 . points . (y = h) 1 j=0 i=0 1
Discretization:
i+1,j 4i,j + i1,j + i,j +1 + i,j 1 = h fi,j i = 1, 2, . . . M 1 and j = 1, 2, . . . N 1
2
0 0 0 . . .
(M 1)(N 1) (M 1)(N 1)
B= 0 0 0 4 1 0 . . . 1 4 1 .. . ... ... ... 0 1 4 .. . 0 ... ... 0 0 1 .. . 1 0 ... 0 0 0 .. . 4 1 0
where
(M 1) (M 1)
0 1 4
Choosing P and Q
(1) P must be easily invertible (2) Iterations must converge:
Error at k th iteration: k = x xk Convergence: lim k = 0 Then, P k+1 k+1
k+1 k
= = =
Q P
( P 1 Q )k o
From before:
D = matrix with the diagonal elemets of A U = matrix with the upper elements of A L = matrix with the lower elements A=DU L
Friday, April 19, 13
Convergence:
k+1
1 4 Qxk
1 4b
M2
N2
+ 1
Gauss-Seidel Method
Method:
Use all information already computed: k+1 k+1 k +1 1 1 k k Now, i,j = 4 i1,j + i+1,j + i,j 1 + i,j +1 4 bi,j No matrix storage is required! Here, P = D L and Q = U
Convergence:
P 1 Q = (D L ) 1 U j 2 1 i i,j = 4 cos M + cos N i = 1, 2, . . . M 1 and j = 1, 2, . . . N 1
Jacobi 2 ) so convergence = ( GS i,j i,j is twice as fast as Jacobi method