Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Doehring <daniel.doehring@rwth-aachen.de>
  • Loading branch information
amrueda and DanielDoehring authored Jan 6, 2025
1 parent 0160b44 commit 25d78c3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
6 changes: 3 additions & 3 deletions examples/tree_2d_dgsem/elixir_mhdmultiion_collisions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ equations = IdealGlmMhdMultiIonEquations2D(gammas = (5 / 3, 5 / 3),
gas_constants = (1.0, 1.0), # [nondimensional]
molar_masses = (1.0, 1.0), # [nondimensional]
ion_ion_collision_constants = [0.0 0.4079382480442680;
0.4079382480442680 0.0], # [nondimensional] (computed with eq (4.142) of Schunk&Nagy (2009))
0.4079382480442680 0.0], # [nondimensional] (computed with eq (4.142) of Schunk & Nagy (2009))
ion_electron_collision_constants = (8.56368379833E-06,
8.56368379833E-06), # [nondimensional] (computed with eq (9) of Ghosh et al. (2019))
electron_pressure = electron_pressure_constantTe,
Expand Down Expand Up @@ -81,15 +81,15 @@ function temperature1(u, equations::IdealGlmMhdMultiIonEquations2D)
rho_1, _ = Trixi.get_component(1, u, equations)
p = pressure(u, equations)

return p[1] / rho_1 / equations.gas_constants[1]
return p[1] / (rho_1 * equations.gas_constants[1])
end

# Temperature of ion 2
function temperature2(u, equations::IdealGlmMhdMultiIonEquations2D)
rho_2, _ = Trixi.get_component(2, u, equations)
p = pressure(u, equations)

return p[2] / rho_2 / equations.gas_constants[2]
return p[2] / (rho_2 * equations.gas_constants[2])
end

initial_condition = initial_condition_slow_down
Expand Down
3 changes: 1 addition & 2 deletions src/equations/ideal_glm_mhd_multiion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,7 @@ where ``M_k`` is the molar mass of ion species `k` provided in `equations.molar_
with the so-called reduced temperature ``T_{k k'}`` and the ion-ion collision constants ``\tilde{B}_{kk'}`` provided
in `equations.ion_electron_collision_constants` (see [`IdealGlmMhdMultiIonEquations2D`](@ref)).
The additional coefficient ``\bar{\nu}^1_{kk'}`` is a non-dimensional drift correction factor proposed by Rambo and
Denavit.
The additional coefficient ``\bar{\nu}^1_{kk'}`` is a non-dimensional drift correction factor proposed by Rambo and Denavit.
References:
- P. Rambo, J. Denavit, Interpenetration and ion separation in colliding plasmas, Physics of Plasmas 1 (1994) 4050–4060.
Expand Down
4 changes: 2 additions & 2 deletions src/equations/ideal_glm_mhd_multiion_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ ratios `charge_to_mass` should be passed as tuples, e.g., `gammas=(1.4, 1.667)`.
The ion-ion and ion-electron collision source terms can be computed using the functions
[`source_terms_collision_ion_ion`](@ref) and [`source_terms_collision_ion_electron`](@ref), respectively.
For ion-ion collision terms, the optional arguments `gas_constants`, `molar_masses`, and `ion_ion_collision_constants`
must be provided. For ion-electron collision terms, the optional arguments `gas_constants`, `molar_masses`,
For ion-ion collision terms, the optional keyword arguments `gas_constants`, `molar_masses`, and `ion_ion_collision_constants`
must be provided. For ion-electron collision terms, the optional keyword arguments `gas_constants`, `molar_masses`,
`ion_electron_collision_constants`, and `electron_temperature` are required.
- **`gas_constants`** and **`molar_masses`** are tuples containing the gas constant and molar mass of each
Expand Down

0 comments on commit 25d78c3

Please sign in to comment.