Skip to content

Commit

Permalink
Merge branch 'development' into riemann_state_cma
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Jul 30, 2024
2 parents 22a3396 + c7c6aca commit df45ed9
Show file tree
Hide file tree
Showing 31 changed files with 267 additions and 215 deletions.
3 changes: 3 additions & 0 deletions Exec/Make.Castro
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ endif
# Require C++17
CXXSTD := c++17

# Use Lazy QueueReduction for the timing outputs
LAZY := TRUE

# default integrator
INTEGRATOR_DIR ?= VODE

Expand Down
2 changes: 1 addition & 1 deletion Exec/hydro_tests/Noh/problem_bc_fill.H
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void problem_bc_fill(int i, int j, int k,

eos_t zone_state;
zone_state.rho = rho_init * std::pow(1.0_rt + time / r, AMREX_SPACEDIM - 1);
zone_state.p = pres_init * std::pow(zone_state.rho / rho_init, 1.0_rt + eos_gamma);
zone_state.p = pres_init * std::pow(zone_state.rho / rho_init, 1.0_rt + eos_rp::eos_gamma);
for (int n = 0; n < NumSpec; ++n) {
zone_state.xn[n] = 1.0_rt / static_cast<Real>(NumSpec);
}
Expand Down
8 changes: 4 additions & 4 deletions Exec/hydro_tests/RT/problem_initialize_state_data.H
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ void problem_initialize_state_data (int i, int j, int k,

if (r[AMREX_SPACEDIM-1] < problem::split[AMREX_SPACEDIM-1]) {
Real pres = problem::p0_base - problem::rho_1 * r[AMREX_SPACEDIM-1];
state(i,j,k,UEDEN) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEDEN) = pres / (eos_rp::eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_rp::eos_gamma - 1.0_rt);
} else {
Real pres = presmid - problem::rho_2 *
(r[AMREX_SPACEDIM-1] - problem::split[AMREX_SPACEDIM-1]);
state(i,j,k,UEDEN) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEDEN) = pres / (eos_rp::eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_rp::eos_gamma - 1.0_rt);
}

Real pertheight;
Expand Down
4 changes: 2 additions & 2 deletions Exec/hydro_tests/Vortices_LWAcoustics/problem_initialize.H
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ void problem_initialize ()

// Define rho_0

problem::rho_0 = std::pow(problem::p_ref, 1.0_rt/eos_gamma);
problem::rho_0 = std::pow(problem::p_ref, 1.0_rt/eos_rp::eos_gamma);

// Define c_0

problem::c_0 = std::sqrt(eos_gamma * problem::p_ref / problem::rho_0);
problem::c_0 = std::sqrt(eos_rp::eos_gamma * problem::p_ref / problem::rho_0);

// Define r_c, radius of each vortex

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void problem_initialize_state_data (int i, int j, int k,

// internal energy

state(i,j,k,UEINT) = problem::p_ref / (eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = problem::p_ref / (eos_rp::eos_gamma - 1.0_rt);

// Total energy

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ void problem_initialize_state_data (int i, int j, int k,
state(i,j,k,UMZ) = 0.0_rt;

// we are isentropic, so p = (dens/rho0)**Gamma_1
Real p = std::pow(state(i,j,k,URHO) / problem::rho0, eos_gamma);
Real eint = p / (eos_gamma - 1.0_rt);
Real p = std::pow(state(i,j,k,URHO) / problem::rho0, eos_rp::eos_gamma);
Real eint = p / (eos_rp::eos_gamma - 1.0_rt);

state(i,j,k,UEDEN) = eint;
state(i,j,k,UEINT) = eint;
Expand Down
4 changes: 2 additions & 2 deletions Exec/hydro_tests/gamma_law_bubble/Problem_Derive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ void ca_derrhopert(const Box& bx, FArrayBox& derfab, int dcomp, int /*ncomp*/,
if (problem::do_isentropic) {
Real z = static_cast<Real>(j) * dx[AMREX_SPACEDIM-1];
density[j] = problem::dens_base *
std::pow((gravity::const_grav * problem::dens_base * (eos_gamma - 1.0_rt) * z/
(eos_gamma * problem::pres_base) + 1.0_rt), 1.0_rt/(eos_gamma - 1.0_rt));
std::pow((gravity::const_grav * problem::dens_base * (eos_rp::eos_gamma - 1.0_rt) * z/
(eos_rp::eos_gamma * problem::pres_base) + 1.0_rt), 1.0_rt/(eos_rp::eos_gamma - 1.0_rt));
} else {
Real z = (static_cast<Real>(j) + 0.5_rt) * dx[AMREX_SPACEDIM-1];
density[j] = problem::dens_base * std::exp(-z/H);
Expand Down
4 changes: 2 additions & 2 deletions Exec/hydro_tests/gamma_law_bubble/initial_model.H
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ generate_initial_model(const int npts_model, const Real xmin, const Real xmax,

density = model_params.dens_base *
std::pow(gravity::const_grav * model_params.dens_base *
(eos_gamma - 1.0) * z /
(eos_gamma * model_params.p_base) + 1.0_rt, 1.0_rt/(eos_gamma - 1.0_rt));
(eos_rp::eos_gamma - 1.0) * z /
(eos_rp::eos_gamma * model_params.p_base) + 1.0_rt, 1.0_rt/(eos_rp::eos_gamma - 1.0_rt));

} else {
Real z = xmin + (static_cast<Real>(i) + 0.5_rt) * dx;
Expand Down
4 changes: 2 additions & 2 deletions Exec/hydro_tests/gamma_law_bubble/prob_util.H
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ gamma_law_initial_model(Real* const pressure, Real* const density, Real* const t
if (problem::do_isentropic) {
Real z = static_cast<Real>(j) * dx[AMREX_SPACEDIM-1];
density[j] = problem::dens_base *
std::pow((gravity::const_grav * problem::dens_base * (eos_gamma - 1.0_rt) * z/
(eos_gamma * problem::pres_base) + 1.0_rt), 1.0_rt/(eos_gamma - 1.0_rt));
std::pow((gravity::const_grav * problem::dens_base * (eos_rp::eos_gamma - 1.0_rt) * z/
(eos_rp::eos_gamma * problem::pres_base) + 1.0_rt), 1.0_rt/(eos_rp::eos_gamma - 1.0_rt));
} else {
Real z = (static_cast<Real>(j) + 0.5_rt) * dx[AMREX_SPACEDIM-1];
density[j] = problem::dens_base * std::exp(-z/H);
Expand Down
16 changes: 8 additions & 8 deletions Exec/hydro_tests/riemann_2d/problem_initialize_state_data.H
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ void problem_initialize_state_data(int i, int j, int k,

state(i, j, k, UMX) = state(i, j, k, URHO) * problem::ux_3;
state(i, j, k, UMY) = state(i, j, k, URHO) * problem::uy_3;
state(i, j, k, UEINT) = problem::p_3 / (eos_gamma - 1.0_rt);
state(i, j, k, UEDEN) = problem::p_3 / (eos_gamma - 1.0_rt)
state(i, j, k, UEINT) = problem::p_3 / (eos_rp::eos_gamma - 1.0_rt);
state(i, j, k, UEDEN) = problem::p_3 / (eos_rp::eos_gamma - 1.0_rt)
+ 0.5 * problem::rho_3 * problem::ux_3 * problem::ux_3
+ 0.5 * problem::rho_3 * problem::uy_3 * problem::uy_3;

Expand All @@ -66,9 +66,9 @@ void problem_initialize_state_data(int i, int j, int k,

state(i, j, k, UMX) = state(i, j, k, URHO) * problem::ux_4;
state(i, j, k, UMY) = state(i, j, k, URHO) * problem::uy_4;
state(i, j, k, UEINT) = problem::p_4 / (eos_gamma - 1.0_rt);
state(i, j, k, UEINT) = problem::p_4 / (eos_rp::eos_gamma - 1.0_rt);

state(i, j, k, UEDEN) = problem::p_4 / (eos_gamma - 1.0_rt)
state(i, j, k, UEDEN) = problem::p_4 / (eos_rp::eos_gamma - 1.0_rt)
+ 0.5 * problem::rho_4 * problem::ux_4 * problem::ux_4
+ 0.5 * problem::rho_4 * problem::uy_4 * problem::uy_4;

Expand All @@ -79,9 +79,9 @@ void problem_initialize_state_data(int i, int j, int k,

state(i, j, k, UMX) = state(i, j, k, URHO) * problem::ux_2;
state(i, j, k, UMY) = state(i, j, k, URHO) * problem::uy_2;
state(i, j, k, UEINT) = problem::p_2 / (eos_gamma - 1.0_rt);
state(i, j, k, UEINT) = problem::p_2 / (eos_rp::eos_gamma - 1.0_rt);

state(i, j, k, UEDEN) = problem::p_2 / (eos_gamma - 1.0_rt)
state(i, j, k, UEDEN) = problem::p_2 / (eos_rp::eos_gamma - 1.0_rt)
+ 0.5 * problem::rho_2 * problem::ux_2 * problem::ux_2
+ 0.5 * problem::rho_2 * problem::uy_2 * problem::uy_2;
} else if (xx > problem::center[0] & yy > problem::center[1])
Expand All @@ -91,9 +91,9 @@ void problem_initialize_state_data(int i, int j, int k,

state(i, j, k, UMX) = state(i, j, k, URHO) * problem::ux_1;
state(i, j, k, UMY) = state(i, j, k, URHO) * problem::uy_1;
state(i, j, k, UEINT) = problem::p_1 / (eos_gamma - 1.0_rt);
state(i, j, k, UEINT) = problem::p_1 / (eos_rp::eos_gamma - 1.0_rt);

state(i, j, k, UEDEN) = problem::p_1 / (eos_gamma - 1.0_rt)
state(i, j, k, UEDEN) = problem::p_1 / (eos_rp::eos_gamma - 1.0_rt)
+ 0.5 * problem::rho_1 * problem::ux_1 * problem::ux_1
+ 0.5 * problem::rho_1 * problem::uy_1 * problem::uy_1;
}
Expand Down
9 changes: 4 additions & 5 deletions Exec/mhd_tests/RT/problem_initialize_state_data.H
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ void problem_initialize_state_data (int i, int j, int k,
Real pres;
if (r[AMREX_SPACEDIM-1] < problem::split[AMREX_SPACEDIM-1]) {
pres = problem::p0_base - problem::rho_1 * r[AMREX_SPACEDIM-1];
state(i,j,k,UEDEN) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEDEN) = pres / (eos_rp::eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_rp::eos_gamma - 1.0_rt);
} else {
pres = presmid - problem::rho_2 * (r[AMREX_SPACEDIM-1] - problem::split[AMREX_SPACEDIM-1]);
state(i,j,k,UEDEN) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_gamma - 1.0_rt);
state(i,j,k,UEDEN) = pres / (eos_rp::eos_gamma - 1.0_rt);
state(i,j,k,UEINT) = pres / (eos_rp::eos_gamma - 1.0_rt);
}

// doing it similar to 2d, will be something in x-z though
Expand All @@ -61,4 +61,3 @@ void problem_initialize_state_data (int i, int j, int k,

}
#endif

130 changes: 65 additions & 65 deletions Exec/science/Detonation/ci-benchmarks/sdc_det_plt00040_extrema.out
Original file line number Diff line number Diff line change
@@ -1,79 +1,79 @@
plotfile = det_x_plt00040
time = 5.1558159140336702e-06
variables minimum value maximum value
density 185259874.21 216582994.41
xmom -87234240329 2.9512596512e+16
density 185257544.55 216468146.43
xmom -37913405153 2.9568274388e+16
ymom 0 0
zmom 0 0
rho_E 1.3062473821e+26 2.7893784326e+26
rho_e 1.3062473821e+26 2.7751188263e+26
Temp 50000000.026 7845854662.6
rho_H1 2.1207307865e-22 0.020000135717
rho_He3 0.0017225013714 0.02102428438
rho_He4 94358881.486 200001799.59
rho_C12 0.020000000216 21276964.112
rho_N14 1.9999983474e-22 197.76685905
rho_O16 0.02 19209.489937
rho_Ne20 0.02 4937.0489429
rho_Mg24 0.02 23322.104606
rho_Si28 0.02 2015343.4134
rho_S32 0.02 1656264.8265
rho_Ar36 0.02 821829.69632
rho_Ca40 0.02 725030.13946
rho_Ti44 0.02 34172.699418
rho_Cr48 0.02 78131.560865
rho_Fe52 0.02 277298.50875
rho_Fe54 0.02 94994585.838
rho_Ni56 0.02 2238978.4894
rho_n 2.1207307865e-22 234580.14761
rho_p 0.019999995438 3609721.5282
rho_enuc -4.6900452682e+29 3.5791669148e+32
pressure 5.5236728651e+25 1.1610544319e+26
kineng 0 2.0455630311e+24
soundspeed 612864631.21 895226067.36
Gamma_1 1.3599756137 1.3820271358
MachNumber 0 0.16114390973
uplusc 612864631.21 999569362.18
uminusc -895226468.14 -612860078.6
entropy 98214767.758 336273451.62
rho_E 1.3062473821e+26 2.7893330499e+26
rho_e 1.3062473821e+26 2.77508064e+26
Temp 50000000.026 7845891849.2
rho_H1 2.1211722106e-22 0.020000096415
rho_He3 0.0017224293869 0.021023770747
rho_He4 94366787.107 200001406.23
rho_C12 0.020000000216 21736627.589
rho_N14 1.9999999481e-22 0.020000141427
rho_O16 0.02 21564.50879
rho_Ne20 0.02 4189.5544151
rho_Mg24 0.02 23323.799421
rho_Si28 0.02 2015729.7513
rho_S32 0.02 1656696.6915
rho_Ar36 0.02 822096.59228
rho_Ca40 0.02 724138.29448
rho_Ti44 0.02 34187.547129
rho_Cr48 0.02 78085.100557
rho_Fe52 0.02 278150.27827
rho_Fe54 0.02 94990080.243
rho_Ni56 0.02 2242328.7066
rho_n 2.1211722106e-22 234640.58163
rho_p 0.019999995438 3609403.7361
rho_enuc -4.7086157677e+29 3.5777644631e+32
pressure 5.5236728651e+25 1.1610599873e+26
kineng 0 2.0519264828e+24
soundspeed 612864631.21 895228345.47
Gamma_1 1.3599756425 1.3822442674
MachNumber 0 0.16119509216
uplusc 612864631.21 999919125.29
uminusc -895228523.09 -612861073.53
entropy 98214767.758 336273484.2
magvort 0 0
divu -97746.019905 33801.828895
eint_E 6.5312369103e+17 1.3804343879e+18
eint_e 6.5312369103e+17 1.3804343879e+18
logden 8.2677813648 8.3356243538
StateErr_0 185259874.21 216582994.41
StateErr_1 50000000.026 7845854662.6
divu -97996.218171 33763.099005
eint_E 6.5312369103e+17 1.3804410664e+18
eint_e 6.5312369103e+17 1.3804410664e+18
logden 8.2677759035 8.3353939984
StateErr_0 185257544.55 216468146.43
StateErr_1 50000000.026 7845891849.2
StateErr_2 1e-30 9.9999779324e-11
X(H1) 1e-30 9.9999779324e-11
X(He3) 8.9857380636e-12 9.9999601254e-11
X(He4) 0.48403393423 0.9999999982
X(C12) 1.0000000108e-10 0.10032845398
X(N14) 1e-30 9.3254108586e-07
X(O16) 1e-10 9.604742181e-05
X(Ne20) 1e-10 2.3279941869e-05
X(Mg24) 1e-10 0.00011116921103
X(Si28) 1e-10 0.01005607083
X(S32) 1e-10 0.0083471961707
X(Ar36) 1e-10 0.0041657025725
X(Ca40) 1e-10 0.0037098568497
X(Ti44) 1e-10 0.00017298041086
X(Cr48) 1e-10 0.00040079244474
X(Fe52) 1e-10 0.0013382570124
X(Fe54) 1e-10 0.46490351089
X(Ni56) 1e-10 0.010337739099
X(n) 1e-30 0.0011729003976
X(p) 9.9999977071e-11 0.017596365447
abar 4.000000001 6.7314014168
Ye 0.49998670317 0.50001557187
x_velocity -436.17123215 138623047.3
X(He3) 8.985892423e-12 9.9999601254e-11
X(He4) 0.48406961191 0.9999999982
X(C12) 1.0000000108e-10 0.10247460098
X(N14) 1e-30 1.0000000384e-10
X(O16) 1e-10 0.00010166316852
X(Ne20) 1e-10 1.9751128146e-05
X(Mg24) 1e-10 0.00011117683475
X(Si28) 1e-10 0.010049207028
X(S32) 1e-10 0.0083399755634
X(Ar36) 1e-10 0.0041613939849
X(Ca40) 1e-10 0.003708082998
X(Ti44) 1e-10 0.00017289116777
X(Cr48) 1e-10 0.00040055008209
X(Fe52) 1e-10 0.0013373223366
X(Fe54) 1e-10 0.46488586209
X(Ni56) 1e-10 0.010358700546
X(n) 1e-30 0.0011732028047
X(p) 9.9999977002e-11 0.017592025438
abar 4.000000001 6.7312151705
Ye 0.49998627651 0.50001570244
x_velocity -189.56702545 138792440.56
y_velocity 0 0
z_velocity 0 0
t_sound_t_enuc 3.4412406685e-13 0.97531384976
enuc -2.4936491578e+21 1.6525613771e+24
magvel 0 138623047.3
radvel -436.17123215 138623047.3
t_sound_t_enuc 3.4412406685e-13 0.97569821534
enuc -2.5034688832e+21 1.6527902706e+24
magvel 0 138792440.56
radvel -189.56702545 138792440.56
circvel 0 2
magmom 0 2.9512596512e+16
magmom 0 2.9568274388e+16
angular_momentum_x 0 0
angular_momentum_y 0 0
angular_momentum_z 0 0
Expand Down
4 changes: 2 additions & 2 deletions Exec/science/wdmerger/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ NUM_MODELS = 2
# define the location of the CASTRO top directory
CASTRO_HOME ?= ../../..

# Turn on hybrid momentum, but note that it only is used in 3D at present.
# Turn on hybrid momentum? but note that it only is used in 3D at present.

ifeq ($(DIM), 3)
USE_HYBRID_MOMENTUM ?= TRUE
USE_HYBRID_MOMENTUM ?= FALSE
endif

# Set the default integrator for the burner.
Expand Down
Loading

0 comments on commit df45ed9

Please sign in to comment.