-
Notifications
You must be signed in to change notification settings - Fork 0
Models
All the equations are dimensionless.
Nomenclature:
- n : density
- φ : electric potential
- Ω = Δφ : vorticity
- κ : density gradient
- C : adiabatic parameter
- ν : viscosity
- D : diffusivity
- Xₖ : X in the Fourier space
- X̅ = 1/Ly ∫_y X(x,y) dy : zonal average
- X̃ = X - X̅ : fluctuations
- [X,Y] = ∂ˣX∂ʸY - ∂ʸX∂ˣY : Poisson bracket
- X* : conjugate of X
Pseudo-spectral method (periodic boundaries) of the Hasekawa-Wakatani model in 2D.
We used the 2/3 rule for the zero padding to avoid aliasing effects. These equations are expressed in the Fourier space.
\ | |||
---|---|---|---|
|
The initial state is initialised in the Fourier space.
hasegawa_wakatani_pspectral_2d:
grid_size: 682
domain: 50
atol: 1.0e-10
rtol: 1.0e-10
νx: 1.0e-4
νy: 1.0e-4
νz: 1.0e-5
Dx: 1.0e-4
Dx: 1.0e-4
Dz: 1.0e-5
tf: 500
video_length: 10
pspectral_2D.mp4
Runtime (GPU RTX 3060) ≈ 1h20
Pseudo-spectral method of the single poloidal mode of Hasekawa-Wakatani.
It is simply a wrapper of hasegawa_wakatani_pspectral_2d
where the grid_size
in the y direction is 4. The domain in the y direction is 2*pi/ky
where ky
is the most unstable wave number (maximizing the growth rate γ) computed numerically. See also hasegawa_wakatani_findiff_1d
.
hasegawa_wakatani_pspectral_1d:
grid_size: 682
domain: 50
νx: 1.0e-2
νy: 1.0e-4
νz: 1.0e-5
Dx: 1.0e-4
Dy: 1.0e-4
Dz: 1.0e-5
tf: 300
atol: 1.0e-10
rtol: 1.0e-10
video_length: 30
video_fps: 100
We increased νx because the loss of νy/modes in the y direction
Finite difference method of the single poloidal mode model.
In this model, only one poloidal mode is kept. Therefore, we can express n, φ and Ω this way:
ky
is a parameter, the single poloidal mode, the most unstable wave number. The equations become:
where
and (from the dispersion relation, see)
hasegawa_wakatani_findiff_1d:
grid_size: 682
domain: 50
νx: 1.0e-2
νy: 1.0e-4
νz: 1.0e-5
Dx: 1.0e-4
Dy: 1.0e-4
Dz: 1.0e-5
acc: 10
tf: 300
atol: 1.0e-10
rtol: 1.0e-10
video_length: 30
video_fps: 100
Note the result is similar to hasegawa_wakatani_pspectral_1d
because it is the same problem solved with 2 different methods.
We simply add this line as a parameter in the .yaml
file:
boundary: dirichlet
The goal is to create a natural density gradient. In this configuration:
- we set
κ=0
- we add a source term S in the equation of n̅ wich represents the particle injection from the center. Its distribution a gaussian centered on the left hand side of the domain. We also add a small well on the right hand side to act like the loss of the particle at the edges. The equation becomes:
- the boundary conditions are:
side | n̅, Ω̅ | nₖ, Ωₖ |
---|---|---|
left | neumann |
dirichlet |
right | dirichlet |
dirichlet |
κ: 0
ky: 1.3
tf: 2000000
boundary: force 0.001
where 0.001
is the amplitude of the source term and we increased the simulation time tf
.
Finite difference method of the Hasegawa-Wakatani model in 2D (centered grid).
This is much slower than hasegawa_wakatani_pspectral_2d
We compute φ by solving Ω=Δφ at each time step.
hasegawa_wakatani_findiff_2d:
grid_size: 800
domain: 50
D: 1.0e-3
Dz: 1.0e-5
ν: 1.0e-3
νz: 1.0e-5
acc: 6
atol: 1.0e-10
rtol: 1.0e-6
tf: 500
video_length: 10
video_fps: 60
findiff_2d_periodic.mp4
boundary: dirichlet
The initial state is a gaussian in the density field n.
findiff_2d.mp4
runtime (GPU RTX 3060) ≈ 90h
Pseudo-spectral method of the Hasegawa-Mima model. This is the abiabatic limit of the Hasegawa-Wakatani model: when C→∞, we have n=ϕ.
The equation is expressed in the Fourier space.
kx=0
and ky=force_ky
with an amplitude force_amplitude
and a random phase at each step.
hasegawa_mima_pspectral_2D:
grid_size: 682
ν: 1.0e-4
force_ky: 1
force_amplitude: 5.0e-3
atol: 1.0e-10
rtol: 1.0e-6
tf: 500
mima_pspectral_2d.mp4
Similar to hasegawa_wakatani_pspectral_2d
but
hasegawa_wakatani_pspectral_3d:
grid_size: 128
domain: 50
ν: 2.0e-2
νz: 1.0e-5
D: 1.0e-2
Dz: 1.0e-5
atol: 1.0e-10
rtol: 1.0e-10
tf: 300