1 xiaotao xiao 1,2, xueqiao xu 2 1 institute of plasma physics, chinese academy of sciences, hefei,...
TRANSCRIPT
1
Xiaotao Xiao1,2, Xueqiao Xu2
1Institute of Plasma Physics, Chinese Academy of Sciences, Hefei, China. 2Lawrence Livermore National Laboratory, Livermore, CA 94550, USA
2015.10.09
Summary of developing PIC module in divertor geometry under BOUT++
2
In circular geometry, both field aligned coordinate and cylinder one can be used to advance orbit.
In divertor geometry, cylinder coordinate have to be used. Mapping between two meshes is done Impurity density evolution under random walk is calculated.
Outline
3
Particle push using field aligned coordinate works well in circular geometry
The equations are same as XGC
Field aligned coordinate in BOUT++ and cylindrical coordinate in XGC
4th order Runge-Kutta algorithm are used to advance the GC equations
Dynamical invariants are conserved very well in circular geometry
4
results of xyz and RZ are consistent in circular geometry (1)trapped particle
field aligned coordinate is better than cylinder one, since particle mainly move along field line and drift is small.(blue line: RZ; green line: xyz)
5
results of xyz and RZ are consistent in circular geometry (2)passing particle
(blue line: RZ; green line: xyz)In xyz, the error of energy has a jump when particle approach , since not-a-knot boundary condition is used in 2D B-spline interpolation. Periodic boundarycondition should improve the result.
6
try to calculate orbit in divertor geometry using flux coordinate
The coupling between MHD and PIC part will be easy, if they use same coordinate and mesh.
X-point is singularity in flux coordinate, but X-point isn't contained in BOUT++ computation domain.
Some variable are abnormally big near cut line, since is much smaller near cut line.After some modification of these abnormal variables, the orbits are smooth and conservation seems not bad.
7
orbits by xyz and RZ have big difference
orbit are also calculated in cylinder coordinate Results using xyz and RZ coordinates are consistent when particle is far
away from X-point. They may have big difference when approaching X-point
8
An issue about calculating Bt is fixed, Fortran and C++ code give the same results.
,
is the poloidal current function. is the poloidal flux at plasma boundary, i.e. at separatrix.
What should be, if ?• In Fortran code, polynomial spline is
used. will be extrapolated.
• In C++ code, B-spline is used. will be zero.Outside LCFS, is always zero!
Now it is set = , .These two code give the same results.
9
Particle more like to collide on outside divertor plate
(R,Z)=(2.26,0.0);v_para=(-0.98:0.98:0.02)
(R,Z)=(2.27,0.0);v_para=(-0.98:0.98:0.02)
(R,Z)=(2.29,0.0);v_para=(-0.98:0.98:0.02)
Ti=1Kev
10
Get a reasonable lose cone
Limiter is located at R>2.71, Z=0.0Particle launch at R=2.70, Z=0.0
Collide with limiter• R(i)>2.71 .or. R(i-1)>2.71• Z(i)<0.0 .and. Z(i-1)>0.0 OR
Z(i)>0.0 .and. Z(i-1)<0.0Lose from divertor• Z(i) < Z_min OR
Z(i) > Z_max
Dt=0.05, decreased from 0.5
11
How to map these 2 sets of coordinates
RZ mesh is used in PIC module, and xyz mesh is used in MHD part.1. is known, how to get
a) point mapping b) 2D B-spline to get
2. is known, how to get a) point mapping b) 2D B-spline to getc) blank region containing x-point still exist
12
Mapping of 2 meshes
For each mesh nodes , the is already given in nc file.How to map from to ?
Newton-Raphson method is used• Circular case is easy• It need to determine which region the
particle falls in for X-point case
13
Mapping in whole mesh
• Outside domain, particle loss. No longer advance or mapping.• Advance particle, and map to (psi,theta)
• left leg region, psixy(0:nx-1,0:3)• core+sol region, psixy(0:nx-1,4:59)• right leg region, psixy(0:nx-1,60:63)
• Advance particle, without mapping• Inside core region, psixy(0,0:63)• Inside blank region
14
How to find a point lies within a polygon?
http://www.ecse.rpi.edu/~wrf/Research/Short_Notes/pnpoly.html
int pnpoly(int nvert, float *vertx, float *verty, float testx, float testy){ int i, j, c = 0; for (i = 0, j = nvert-1; i < nvert; j = i++) { if ( ((verty[i]>testy) != (verty[j]>testy)) &&
(testx < (vertx[j]-vertx[i]) * (testy-verty[i]) / (verty[j]-verty[i]) + vertx[i]) ) c = !c; } return c;}
Draw a ray from the point. It has even intersections with sides, if it outside the polygon. Such as rays 0,2,4It has odd intersections with sides, if it inside the polygon. Such as rays 1,3
15
Mapping of mesh and
{ 𝑥=𝜓−𝜓 0
𝑦=𝜃
𝑧=𝜁 −∫𝜃0
𝜃
𝜈 (𝜓 , 𝜃 )𝑑𝜃
• 2D mappingGiven , mapping from to is done by Newton-Raphson method
1. Mapping between to is same as before.2. Additional mapping between
• 3D mapping
16
Random walk model for turbulence transport
𝐷𝑇𝐵=1𝑚2/𝑠
shuffle the radial location of each particle at every 250 kHz using a Gaussian random distribution for the radial shuffle distance, with the mean value at
toroidal transit time
• Radial displacement in RZ coordinates. is almost in parallel direction, or would be in radial direction.
POP, 11(2004), p2649
17
Generate Gaussian distribution by transform method
by coding by matlab
50 000 points,
18
Orbits with random walk
characteristic time and length of turbulence transport is: , in Gaussian distribution function
, ,
19
A demonstration of pnpoly function and particle’s turbulence transport
• pnpoly function works well! 1. Guding-center motion + random walk2. All initial statue is fixed except vpara 3. (r,z) is recorded after 2000 time steps4. Determine (r,z) falls inside separatrix or not5. Repeat steps 2,3,4. 99 different vpara is used
20
Monte-Carlo simulation: calculate impurity density evolution
• bout_initial• nc file and g-file are read in. Two meshes are initialized.• Maxwell distributed particles are generated.
Fixed launch position, Gaussian velocity, uniform pitch angle.• bout_run
• Particles are advanced each time step. (Equilibrium, random walk, perturbed ) • After certain time interval, and may be calculated.
Determine which region(core, sol, pf) it falls in, then do mapping.• Field2D is output, and analyzed later in IDL.
• For simplicity, the particle are loaded and advanced at root core now.
21
impurity density relaxation
• particles, launched at (R=2.28,Z=0.0), • no random walk, in equilibrium magnetic field.• Inner core boundary, particle advanced still, without mapping to xyz
out boundary, particle is lost when it cross the out boundary. No new one is added.dt=0.05, nstep=1000
• The particles relax to a steady state in the equilibrium field. solid line: confined particles; dashed line, lost ones.
22
Density distribution at different time step
T=30 steps T=100 steps
T=500 steps T=1000 steps
Transport coefficient D = 0, 7561/10000 lost
23
Density distribution at different time step
T=30 steps T=100 steps
T=500 steps T=1000 steps
Transport coefficient D = 1 , 7532/10000 lost
24
Remained issues and possible results
• Restart capability, paralyze.• Adding electrical field from MHD part to PIC part• Boundary condition, particle lose and ejection.
• Where is impurity more like to lose;What is the steady state of impurity density looks like under turbulence transport.