diff --git a/Exec/science/xrb_layered/inputs_2d b/Exec/science/xrb_layered/inputs_2d index b162535507..2992aacaf8 100644 --- a/Exec/science/xrb_layered/inputs_2d +++ b/Exec/science/xrb_layered/inputs_2d @@ -79,6 +79,9 @@ problem.model_name = "toy_atm_hot_3cm.hse" problem.apply_perturbation = 1 +problem.H_min = 1.e-5 +problem.He_min = 1.e-5 + problem.model_shift = 750.0 # MICROPHYSICS diff --git a/Exec/science/xrb_layered/inputs_2d.nonsquare b/Exec/science/xrb_layered/inputs_2d.nonsquare index c696f1d526..2782d5aa7f 100644 --- a/Exec/science/xrb_layered/inputs_2d.nonsquare +++ b/Exec/science/xrb_layered/inputs_2d.nonsquare @@ -62,7 +62,7 @@ amr.v = 1 # verbosity in Amr.cpp # REFINEMENT / REGRIDDING amr.max_level = 1 # maximum level number allowed -amr.ref_ratio = 4 2 2 2 # refinement ratio +amr.ref_ratio = 2 2 2 2 # refinement ratio amr.regrid_int = 2 2 2 2 # how often to regrid amr.blocking_factor = 8 # block factor in grid generation amr.max_grid_size = 256 @@ -74,7 +74,7 @@ amr.check_int = 1000 # number of timesteps between checkpoints # PLOTFILES amr.plot_file = xrb_plt # root name of plotfile -amr.plot_int = 1000 # number of timesteps between plotfiles +amr.plot_per = 0.001 amr.derive_plot_vars = ALL # PROBLEM PARAMETERS @@ -84,11 +84,13 @@ problem.apply_perturbation = 1 problem.model_shift = 750.0 -problem.H_min = 1.e-5 -problem.He_min = 1.e-5 +problem.H_min = -1 +problem.He_min = -1 # MICROPHYSICS integrator.jacobian = 1 integrator.atol_spec = 1.e-6 integrator.rtol_spec = 1.e-6 + +integrator.X_reject_buffer = 4.0 diff --git a/Exec/science/xrb_layered/inputs_3d.nonsquare b/Exec/science/xrb_layered/inputs_3d.nonsquare index dd22b03c66..a0289b408e 100644 --- a/Exec/science/xrb_layered/inputs_3d.nonsquare +++ b/Exec/science/xrb_layered/inputs_3d.nonsquare @@ -74,7 +74,7 @@ amr.check_int = 1000 # number of timesteps between checkpoints # PLOTFILES amr.plot_file = xrb_plt # root name of plotfile -amr.plot_per = 0.001 # number of timesteps between plotfiles +amr.plot_per = 0.001 amr.derive_plot_vars = ALL amr.small_plot_file = xrb_smallplt # root name of plotfile @@ -100,6 +100,4 @@ integrator.jacobian = 1 integrator.atol_spec = 1.e-6 integrator.rtol_spec = 1.e-6 -integrator.linalg_do_pivoting = 0 - integrator.X_reject_buffer = 4.0 diff --git a/Exec/science/xrb_layered/problem_initialize_state_data.H b/Exec/science/xrb_layered/problem_initialize_state_data.H index 3eb8db2ecd..0f7366f52d 100644 --- a/Exec/science/xrb_layered/problem_initialize_state_data.H +++ b/Exec/science/xrb_layered/problem_initialize_state_data.H @@ -36,7 +36,11 @@ void problem_initialize_state_data (int i, int j, int k, height += problem::model_shift; state(i,j,k,URHO) = interpolate(height, model::idens); - state(i,j,k,UTEMP) = interpolate(height, model::itemp); + state(i,j,k,UTEMP) = interpolate(height, model::itemp); // this will be an initial guess + Real p_zone = interpolate(height, model::ipres); + + // interpolate species as mass fractions and make sure they sum to + // 1. Later we will convert to densities. Real sumX{0.0}; for (int n = 0; n < NumSpec; ++n) { @@ -44,7 +48,6 @@ void problem_initialize_state_data (int i, int j, int k, sumX += state(i,j,k,UFS+n); } - // make sure the species sum to 1 for (int n = 0; n < NumSpec; ++n) { state(i,j,k,UFS+n) /= sumX; } @@ -52,12 +55,15 @@ void problem_initialize_state_data (int i, int j, int k, eos_t eos_state; eos_state.rho = state(i,j,k,URHO); eos_state.T = state(i,j,k,UTEMP); + eos_state.p = p_zone; + for (int n = 0; n < NumSpec; n++) { eos_state.xn[n] = state(i,j,k,UFS+n); } - eos(eos_input_rt, eos_state); + eos(eos_input_rp, eos_state); + state(i,j,k,UTEMP) = eos_state.T; state(i,j,k,UEINT) = state(i,j,k,URHO) * eos_state.e; state(i,j,k,UEDEN) = state(i,j,k,UEINT);