GenFoo: a general Fokker-Planck solver with applications in fusion plasma physics
- L. J. Höök and T. Johnson
Fusion plasma physics, EE, KTH, Stockholm, Sweden
June 6, 2012
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 1 / 25
GenFoo: a general Fokker-Planck solver with applications in fusion - - PowerPoint PPT Presentation
GenFoo: a general Fokker-Planck solver with applications in fusion plasma physics L. J. Hk and T. Johnson Fusion plasma physics, EE, KTH, Stockholm, Sweden June 6, 2012 L.J. Hk (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06
Fusion plasma physics, EE, KTH, Stockholm, Sweden
June 6, 2012
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 1 / 25
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 2 / 25
17.59 Mev
200 million degrees (K)
fields
gradients => turbulent plasma
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 3 / 25
"To demonstrate that it is possible to produce commercial energy from fusion."
power 50 MW
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 4 / 25
"The main mission of ITM-TF is to build a validated suite of simulation codes for ITER plasmas and to provide a software infrastructure framework for EU integrated modeling activities." from efda-itm.eu
exploitation.
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 5 / 25
kepler-project.org
7
Linear MHD spectrum READ FROM DATABASE WRITE TO DATABASE
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 6 / 25
range of temporal and spatial scales.
the confinement device 101m.
plasma pulse length 105s.
1Currently the K-computer in Japan (figure), with 10 petaflops per second L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 7 / 25
∂ ∂t fa(r, v, t) + v · ∂fa ∂r + ea ma (E + v × B) · ∂fa ∂v = ∂fa ∂t
∂fa ∂t
=
Cab(fa, fb) Properties:
scale while r.h.s. models coulomb collisions on a microscopic scale.
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 8 / 25
between charged particles:
angle, binary collision in neutral gases.
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 9 / 25
as a 3 + 1 dimensional nonlinear Fokker-Planck equation: ∂ ∂t fa
= −
3
∂ ∂vi Ai(v, fa, fb)fa + 1 2
3
∂ ∂vi Bi,j(v, fa, fb) ∂ ∂vj fa where A = Ca∇φ(v), B = Cs∇∇Ψ(v) and φ(v) = − 1 4π
|v − v′|d 3(v′) Ψ(v) = − 1 8π
are the so called Rosenbluth potentials.
scale.
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 10 / 25
periodic action angle variables (the angles in action-angle system); gyro angles α, bounce angle β and toroidal angle φ. ∂fa ∂t = ∇v · (−A · fa + B · ∇vfa) where X =
1 (2π)3
6D problem to a 3D adiabatic invariant space with complex internal boundaries.
R Z
φ r
θ
Drift A and diffusion B coefficients must be calculated numerically with external codes. They contain line integrals over the particle orbit g = (2π)−1
Left or right?? 3D space plane
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 12 / 25
1D-2D Fokker-Planck models however with singular drift and diffusion coefficients
known.
Maxwellian.
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 13 / 25
C
p u t a t i
a l c
p l e x i t y Physics output
6D, nonlinear 3D, nonlinear 3D, linearized against background distribution 3D, linearized against background Maxwellian 2D, linearized against background Maxwellian
Different Fokker-Planck models
1D, linearized against background Maxwellian 3D, quasi-linear in adiabatic invariants
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 14 / 25
C
p u t a t i
a l c
p l e x i t y Physics output
6D, nonlinear 3D, nonlinear 3D, linearized against background distribution 3D, linearized against background Maxwellian 2D, linearized against background Maxwellian
Different Fokker-Planck models
1D, linearized against background Maxwellian 3D, quasi-linear in adiabatic invariants
GenFoo target models
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 14 / 25
coefficients.
pipeline language, w3.org/TR/xproc.
vis.lbl.gov/Research/H5Part ) format.
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 15 / 25
∂f ∂t (x, t) = −
n
∂ ∂xi Ai(x)f (x, t) + 1 2
n
∂2 ∂xi∂xj Bij(x)f (x, t) + H(x) assuming natural boundary conditions where Ai and Bij are the drift vector and diffusion tensor respectively.
equation (SDE) dXi(t) = Ai(X (t))dt +
q
σij(X (t))dWj(t) where σij is defined by Bij = q
k σikσkjand dW is a q-dimensional
Wiener process with zero mean and dt variance.
solution as obtained by the FPE.
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 16 / 25
GenFoo JIT FEM Monte Carlo Delta-f Monte Carlo Fokker-Planck model Input Output
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 17 / 25
XML to CPP Schema (XSD) XSLT Operator XML Pipe, fork g++ CPP to .so (FEM) factory dynamic loading (dlopen)
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 18 / 25
<?xml version="1.0"?> <Operator> <Dimensions> 2 </Dimensions> <Drift> <component index="0"> <value> (r-d)*x[0] </value> </component> <component index="1"><value>kappa*(theta-x[1])</value></component> </Drift> <Diffusion> <component indexColumn="0" indexRow="0" > <value> sqrt(x[1])*x[0] </value> </component> <component indexColumn="1" indexRow="1"> <value> xi*sqrt(abs(x[1])) </value> </component> </Diffusion> <Source> <value>0.0</value></Source> <InitialCondition><value> ...</value></InitialCondition> </Operator>
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 19 / 25
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 20 / 25
Implement...
grid [Brezzi, 2005], suggestions are welcome!
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 21 / 25
GenFoo target plasma physics models with the properties:
The GenFoo wish list: FEniCS support for ...
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 22 / 25
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 23 / 25
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 24 / 25
Diffusion coefficient vanish √1−ξ
2
Drift coefficient singular
.∝1/v
Large convection Diffusion dominated L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 25 / 25
Cmd: mpirun -np 4 ./GenFoo ../Params/Heston.xml
<library> <filename>../Operators/XML/HestonModel.xml </filename> </library> <factory> <select>FEM</select> <FEM> <gridSize> 100 100</gridSize> <solver> gmres </solver> </FEM> ... </factory> ...
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 26 / 25
<GenFooOutputSpecification ... programmingLanguage="c++"> <integralMeasure name="distributioninEnergyAndMinorRadius" type="contraction"> <geometry> <dimensions> 0 2 </dimensions> <gridSize> 200 55 </gridSize> <minValue> -1 0 </minValue> <maxValue> 1 1 </maxValue> </geometry> <kernelCode>return 1.0; </kernelCode> </integralMeasure> </GenFooOutputSpecification>
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 27 / 25
dV (t) dt = f (V , t) + "random noise".
dV (t) = A(V (t), t)dt + σ(V (t), t)dW (t), t0 ≤ t ≤ T where dW (t) is the Wiener process (Brownian motion).
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 28 / 25
dV (t) dt = f (V , t) + "random noise".
dV (t) = A(V (t), t)dt + σ(V (t), t)dW (t), t0 ≤ t ≤ T where dW (t) is the Wiener process (Brownian motion).
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 28 / 25
with the distribution function P solved by the Fokker-Planck equation: E[V (T )|V (t0) = v] =
L.J. Höök (KTH) GenFoo: a general Fokker-Planck solver 2012-06-06 29 / 25