From 12606b251efdd0ce86f1275b4d801cd58a9db3ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Rueda-Ram=C3=ADrez?= Date: Wed, 28 Jun 2023 15:59:32 +0200 Subject: [PATCH] Fixed bugs in multi-ion MHD source term --- src/equations/ideal_mhd_multiion_1d.jl | 6 +++--- src/equations/ideal_mhd_multiion_2d.jl | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/equations/ideal_mhd_multiion_1d.jl b/src/equations/ideal_mhd_multiion_1d.jl index 7cddf9c9934..892b39188ed 100644 --- a/src/equations/ideal_mhd_multiion_1d.jl +++ b/src/equations/ideal_mhd_multiion_1d.jl @@ -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) diff --git a/src/equations/ideal_mhd_multiion_2d.jl b/src/equations/ideal_mhd_multiion_2d.jl index 1496139c191..04e0f1d4b83 100644 --- a/src/equations/ideal_mhd_multiion_2d.jl +++ b/src/equations/ideal_mhd_multiion_2d.jl @@ -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)