From ebd7f3ef591333fe6c81aacaba80445a358bced0 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Fri, 8 Mar 2024 22:54:02 -0300 Subject: [PATCH 1/2] PROBLEMS: Update the parameter file for the current sheet problem. Signed-off-by: Grzegorz Kowal --- problems/current-sheet.in | 41 ++++++++++++++++++++++++++ problems/current_sheet.in | 61 --------------------------------------- 2 files changed, 41 insertions(+), 61 deletions(-) create mode 100644 problems/current-sheet.in delete mode 100644 problems/current_sheet.in diff --git a/problems/current-sheet.in b/problems/current-sheet.in new file mode 100644 index 0000000..17b91ad --- /dev/null +++ b/problems/current-sheet.in @@ -0,0 +1,41 @@ +# problem name and parameters +# +problem = "current-sheet" +resistivity = 1.00d-05 + +# physics +# +equation_system = "mhd" +equation_of_state = "adi" +glm_source_terms = "kepes" + +# methods +# +time_advance = "ssprk3(2)4" +riemann_solver = "kepes" +reconstruction = "gp" + +# mesh parameters +# +xmin = -5.0d-01 +xmax = 5.0d-01 +ymin = -5.0d-01 +ymax = 5.0d-01 +zmin = -5.0d-01 +zmax = 5.0d-01 + +# refinement control +# +ncells = 16 +maxlev = 8 +refinement_variables = "dens pres magy" + +# runtime control parameters +# +tmax = 1.0d+00 +cfl = 5.0d-01 + +# data output control +# +snapshot_interval = 1.0d-01 +compression_format = "lz4" diff --git a/problems/current_sheet.in b/problems/current_sheet.in deleted file mode 100644 index 77706b6..0000000 --- a/problems/current_sheet.in +++ /dev/null @@ -1,61 +0,0 @@ -# problem name and parameters -# -problem = "current_sheet" -resistivity = 1.00d-05 -alpha = 1.00d+01 - -# physics -# -equation_system = "mhd" -equation_of_state = "adi" -glm_source_terms = "heglm" - -# methods -# -time_advance = "rk2" -riemann_solver = "hlld" -reconstruction = "limo3" -limiter = "mc" -fix_positivity = "off" - -# mesh parameters -# -xblocks = 1 -yblocks = 1 -zblocks = 1 -xmin = -5.0d-01 -xmax = 5.0d-01 -ymin = -5.0d-01 -ymax = 5.0d-01 -zmin = -5.0d-01 -zmax = 5.0d-01 - -# refinement control -# -ncells = 8 -nghosts = 2 -minlev = 1 -maxlev = 7 -refinement_variables = "dens pres magy" - -# boundary conditions -# -xlbndry = "periodic" -xubndry = "periodic" -ylbndry = "periodic" -yubndry = "periodic" -zlbndry = "periodic" -zubndry = "periodic" - -# runtime control parameters -# -tmax = 1.0d+00 -cfl = 4.0d-01 - -# data output control -# -precise_snapshots = "off" -snapshot_type = "p" -snapshot_interval = 1.0d-01 -restart_number = -1 -integrals_interval = 10 From 403a1e2f3f9cbcac3a6b6a123ee4d32dcc4bfe53 Mon Sep 17 00:00:00 2001 From: Grzegorz Kowal Date: Sat, 20 Apr 2024 17:47:19 -0300 Subject: [PATCH 2/2] INTERPOLATION: kappa parameter should be >= 1. The kappa parameter is calculated from CFL value. It is a decreasing value with increasing CFL. However, to maintain the precision of MP limiter, it should be kept above 1. Therefore, instead of taking the min values between the user defined kappa and the one calculated from the CFL value, take its maximum. Signed-off-by: Grzegorz Kowal --- sources/interpolations.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/interpolations.F90 b/sources/interpolations.F90 index 778de4b..edb5a3a 100644 --- a/sources/interpolations.F90 +++ b/sources/interpolations.F90 @@ -224,7 +224,7 @@ module interpolations ! calculate κ = (1 - ν) / ν ! - kappa = min(kappa, (1.0d+00 - cfl) / cfl) + kappa = max(kappa, (1.0d+00 - cfl) / cfl) ! correct central weight !