Skip to content

Commit

Permalink
Fixed bugs in multi-ion MHD source term
Browse files Browse the repository at this point in the history
  • Loading branch information
amrueda committed Jun 28, 2023
1 parent 5b65806 commit 12606b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/equations/ideal_mhd_multiion_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,9 @@ function source_terms_standard(u, x, t, equations::IdealMhdMultiIonEquations1D)
v2_diff = v2_plus - v2
v3_diff = v3_plus - v3
r_rho = charge_to_mass[k] * rho
s2 = r_rho * (v2_diff * B3 - v3_diff - B2)
s3 = r_rho * (v3_diff * B1 - v1_diff - B3)
s4 = r_rho * (v1_diff * B2 - v2_diff - B1)
s2 = r_rho * (v2_diff * B3 - v3_diff * B2)
s3 = r_rho * (v3_diff * B1 - v1_diff * B3)
s4 = r_rho * (v1_diff * B2 - v2_diff * B1)
s5 = v1 * s2 + v2 * s3 + v3 * s4

set_component!(s, k, 0, s2, s3, s4, s5, equations)
Expand Down
6 changes: 3 additions & 3 deletions src/equations/ideal_mhd_multiion_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,9 @@ function source_terms_standard(u, x, t, equations::IdealMhdMultiIonEquations2D)
v2_diff = v2_plus - v2
v3_diff = v3_plus - v3
r_rho = charge_to_mass[k] * rho
s2 = r_rho * (v2_diff * B3 - v3_diff - B2)
s3 = r_rho * (v3_diff * B1 - v1_diff - B3)
s4 = r_rho * (v1_diff * B2 - v2_diff - B1)
s2 = r_rho * (v2_diff * B3 - v3_diff * B2)
s3 = r_rho * (v3_diff * B1 - v1_diff * B3)
s4 = r_rho * (v1_diff * B2 - v2_diff * B1)
s5 = v1 * s2 + v2 * s3 + v3 * s4

set_component!(s, k, 0, s2, s3, s4, s5, equations)
Expand Down

0 comments on commit 12606b2

Please sign in to comment.