Documentation
VlasovPoissonTwoSpecies.Advection
VlasovPoissonTwoSpecies.Coef
VlasovPoissonTwoSpecies.EquilibriumManager
VlasovPoissonTwoSpecies.OutputManager
VlasovPoissonTwoSpecies.Scheme
VlasovPoissonTwoSpecies.WellBalanced
VlasovPoissonTwoSpecies.T_f
VlasovPoissonTwoSpecies.advect
VlasovPoissonTwoSpecies.advect_vlasov
VlasovPoissonTwoSpecies.bspline
VlasovPoissonTwoSpecies.compute_e
VlasovPoissonTwoSpecies.compute_energy
VlasovPoissonTwoSpecies.compute_normalized_energy
VlasovPoissonTwoSpecies.compute_rho
VlasovPoissonTwoSpecies.compute_source
VlasovPoissonTwoSpecies.get_normalized_energy
VlasovPoissonTwoSpecies.landau
VlasovPoissonTwoSpecies.Advection
— Typestruct Advection
Advection to be computed on each row
mesh::Mesh
p::Int64
modes::Vector{Float64}
eig_bspl::Vector{Float64}
eigalpha::Vector{ComplexF64}
VlasovPoissonTwoSpecies.Coef
— Typemutable struct Coef
Use this type to set the coefficients for the equation
\[\Big(\frac{d}{dx} y\Big)^2 := \alpha y^4 + \gamma y^2 + \epsilon,\]
Three sets of coefficients are availabe:
- :JacobiDN
- :JacobiND
- :JacobiCN
VlasovPoissonTwoSpecies.EquilibriumManager
— Typestruct EquilibriumManager
mesh_x::Mesh
mesh_v::Mesh
coef::Coef
fe::Matrix{Float64}
fi::Matrix{Float64}
dx_fe::Matrix{Float64}
dv_fe::Matrix{Float64}
dx_fi::Matrix{Float64}
dv_fi::Matrix{Float64}
Stationary solutions to Vlasov-Poisson under the following form
\[ \begin{cases} f^+(x,v) = \sqrt{\frac{a}{\pi}}\Big(r_1 e^{2 a (\frac{v^2}{2}+\phi(x))} + \frac{r_2}{\sqrt{2}} e^{a(\frac{v^2}{2}+\phi(x))}\Big),\ f^-(x,v) = \sqrt{\frac{a}{\mu \pi}}\Big(s_1 e^{2 a (\frac{v^2}{2 \mu}-\phi(x))} + \frac{s_2}{\sqrt{2}} e^{a(\frac{v^2}{2 \mu}-\phi(x))}\Big), \end{cases}\]
VlasovPoissonTwoSpecies.OutputManager
— Typestruct OutputManager
data::Data
mesh_x::Mesh
mesh_v::Mesh
nb_outputs::Int64
t::Vector{Float64}
compute_energy_eq::Bool
energy_fe_init::Float64
energy_fi_init::Float64
energy_fe::Vector{Float64}
energy_fi::Vector{Float64}
Data structure to manage outputs.
VlasovPoissonTwoSpecies.Scheme
— Typestruct Scheme
mesh_x::Mesh
mesh_v::Mesh
advection_x::VlasovPoissonTwoSpecies.Advection
advection_v::VlasovPoissonTwoSpecies.Advection
fe::Matrix{Float64}
fi::Matrix{Float64}
ge::Matrix{Float64}
gi::Matrix{Float64}
ρ_eq::Vector{Float64}
e_eq::Vector{Float64}
fe_eq::Matrix{Float64}
fi_eq::Matrix{Float64}
dx_fe_eq::Matrix{Float64}
dx_fi_eq::Matrix{Float64}
dv_fe_eq::Matrix{Float64}
dv_fi_eq::Matrix{Float64}
wb_scheme::Bool
e_projection::Vector{Float64}
VlasovPoissonTwoSpecies.WellBalanced
— Typestruct WellBalanced <: VlasovPoissonTwoSpecies.AbstractScheme
mesh_x::Mesh
mesh_v::Mesh
advection_x::VlasovPoissonTwoSpecies.Advection
advection_v::VlasovPoissonTwoSpecies.Advection
fe::Matrix{Float64}
fi::Matrix{Float64}
ge::Matrix{Float64}
gi::Matrix{Float64}
geᵗ::Matrix{Float64}
giᵗ::Matrix{Float64}
ρ_eq::Vector{Float64}
e_eq::Vector{Float64}
fe_eq::Matrix{Float64}
fi_eq::Matrix{Float64}
dx_fe_eq::Matrix{Float64}
dx_fi_eq::Matrix{Float64}
dv_fe_eq::Matrix{Float64}
dv_fi_eq::Matrix{Float64}
t_f::Matrix{Float64}
VlasovPoissonTwoSpecies.T_f
— FunctionT_f(mesh_x, mesh_v, f, e, dx_f, dv_f)
T_f(mesh_x, mesh_v, f, e, dx_f, dv_f, order)
\[T_{\phi} = v \partial_x - \partial_x \phi \partial_v\]
VlasovPoissonTwoSpecies.advect
— Methodadvect(self, f, v, dt)
VlasovPoissonTwoSpecies.advect_vlasov
— Functionadvect_vlasov(advection_x, advection_v, fe, fi, dt)
advect_vlasov(advection_x, advection_v, fe, fi, dt, e_eq)
advect_vlasov(
advection_x,
advection_v,
fe,
fi,
dt,
e_eq,
order
)
VlasovPoissonTwoSpecies.bspline
— Methodbspline(p, j, x)
Return the value at x in [0,1] of the B-spline with integer nodes of degree p with support starting at j. Implemented recursively using the De Boor's Algorithm
\[B_{i,0}(x) := \left\{ \begin{matrix} 1 & \mathrm{if} \quad t_i ≤ x < t_{i+1} \\ 0 & \mathrm{otherwise} \end{matrix} \right.\]
\[B_{i,p}(x) := \frac{x - t_i}{t_{i+p} - t_i} B_{i,p-1}(x) + \frac{t_{i+p+1} - x}{t_{i+p+1} - t_{i+1}} B_{i+1,p-1}(x).\]
VlasovPoissonTwoSpecies.compute_e
— Methodcompute_e(mesh_x, rho)
compute Ex using that
\[-ikE_x = \rho \]
VlasovPoissonTwoSpecies.compute_energy
— Methodcompute_energy(mesh_x, mesh_v, f)
\[e_f = \int v^2 f dv\]
VlasovPoissonTwoSpecies.compute_normalized_energy
— Methodcompute_normalized_energy(output, fe, fi)
VlasovPoissonTwoSpecies.compute_rho
— Methodcompute_rho(meshv, f)
Compute charge density
\[\rho(x,t) = \int f(x,v,t) dv\]
VlasovPoissonTwoSpecies.compute_source
— Methodcompute_source(scheme, dt)
\[\partial_t g^{\pm} = \pm \partial_x \phi_g \partial_v f_0^\pm\]
VlasovPoissonTwoSpecies.get_normalized_energy
— Methodget_normalized_energy(mesh_x, mesh_v, f, energy_eq)
returns the normalized energy
\[|e_f - e_eq| / e_eq\]
where $e_f$ is the energy of $f$.
VlasovPoissonTwoSpecies.landau
— Methodlandau(ϵ, k, meshx, meshv)
Landau Damping
\[f(x,v) = \frac{1}{\sqrt{2\pi}}(1 + \epsilon \cos ( k x )) \exp (- \frac{v^2}{2} )\]