Skip to content

Commit

Permalink
fix the CJ detonation utility
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Jan 5, 2025
1 parent bc1ccfa commit f208637
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion util/cj_detonation/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ MICROPHYSICS_HOME := ../..
EOS_DIR := helmholtz

# This sets the network directory
NETWORK_DIR := aprox13
NETWORK_DIR := subch_simple

CONDUCTIVITY_DIR := stellar

Expand Down
2 changes: 2 additions & 0 deletions util/cj_detonation/_parameters
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@namespace: cj

smallx real 1.e-10

small_temp real 1.e5
Expand Down
3 changes: 2 additions & 1 deletion util/cj_detonation/inputs
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
amr.probin_file = probin
cj.smallx = 1.e-10

15 changes: 7 additions & 8 deletions util/cj_detonation/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ using namespace amrex;
#include <network.H>
#include <cj_det.H>
#include <unit_test.H>
#ifndef NEW_NETWORK_IMPLEMENTATION
#include <actual_network.H>
#include <actual_rhs.H>
#endif

using namespace unit_test_rp;

Expand All @@ -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

Expand All @@ -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);

Expand All @@ -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<Real, 1, NumSpec> dymol;
Expand Down
5 changes: 0 additions & 5 deletions util/cj_detonation/probin

This file was deleted.

0 comments on commit f208637

Please sign in to comment.