Numerical methods for reduced Vlasov equation
Transcript of Numerical methods for reduced Vlasov equation
Model reduction Numerical methods and objectives Numerical results Perspectives
Numerical methods for reduced Vlasov equation
P. Helluy, L. Navoret, N. Pham
Inria Tonus & IRMA University of Strasbourg
NUMKIN 2016, IRMA, Octobre 20th 2016
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 1 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Plan
1 Model reduction
2 Numerical methods and objectives
3 Numerical results
4 Perspectives
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 2 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Model reduction of the Vlasov-Poisson equation
Vlasov equation :
∂f
∂t(x,v, t) + v · ∇xf(x,v, t) + E · ∇vf(x,v, t) = 0. (1)
f(x,v, t) : distribution function at time t ≥ 0, with positionx = (x1, x2, x3) ∈ Ωx ⊂ R3 and velocity v ∈ Ωv ⊂ R3
E(x, t) : electric field which satisfies the Poisson equation
E = −∇xΦ, with −4xΦ = ρ− 1. (2)
the charge density
ρ(x, t) =
ˆΩv
f(x,v, t) dv, (3)
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 3 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Boundary condition
In practice Ωx =]0, L[3, with L > 0 and Ωv =]− Vmax, Vmax[3, whereVmax > 0 is the maximal velocity
Boundary condition
Periodical boundary condition in space :
Outflow boundary condition in velocity :
(E(x, t) · nv)− f(x,v, t) = 0
where nv be the outward normal unit vector on ∂Ωv
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 4 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Reduced Vlasov equation
Weak formulation : Find f ∈ V =f ∈ L2(Ωv),E · ∇vf ∈ L2(Ωv)
∂t
ˆΩv
fϕ+∇x ·ˆ
Ωv
vfϕ+E ·ˆ
Ωv
∇vfϕ−βˆ∂Ωv
(E ·nv)−fϕ = 0, (4)
with any test function ϕ ∈ V and where β is a positive constant.The distribution function is approximated by
f(x,v, t) ≈Nv∑j=1
wj(x, t)ϕj(v). (5)
We obtain the reduced Vlasov equation
M∂tw +Ak∂xkw +B(E)w = 0, k = 1 . . . 3. (6)
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 5 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Reduced Vlasov equation
Reduced Vlasov equation
M∂tw +Ak∂xkw +B(E)w = 0, k = 1 . . . 3.
In which w = (w1, w2, ..., wNv)T . The mass matrix M, Ak, k = 1 . . . 3 andB(E) are matrices of dimension Nv ×Nv, whose elements are given by
Mij =
ˆΩv
ϕiϕj , Akij =
ˆΩv
vk ϕiϕj , k = 1 . . . 3, (7)
B(E)ij =
ˆΩv
ϕi(E · ∇v)ϕj − βˆ∂Ωv
(E · nv)−ϕjϕi. (8)
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 6 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Reduced Vlasov equation
Properties
The system depends only on x variable and not on the (x,v) variables
M is symmetric positive-definite, Ak is symmetric, k = 1, 2, 3, B(E)is “almost” skew-symmetric (except on boundaries)
Hyperbolic system
For 1/2 6 β 6 1 , the reduced Vlasov equation is L2 stable
1
2
d
dt
(ˆΩx×Ωv
f2
)6 −1
2
ˆΩx×∂Ωv
(E · nv)+ f2, (9)
Loss of total charge
d
dtρtot = −
ˆΩx×∂Ωv
(E · nv)+f, (10)
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 7 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Plan
1 Model reduction
2 Numerical methods and objectives
3 Numerical results
4 Perspectives
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 8 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Numerical methods and objectives
Resolution of the hyperbolic system :
Finite volume (SeLaLib)
Semi-Lagrangian (SeLaLib)
Discontinous Galerkin (CLAC, SCHNAPS)
Objectives :
Implementation of the three methods
Comparison between the three methods
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 9 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Finite volume scheme (2D)
Reduced Vlasov equation in 2D
∂tw +M−1A1∂x1w +M−1A2∂x2w +M−1B(E)w = 0
Finite-volume approximation
∂twkl =−F(wk,l,wk+1,l, ν
1)−F(wk−1,l,wk,l, ν1)
h1
−F(wk,l,wk,l+1, ν
2)−F(wk,l−1,wk,l, ν2)
h2+ S(wkl)
ν1 = (1, 0) and ν2 = (0, 1)
Viscous flux
F(wL,wR, ν) =M−1AiνiwL + wR
2−κ (wR −wL)
2, with κ ≥ 0.
(11)where κ : numerical diffusion.
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 10 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Finite volume scheme (2D) - Stability
Time discretization : Runge-Kutta (RK) of order 1, 2, 3 ou 4.
1 For the centered flux
RK1 and RK2 schemes are unstable
RK3 and RK4 schemes : there exists a constant ℘ ∈ (0, 1) such thatthe schemes are stable under the CFL condition ∆t = ℘ ∆x
Vmax.
2 For the viscous flux : The Runge-Kutta schemes of order 1, 2, 3, 4with the viscous flux are all stable when taking ∆t sufficiently small(CFL condition).
RK1 and RK2 : CFL parameter depends on κ
RK3 and RK4 schemes : CFL parameter does not depend on κ
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 11 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Finite volume scheme (2D) - Implementation
Implementation
SeLaLib libraby
MPI parallelization
Drawbacks
Matrix inversion (skyline storage of band matrices)
stability under CFL condition (in space and velocity)
low spatial accuracy
Advantages
locally conservative (mass, momentum) and L2 stable
finite-element refinement in the velocity direction
numerical dissipation only on the spatial direction
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 12 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Semi-Lagrangian scheme (2D)
Lagrange polynomials and Gauss-Lobatto points ⇒ diagonal matrices
M−1Ai =
vi1. . .
viNv
⇒ Semi-Lagrangian approximation
Splitting method
Advection in the x1 direction (1D Semi-Lagrangian)Advection in the x2 direction (1D Semi-Lagrangian)Addition of the source term
Implementation :
Selalib library
MPI parallelization
Advantages :
No CFL condition (in space)
High order method
Drawbacks :
Mass conservative on uniform 1D mesh
difficult to extend to non-cartesian meshP. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 13 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Discontinuous Galerkin scheme - Drift-kinetic model
In a cylinder consider a strong homogeneous magnetic field Bapp = b e3,the Vlasov equation
∂f
∂t+ v · ∇xf + (E + v ×Bapp) · ∇vf = 0.
becomes the drift-kinetic equation
∂tf + E⊥⊥ · ∇x⊥f + v||∂x||f + E||∂v||f = 0. (12)
Weak formulation (in velocity) of drift-kinetic equation
M∂tw + E⊥ · M∇⊥w +A∂x||w +B(Ex||)w = 0. (13)
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 14 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Discontinuous Galerkin scheme - Drift-kinetic model
Weak upwind DG formulation
ˆL∂tw
L · ψL −ˆLE⊥w
L · ∇⊥ψL +
ˆ∂L∩Ωx
E⊥(n+wL + n−wR
)· ψL+
ˆLwL · (M−1A)∂3ψ
L +
ˆ∂L∩Ωx
((M−1A)n+3 wL + (M−1A)n−3 wR) · ψL+
ˆL
(M−1B(EX3))wL · ψL = 0
(14)
where n the normal vector on ∂L oriented from the cell L to the
neighboring cells R, ψL,k : test function.
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 15 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Discontinuous Galerkin scheme
Implementation :
SCHNAPS code
multipatch, curved hexahedronmesh (gmsh)
GPU parallelization (OpenCL)
Starpu (task distribution)
Figure: Macro-mesh of a simple disk
Drawbacks :
CFL condition (in velocity andspace)
Advantages :
high-order accuracy
handle complex geometry
parallelization
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 16 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Plan
1 Model reduction
2 Numerical methods and objectives
3 Numerical results
4 Perspectives
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 17 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
2D Landau damping
Initial distribution function : f0(x, v) =12π
(1 + ε cos(k1x1) cos(k2x2))e−
(v21+v2
2)
2 .
Parameters : k1 = k2 = 0.5, ε = 5× 10−3 ; x ∈ [0, 4π]× [0, 4π], v ∈]− 6, 6[×]− 6, 6[ ;N1 = N2 = 32 (space), NC1 = NC2 = 32, degree 2 (velocity) ; 4 processors.
∆t cpu time (s)FV 1.47 10−2 10182SL 0.1 748SL 0.5 171
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 18 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Speed-up
2D Landau damping : Computed on the supercomputer Curie (TGCC).Parameters : 100 iterations, 2562 × 652 ≈ 277.106 unknows
Number of CPU 4 8 16 32 64 128
computation time 21280 13992 7237 3685 1869 985
speed-up (relative) 1.52 1.93 1.96 1.97 1.89
speed-up 6.08 11.76 23.1 45.53 86.41
Table: Computational time and speedup for the 2D finite-volume code.
Number of processor units (CPU) 8 16 64 128
computation time (second) 7398 3673 943 491
speed-up (relative) 2.01 3.89 1.92
speed-up 16.11 62.76 120.54
Table: Computational time and speedup for the 2D semi-Lagrangian code.
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 19 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Efficiency of code
The efficiency defined by
eff :=s ∗ nbpoints ∗ nbiterationsT ∗ 106 ∗ nbprocessors
. (15)
With the finite volume code, eff = 1.75
With the semi-Lagrangian code, eff = 3.5.
→ The effeciency of semi-Lagrangian method is twice as much than thisof the finite volumes method. Reason : semi-Lagrangian is withoutmatrices inversions.
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 20 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Guiding center model
Guiding center model in a disc
∂tρ+ E⊥ · ∇xρ = 0
−∆xΦ = ρ− ρ, E = −∇xΦ
Diocotron instability test-case [Davidson, 2013] : perturbed annularelectron layer
Growth-rate of the 4th Fourier modeρ at time t = 100
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 21 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Speed-up
Computational time and speedup for the 2D schnaps code on CPU.Computed on the Irma Atlas cluster. Parameters : 20 iterations, Mx = 20dx = 3, Nv = 31, dv = 3,Mv = 20.
sequential code OpenCL code OpenCL code1 core 1 core 1GPU
20 iterations 3532 2401.3 39.2
1 iterations 168.19 114.34 1.8
relative speed-up 1.47 63.5
Nb of CPU 1 2 4 8 16 32 64
comp. time 2401.3 1396.12 801.39 504.6 276.89 193.9 142.5
speed-up 1.72 2.997 4.759 8.67 12.38 16.9
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 22 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Plan
1 Model reduction
2 Numerical methods and objectives
3 Numerical results
4 Perspectives
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 23 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
Perspectives
1 Apply the code in schnaps to solve the drift-kinetic model and thegyro-kinetic model.
2 Resolve the drift-kinetic in SELALIB to compare with the one inschnaps.
3 Study the Vlasov model with the collision term.
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 24 / 25
Model reduction Numerical methods and objectives Numerical results Perspectives
THANKS FOR YOURATTENTION !
P. Helluy, L. Navoret, N. Pham Vlasov reduced model NUMKIN 2016 25 / 25