Skip to content

Commit

Permalink
Improved comments for multi-ion MHD equation (2D) and renamed source_…
Browse files Browse the repository at this point in the history
…terms_standard to source_terms_lorentz
  • Loading branch information
amrueda committed Dec 6, 2024
1 parent ac54ebd commit 8c1ab2f
Show file tree
Hide file tree
Showing 10 changed files with 143 additions and 112 deletions.
2 changes: 1 addition & 1 deletion examples/tree_1d_dgsem/elixir_mhdmultiion_ec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mesh = TreeMesh(coordinates_min, coordinates_max,
n_cells_max = 10_000)

semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver,
source_terms = source_terms_standard)
source_terms = source_terms_lorentz)

###############################################################################
# ODE solvers, callbacks etc.
Expand Down
2 changes: 1 addition & 1 deletion examples/tree_1d_dgsem/elixir_mhdmultiion_ec_onespecies.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver)

# In the one-species case, the source terms are not really needed, but this variant produces the same results:
# semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver,
# source_terms=source_terms_standard)
# source_terms=source_terms_lorentz)

###############################################################################
# ODE solvers, callbacks etc.
Expand Down
2 changes: 1 addition & 1 deletion examples/tree_1d_dgsem/elixir_mhdmultiion_es.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ mesh = TreeMesh(coordinates_min, coordinates_max,
n_cells_max = 10_000)

semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver,
source_terms = source_terms_standard)
source_terms = source_terms_lorentz)

###############################################################################
# ODE solvers, callbacks etc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ mesh = TreeMesh(coordinates_min, coordinates_max,
n_cells_max = 10_000)

semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver,
source_terms = source_terms_standard)
source_terms = source_terms_lorentz)

###############################################################################
# ODE solvers, callbacks etc.
Expand Down
2 changes: 1 addition & 1 deletion examples/tree_2d_dgsem/elixir_mhdmultiion_ec.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mesh = TreeMesh(coordinates_min, coordinates_max,
n_cells_max = 10_000)

semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver,
source_terms = source_terms_standard)
source_terms = source_terms_lorentz)

###############################################################################
# ODE solvers, callbacks etc.
Expand Down
2 changes: 1 addition & 1 deletion examples/tree_2d_dgsem/elixir_mhdmultiion_es.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ mesh = TreeMesh(coordinates_min, coordinates_max,
n_cells_max = 10_000)

semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver,
source_terms = source_terms_standard)
source_terms = source_terms_lorentz)

###############################################################################
# ODE solvers, callbacks etc.
Expand Down
2 changes: 1 addition & 1 deletion src/Trixi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ export boundary_condition_do_nothing,
BoundaryConditionCoupled

export initial_condition_convergence_test, source_terms_convergence_test,
source_terms_standard
source_terms_lorentz
export source_terms_harmonic
export initial_condition_poisson_nonperiodic, source_terms_poisson_nonperiodic,
boundary_condition_poisson_nonperiodic
Expand Down
3 changes: 2 additions & 1 deletion src/callbacks_step/glm_speed.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
GlmSpeedCallback(; glm_scale=0.5, cfl, semi_indices=())
Update the divergence cleaning wave speed `c_h` according to the time step
computed in [`StepsizeCallback`](@ref) for the ideal GLM-MHD equations.
computed in [`StepsizeCallback`](@ref) for the ideal GLM-MHD equations, the multi-component
GLM-MHD equations, and the multi-ion GLM-MHD equations.
The `cfl` number should be set to the same value as for the time step size calculation. The
`glm_scale` ensures that the GLM wave speed is lower than the fastest physical waves in the MHD
solution and should thus be set to a value within the interval [0,1]. Note that `glm_scale = 0`
Expand Down
236 changes: 133 additions & 103 deletions src/equations/ideal_glm_mhd_multiion_2d.jl

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/equations/ideal_mhd_multiion_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ end
"""
Standard source terms of the multi-ion MHD equations
"""
function source_terms_standard(u, x, t, equations::IdealMhdMultiIonEquations1D)
function source_terms_lorentz(u, x, t, equations::IdealMhdMultiIonEquations1D)
@unpack charge_to_mass = equations
B1, B2, B3 = magnetic_field(u, equations)
v1_plus, v2_plus, v3_plus, vk1_plus, vk2_plus, vk3_plus = charge_averaged_velocities(u,
Expand Down

0 comments on commit 8c1ab2f

Please sign in to comment.