From f208637ab01507bec5f429f4adab56b81f6e5325 Mon Sep 17 00:00:00 2001 From: Michael Zingale Date: Sun, 5 Jan 2025 18:07:38 -0500 Subject: [PATCH] fix the CJ detonation utility --- util/cj_detonation/GNUmakefile | 2 +- util/cj_detonation/_parameters | 2 ++ util/cj_detonation/inputs | 3 ++- util/cj_detonation/main.cpp | 15 +++++++-------- util/cj_detonation/probin | 5 ----- 5 files changed, 12 insertions(+), 15 deletions(-) delete mode 100644 util/cj_detonation/probin diff --git a/util/cj_detonation/GNUmakefile b/util/cj_detonation/GNUmakefile index 223308e541..ded3cce357 100644 --- a/util/cj_detonation/GNUmakefile +++ b/util/cj_detonation/GNUmakefile @@ -21,7 +21,7 @@ MICROPHYSICS_HOME := ../.. EOS_DIR := helmholtz # This sets the network directory -NETWORK_DIR := aprox13 +NETWORK_DIR := subch_simple CONDUCTIVITY_DIR := stellar diff --git a/util/cj_detonation/_parameters b/util/cj_detonation/_parameters index b1191dab7f..d5d3e3ed6d 100644 --- a/util/cj_detonation/_parameters +++ b/util/cj_detonation/_parameters @@ -1,3 +1,5 @@ +@namespace: cj + smallx real 1.e-10 small_temp real 1.e5 diff --git a/util/cj_detonation/inputs b/util/cj_detonation/inputs index 9204ae72be..b0edb3d397 100644 --- a/util/cj_detonation/inputs +++ b/util/cj_detonation/inputs @@ -1 +1,2 @@ -amr.probin_file = probin +cj.smallx = 1.e-10 + diff --git a/util/cj_detonation/main.cpp b/util/cj_detonation/main.cpp index d4b520f1b8..632be518dc 100644 --- a/util/cj_detonation/main.cpp +++ b/util/cj_detonation/main.cpp @@ -11,9 +11,8 @@ using namespace amrex; #include #include #include -#ifndef NEW_NETWORK_IMPLEMENTATION +#include #include -#endif using namespace unit_test_rp; @@ -37,11 +36,11 @@ int main(int argc, char *argv[]) { for (int i = 0; i < probin_file_length; i++) probin_file_name[i] = probin_file[i]; - init_unit_test(probin_file_name.dataPtr(), &probin_file_length); + init_unit_test(); // C++ EOS initialization (must be done after Fortran eos_init and // init_extern_parameters) - eos_init(small_temp, small_dens); + eos_init(cj_rp::small_temp, cj_rp::small_dens); // C++ Network, RHS, screening, rates initialization @@ -60,9 +59,9 @@ int main(int argc, char *argv[]) { eos_state_fuel.rho = 1.e7_rt; eos_state_fuel.T = 1.e8_rt; for (int n = 0; n < NumSpec; n++) { - eos_state_fuel.xn[n] = smallx; + eos_state_fuel.xn[n] = cj_rp::smallx; } - eos_state_fuel.xn[0] = 1.0_rt - (NumSpec - 1) * smallx; + eos_state_fuel.xn[0] = 1.0_rt - (NumSpec - 1) * cj_rp::smallx; eos(eos_input_rt, eos_state_fuel); @@ -71,9 +70,9 @@ int main(int argc, char *argv[]) { eos_t eos_state_ash = eos_state_fuel; for (int n = 0; n < NumSpec; n++) { - eos_state_ash.xn[n] = smallx; + eos_state_ash.xn[n] = cj_rp::smallx; } - eos_state_ash.xn[NumSpec-1] = 1.0_rt - (NumSpec - 1) * smallx; + eos_state_ash.xn[NumSpec-1] = 1.0_rt - (NumSpec - 1) * cj_rp::smallx; // get the q value -- we need the change in molar fractions Array1D dymol; diff --git a/util/cj_detonation/probin b/util/cj_detonation/probin deleted file mode 100644 index f4576dcbd8..0000000000 --- a/util/cj_detonation/probin +++ /dev/null @@ -1,5 +0,0 @@ -&probin - - smallx = 1.e-10 - -/