Skip to content

Commit

Permalink
update convective_flame, bubble_convergence, and hse_convergence
Browse files Browse the repository at this point in the history
these now get the model size from the_amr_ptr
  • Loading branch information
zingale committed Oct 9, 2023
1 parent ede7732 commit 06a060c
Show file tree
Hide file tree
Showing 19 changed files with 34 additions and 37 deletions.
2 changes: 0 additions & 2 deletions Exec/gravity_tests/hse_convergence/_prob_params
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

nx_model integer 128 y

dens_base real 1.0_rt y

temp_base real 1.0_rt y
Expand Down
2 changes: 0 additions & 2 deletions Exec/gravity_tests/hse_convergence/inputs.ppm.128
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,5 @@ amr.derive_plot_vars = ALL
problem.dens_base = 1.e7
problem.temp_base = 1.0e8

problem.nx_model = 128

# MICROPHYSICS
network.small_x = 1.e-10
2 changes: 0 additions & 2 deletions Exec/gravity_tests/hse_convergence/inputs.ppm.256
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,5 @@ amr.derive_plot_vars = ALL
problem.dens_base = 1.e7
problem.temp_base = 1.0e8

problem.nx_model = 256

# MICROPHYSICS
network.small_x = 1.e-10
2 changes: 0 additions & 2 deletions Exec/gravity_tests/hse_convergence/inputs.ppm.512
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,5 @@ amr.derive_plot_vars = ALL
problem.dens_base = 1.e7
problem.temp_base = 1.0e8

problem.nx_model = 512

# MICROPHYSICS
network.small_x = 1.e-10
2 changes: 0 additions & 2 deletions Exec/gravity_tests/hse_convergence/inputs.ppm.64
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,5 @@ amr.derive_plot_vars = ALL
problem.dens_base = 1.e7
problem.temp_base = 1.0e8

problem.nx_model = 64

# MICROPHYSICS
network.small_x = 1.e-10
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,5 @@ amr.derive_plot_vars = ALL
problem.dens_base = 1.e7
problem.temp_base = 1.0e8

problem.nx_model = 256

# MICROPHYSICS
network.small_x = 1.e-10
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,5 @@ amr.derive_plot_vars = ALL
problem.dens_base = 1.e7
problem.temp_base = 1.0e8

problem.nx_model = 256

# MICROPHYSICS
network.small_x = 1.e-10
12 changes: 11 additions & 1 deletion Exec/gravity_tests/hse_convergence/problem_initialize.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <model_parser.H>
#include <initial_model.H>
#include <network.H>
#include <global.H>

AMREX_INLINE
void problem_initialize ()
Expand Down Expand Up @@ -38,10 +39,19 @@ void problem_initialize ()

int nbuf = 8;

// we use the fine grid dx for the model resolution
auto fine_geom = global::the_amr_ptr->Geom(global::the_amr_ptr->maxLevel());

auto dx = fine_geom.CellSizeArray();
auto dx_model = dx[AMREX_SPACEDIM-1];

int nx_model = static_cast<int>((probhi[AMREX_SPACEDIM-1] -
problo[AMREX_SPACEDIM-1] + 1.e-8_rt) / dx_model);

// generate the initial model -- it will be stored in the model
// parser global data

generate_initial_model(problem::nx_model,
generate_initial_model(nx_model,
problo[AMREX_SPACEDIM-1], probhi[AMREX_SPACEDIM-1],
model_params, nbuf);

Expand Down
2 changes: 0 additions & 2 deletions Exec/reacting_tests/bubble_convergence/_prob_params
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@

nx_model integer 128 y

dens_base real 1.0_rt y

temp_base real 1.0_rt y
Expand Down
2 changes: 0 additions & 2 deletions Exec/reacting_tests/bubble_convergence/inputs_2d.128
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ problem.pert_width = 2.56e5
problem.dens_base = 1.e7
problem.temp_base = 1.0e8

problem.nx_model = 128

problem.do_pert = 1

# Refinement
Expand Down
2 changes: 0 additions & 2 deletions Exec/reacting_tests/bubble_convergence/inputs_2d.256
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ problem.pert_width = 2.56e5
problem.dens_base = 1.e7
problem.temp_base = 1.0e8

problem.nx_model = 256

problem.do_pert = 1

# Refinement
Expand Down
2 changes: 0 additions & 2 deletions Exec/reacting_tests/bubble_convergence/inputs_2d.32
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ problem.pert_width = 2.56e5
problem.dens_base = 1.e7
problem.temp_base = 1.0e8

problem.nx_model = 32

problem.do_pert = 1

amr.refinement_indicators = temperr tempgrad
Expand Down
2 changes: 0 additions & 2 deletions Exec/reacting_tests/bubble_convergence/inputs_2d.512
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ problem.pert_width = 2.56e5
problem.dens_base = 1.e7
problem.temp_base = 1.0e8

problem.nx_model = 512

problem.do_pert = 1


Expand Down
2 changes: 0 additions & 2 deletions Exec/reacting_tests/bubble_convergence/inputs_2d.64
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ problem.pert_width = 2.56e5
problem.dens_base = 1.e7
problem.temp_base = 1.0e8

problem.nx_model = 64

problem.do_pert = 1

# Refinement
Expand Down
13 changes: 12 additions & 1 deletion Exec/reacting_tests/bubble_convergence/problem_initialize.H
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <model_parser.H>
#include <initial_model.H>
#include <network.H>
#include <global.H>

AMREX_INLINE
void problem_initialize ()
Expand Down Expand Up @@ -41,7 +42,17 @@ void problem_initialize ()
// generate the initial model -- it will be stored in the model
// parser global data

generate_initial_model(problem::nx_model,
// we use the fine grid dx for the model resolution
auto fine_geom = global::the_amr_ptr->Geom(global::the_amr_ptr->maxLevel());

auto dx = fine_geom.CellSizeArray();
auto dx_model = dx[AMREX_SPACEDIM-1];

int nx_model = static_cast<int>((probhi[AMREX_SPACEDIM-1] -
problo[AMREX_SPACEDIM-1] + 1.e-8_rt) / dx_model);


generate_initial_model(nx_model,
problo[AMREX_SPACEDIM-1], probhi[AMREX_SPACEDIM-1],
model_params, nbuf);

Expand Down
2 changes: 0 additions & 2 deletions Exec/science/convective_flame/_prob_params
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ refine_cutoff_frac real 0.5_rt y

refine_cutoff_height real 0.0_rt

nx_model integer 128 y

T_hi real 5.e8_rt y

T_star real 1.e8_rt y
Expand Down
2 changes: 0 additions & 2 deletions Exec/science/convective_flame/inputs.2d.testsuite
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ problem.cutoff_density = 1.e-8

problem.dtemp = 1.0

problem.nx_model = 768

problem.dens_base = 1.0

problem.T_star = 0.75
Expand Down
2 changes: 0 additions & 2 deletions Exec/science/convective_flame/inputs.2d_good
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ problem.cutoff_density = 1.e-8

problem.dtemp = 2.0

problem.nx_model = 768

problem.dens_base = 1.0

problem.T_star = 0.75
Expand Down
14 changes: 11 additions & 3 deletions Exec/science/convective_flame/problem_initialize.H
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <model_parser.H>
#include <initial_model.H>
#include <ambient.H>
#include <global.H>

AMREX_INLINE
void problem_initialize ()
Expand Down Expand Up @@ -123,7 +124,14 @@ void problem_initialize ()
// lower boundary, we'll add 4 ghostcells to this, so we need to
// compute dx

Real dx_model = (probhi[AMREX_SPACEDIM-1] - problo[AMREX_SPACEDIM-1]) / problem::nx_model;
// we use the fine grid dx for the model resolution
auto fine_geom = global::the_amr_ptr->Geom(global::the_amr_ptr->maxLevel());

auto dx = fine_geom.CellSizeArray();
auto dx_model = dx[AMREX_SPACEDIM-1];

int nx_model = static_cast<int>((probhi[AMREX_SPACEDIM-1] -
problo[AMREX_SPACEDIM-1] + 1.e-8_rt) / dx_model);

int ng = 4;

Expand All @@ -139,7 +147,7 @@ void problem_initialize ()

model_params.low_density_cutoff = problem::low_density_cutoff;

generate_initial_model(problem::nx_model + ng,
generate_initial_model(nx_model + ng,
problo[AMREX_SPACEDIM-1] - ng * dx_model,
probhi[AMREX_SPACEDIM-1],
model_params, 0);
Expand All @@ -149,7 +157,7 @@ void problem_initialize ()

model_params.T_hi = model_params.T_hi + problem::dtemp;

generate_initial_model(problem::nx_model + ng,
generate_initial_model(nx_model + ng,
problo[AMREX_SPACEDIM-1] - ng * dx_model,
probhi[AMREX_SPACEDIM-1],
model_params, 1);
Expand Down

0 comments on commit 06a060c

Please sign in to comment.