0% found this document useful (0 votes)
36 views

Plasma Simulations Using Particles

The document discusses plasma simulations using particle methods. It begins by defining plasma and its properties. It then describes using particles to represent plasma, with each particle having properties like position, velocity and charge. An electric field is calculated on a grid from the particle properties. The particle properties are then updated based on the electric field. Higher order methods are discussed for interpolating between particle properties and the grid to improve accuracy while conserving physical quantities like momentum. Poisson's equation is also discussed for calculating electric potential and field from the charge distribution on the grid.

Uploaded by

Sadiq Sarfaraz
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Plasma Simulations Using Particles

The document discusses plasma simulations using particle methods. It begins by defining plasma and its properties. It then describes using particles to represent plasma, with each particle having properties like position, velocity and charge. An electric field is calculated on a grid from the particle properties. The particle properties are then updated based on the electric field. Higher order methods are discussed for interpolating between particle properties and the grid to improve accuracy while conserving physical quantities like momentum. Poisson's equation is also discussed for calculating electric potential and field from the charge distribution on the grid.

Uploaded by

Sadiq Sarfaraz
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

Plasma Simulations using Particles

Plasma (from Wikipedia)


In physics and chemistry, plasma is a state of matter similar to gas in which a certain portion of the particles are ionized. Heating a gas may ionize its molecules or atoms (reduce or increase the number of electrons in them), thus turning it into a plasma, which contains charged particles: positive ions and negative electrons or ions.[1] Ionization can be induced by other means, such as strong electromagnetic eld applied with a laser or microwave generator, and is accompanied by the dissociation of molecular bonds, if present.[2] The presence of a non-negligible number of charge carriers makes the plasma electrically conductive so that it responds strongly to electromagnetic elds. Plasma, therefore, has properties quite unlike those of solids, liquids, or gases and is considered a distinct state of matter. Like gas, plasma does not have a denite shape or a denite volume unless enclosed in a container; unlike gas, under the inuence of a magnetic eld, it may form structures such as laments, beams and double layer. Some common plasmas are found in stars and neon signs. In the universe, plasma is the most common state of matter for ordinary matter, most of which is in the rareed intergalactic plasma (particularly intracluster medium) and in stars.

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.

Friday, April 19, 13

1D Plasma
Particles

x p , up ,

qp = Q, mp = M,

p = 1, . . . , N

Electric field E Particles Move :

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

Transfer Field to Particles Ep = M(Ei ) Particle Motion


Friday, April 19, 13

+1/2 1/2 un un = QEp t/M p p

+1 n+1/2 xn = xn t p p + up

Particles and meshes


What if the velocity eld is given at off-particle locations ? Moment conserving : Interpolations Time Integrators

Friday, April 19, 13

Moment Conserving Interpolation

To find the Interpolation weights solve a system of equations :

Use an extra point for each moment you wish to conserve Use the fact that interpolation points are on a regular grid
moments

In deriving higher order moments use the lower order

Friday, April 19, 13

Xp X g = h

Xp - Xg

To find the Interpolation weights solve a system of equations


w1 + w2 = w1 x1 + w2 x2 =
w1 + w2 = w1 x1 + w2 (x1 + h) =

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

Friday, April 19, 13

In higher dimensions
Rd

Interpolation kernels are tensor products of 1D kernels

We only implement 1D kernels = (x) W1 (x1 )need W2 (to x2 ) . . . Wd (xthe d)

= d i=1 Wi (xi ) . They are used independently in each dimension and the weights are multiplied:

W (x) = W1 (x1 ) W2 (x2 ) . . . Wd (xd ) =


d i=1 Wi (xi ) .
xp

Friday, April 19, 13

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

Friday, April 19, 13

(x) =

HYBRID Particle-Grid Methods


p p

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 )

mereka Friday, April 19, 13

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

Field Equations for Particles Elliptic Equations Iterative Solvers

Friday, April 19, 13

Elliptic Equations
Motivation: Problems in Electrostatics, Fluid Mechanics, Elasticity, Electromagnetics Equations: of the type

2 = g

The solution depends on/couples all points in the computational domain

Friday, April 19, 13

Example I: Equations of electrostatics of a constant current

Given a distribution of electric charges in a dielectric medium, a constant electric field is created

Charge density Electric field intensity E Dielectric constant


3

Coulombs Law

r e = 3 qe = r

q
e

Note: in vacuum, = 1 , the dimensions of an electric


/2 1 , Hence E is the force charge is: L M T acting on a unit positive charge of electricity /2
1

Friday, April 19, 13

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

Friday, April 19, 13

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

Note: usual form of Coulombs law is

{z

ZZ
S

E n dS
this replaces e

(5.1)

= F

so the electrostatic field must be understood as a force per unit charge


Friday, April 19, 13

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)

Friday, April 19, 13

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

While from Eq. (6.1) we have

Stokes

ZZ

E n dS = 0

E =0

Friday, April 19, 13

Example II : Incompressible, inviscid Fluid flow

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

Friday, April 19, 13

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

From mass conservation to Poisson and Laplace Eqs.


If

= const + ( u) = f t

=
u =
2

f u=

For potential fluid flows and as a result or for f = 0


Friday, April 19, 13

f = =0
2

Poissons equation Laplaces equation

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

(x, y ) n = g (x, y ) on Neumann Problem = g (x, y ) on Robin Problem (x, y ) + n

(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

. . . i=M M+1 points (x)

Use central differences to approximate the derivatives

Friday, April 19, 13

Poissons Equation
Let

x = y = h
2 2 2 = f = + = f x2 y2

The equation becomes

i+1,j 4i,j + i1,j + i,j +1 + i,j 1 = h2 fi,j for i = 1, 2, . . . , M 1 and j = 1, 2, . . . , N 1

Friday, April 19, 13

The Poissons Equation


Special care is needed at the boundaries

E.g., for i = 1 and j = 1, 2, . . . , N 1 2,j 41,j + 1,j +1 + 1,j 1 = h f1,j 0,j


and 0,j is known by a Dirichlet boundary condition. If the unknowns are ordered with first increasing i we get:
2

x = [1,1 , 2,1 , . . . , M 1,1 , 1,2 , 2,2 , . . . ]


and the system of equations to solve is

Ax = b
Friday, April 19, 13

The Poissons Equation


For the special case M = 6, N = 4 and Dirichlet B.C.
4 1 1 1 4 1 1 1 4 1 1 1 4 1 1 4 1 .. 4 1 1 4 1 .. . 1 . f 1,1 1,1 0,1 1,0 2,1 f2,1 2,0 3,1 f3,1 3,0 . 4,1 . . 5,1 . 1 . . 1,2 = h2 . . . . . . . . . . . . . . . . 1 . . 4 5,3 f5,3 6,3 5,4

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

The Poissons Equation

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.

Friday, April 19, 13

The Poissons Equation


If Neumann conditions were used then some of the matrixs elements (in addition to the rhs vector) would have to be modified. Example:

= g (y ) b.c. at x = 0 is x
We use 2nd order one-sided finite differences to approximate it

30,j + 41,j 2,j = gj 2h


Friday, April 19, 13

The Poissons Equation


By solving for 0,j using this expression, substituting in

2,j 41,j + 1,j +1 + 1,j 1 = h f1,j 0,j


and rearranging, we obtain

8 2 2 2 2,j 1,j + 1,j +1 + 1,j 1 = h f1,j hgj 3 3 3


So the coefficients of 2,j and 1,j (j ) have been changed in addition to the rhs
Friday, April 19, 13

The Poissons Equation

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

Elliptic Problems and 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

. . . i=M M+1 points (x = h)

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

Friday, April 19, 13

System of Equations to be solved


The discretization leads to a system of equations: Ax = b
A= B I 0 . . . 0 0 0 I B I .. . ... ... ... 0 I B .. . 0 ... ... 0 0 I .. . I 0 ... 0 0 0 .. . B I 0 ... ... ... .. . I B I 0 I B
0 0 0 . . .

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

x= M 1,1 1,2 2,2 3,2 . . .

1,1 2,1 3,1 . . .

2 b= M 1,1 h f h2 f1,2 h2 f2,2 h2 f3,2 . . .

h f1,1 h2 f2,1 h2 f3,1 . . .

where

... ... ... .. . 1 4 1

(M 1) (M 1)

0 1 4

and I is a (M 1) (M 1) identity matrix

Friday, April 19, 13

Iterative methods to solve Ax = b:


KEY IDEA: Matrices arising from PDE discretizations are results of approximations -solving the system exactly (i.e. Gaussian elimination will still involve an error.

Idea behind iterative methods:


Let A = P Q then (P Q)x = b P x = Qx + b Iterative Method: P xk+1 = Qxk + b k+1 1 k 1 x = P Qx + P b k is the iteration index
Friday, April 19, 13

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

Let i be the eigenvalues of P 1 Q If = maxi |i | 1 then convergence


Friday, April 19, 13

Notation for the following methods


A= B I 0 . . . 0 0 0 I B I .. . ... ... ... 0 I B .. . 0 ... ... 0 0 I .. . I 0 ... 0 0 0 .. . B I 0 ... ... ... .. . I B I 0 I B 0 0 0 . . .

From before:

(B and I are dened above)

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

Point Jacobi Method


Method:
Here, P = D and Q = L + U Plugging in for D: x Equivalently:
k+1 i,j

Convergence:

= k 1 1 k k k = 4 i1,j + i+1,j + i,j 1 + i,j +1 4 bi,j

k+1

1 4 Qxk

1 4b

|i,j | 1 for all i, j so converges

P 1 Q = 1 4Q j 1 i i,j = 2 cos M + cos N i = 1, 2, . . . M 1 and j = 1, 2, . . . N 1 But as M, N , ||max = 1


1 4

Slow convergence for large M and N


Friday, April 19, 13

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

Friday, April 19, 13

You might also like