Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update flame_wave and flame_tube to infer the model's dx #2610

Merged
merged 4 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Exec/science/flame_tube/_prob_params
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ cutoff_density real 500.e0_rt y
# used if we are refining based on height rather than density
refine_height real 3600 y

dx_model real 10.0_rt y

T_hi real 5.e8_rt y

T_star real 1.e8_rt y
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ problem.dtemp = 1.1e9
problem.x_half_max = 1.4336e5
problem.x_half_width = 2048.e0

problem.dx_model = 25.e0

problem.dens_base = 3.43e6

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

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

// 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]) /
problem::dx_model);
dx_model);

int ng = 4;

Expand All @@ -164,7 +171,7 @@ void problem_initialize ()
model_params.low_density_cutoff = problem::low_density_cutoff;

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

Expand All @@ -174,7 +181,7 @@ void problem_initialize ()
model_params.T_hi = model_params.T_hi + problem::dtemp;

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

Expand Down
2 changes: 0 additions & 2 deletions Exec/science/flame_wave/_prob_params
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ cutoff_density real 500.e0_rt y
# used if we are refining based on height rather than density
refine_height real 3600 y

dx_model real 10.0_rt y

T_hi real 5.e8_rt y

T_star real 1.e8_rt y
Expand Down
6 changes: 3 additions & 3 deletions Exec/science/flame_wave/ci-benchmarks/grid_diag.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# COLUMN 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
# TIMESTEP TIME MASS XMOM YMOM ZMOM ANG. MOM. X ANG. MOM. Y ANG. MOM. Z KIN. ENERGY INT. ENERGY GAS ENERGY GRAV. ENERGY TOTAL ENERGY CENTER OF MASS X-LOC CENTER OF MASS Y-LOC CENTER OF MASS Z-LOC CENTER OF MASS X-VEL CENTER OF MASS Y-VEL CENTER OF MASS Z-VEL MAXIMUM TEMPERATURE MAXIMUM DENSITY MAXIMUM T_S / T_E
0 0.0000000000000000 1.7166788475340266e+20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 3.5939094484738719e+37 3.5939094484738719e+37 0.0000000000000000e+00 3.5939094484738719e+37 2.7306358373068455e+04 7.1254231429487743e+02 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 1.3624032936555479e+09 3.4338407089146405e+07 0.0000000000000000e+00
1 5.8556067872049896e-08 1.7166803365487749e+20 3.1513080056552834e+23 9.4393200694787844e+22 1.1594142580066235e+20 3.0429100322420758e+23 -2.4950450852816581e+24 2.1763212264094320e+27 7.5396363801382249e+29 3.5939161397498158e+37 3.5939162151461684e+37 0.0000000000000000e+00 3.5939162151461684e+37 2.7306358430778862e+04 7.1254177204721316e+02 0.0000000000000000e+00 1.8356987836131991e+03 5.4985892647058881e+02 6.7538156832245033e-01 1.3624647490176616e+09 3.4338736190485746e+07 3.6445955141358745e-04
2 1.2296774253130479e-07 1.7166821577112987e+20 6.6177191170323842e+23 2.0512769235398071e+23 5.1128643454995517e+20 1.3418692305260181e+24 -1.1002931760262338e+25 4.7588171847234185e+27 2.8702315944527227e+30 3.5939240430622091e+37 3.5939243300853715e+37 0.0000000000000000e+00 3.5939243300853715e+37 2.7306358617303569e+04 7.1254115608754830e+02 0.0000000000000000e+00 3.8549472232269291e+03 1.1949078134968177e+03 2.9783407036256984e+00 1.3628615188920422e+09 3.4339036354304597e+07 3.6432541942946792e-04
0 0.0000000000000000 1.4902024346464787e+20 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 2.9583337617665660e+37 2.9583337617665660e+37 0.0000000000000000e+00 2.9583337617665660e+37 2.7306640614148750e+04 6.8067773166795473e+02 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00 1.0000000000156899e+08 3.1017131702472486e+07 0.0000000000000000e+00
1 5.9694928185132600e-08 1.4902038799260451e+20 -9.8852813993167483e+18 7.0758681407801181e+23 -3.7077151117729030e+15 -7.8559831399077499e+18 7.9789428545426686e+19 1.9321854546506737e+28 2.7622571688141327e+29 2.9583392229687520e+37 2.9583392505913144e+37 0.0000000000000000e+00 2.9583392505913144e+37 2.7306640614147251e+04 6.8067725884159722e+02 0.0000000000000000e+00 -6.6335093690719216e-02 4.7482550784469004e+03 -2.4880589573803199e-05 1.0000972452748042e+08 3.1017431302318867e+07 1.9852339015703824e-12
2 1.2535934918877847e-07 1.4902056479398973e+20 -2.0759055840781603e+19 1.4862415462814482e+24 -1.6351019859135748e+16 -3.4644556495600996e+19 3.5187152213757382e+20 4.0584338401784393e+28 5.5823502529134965e+29 2.9583452181108320e+37 2.9583452739343134e+37 0.0000000000000000e+00 2.9583452739343134e+37 2.7306640614140473e+04 6.8067697458181988e+02 0.0000000000000000e+00 -1.3930329595435043e-01 9.9733989623249036e+03 -1.0972324445112568e-04 1.0003863648020169e+08 3.1017667549506564e+07 1.9917944188178796e-12
6 changes: 3 additions & 3 deletions Exec/science/flame_wave/ci-benchmarks/species_diag.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# COLUMN 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# TIMESTEP TIME Mass He4 Mass C12 Mass O16 Mass Ne20 Mass Mg24 Mass Si28 Mass S32 Mass Ar36 Mass Ca40 Mass Ti44 Mass Cr48 Mass Fe52 Mass Ni56
0 0.0000000000000000 2.5645624865668260e-15 8.6334683437635802e-24 8.6334683437635802e-24 8.6334683437635802e-24 8.6334683437635802e-24 8.6334683437635802e-24 8.6334683437635802e-24 8.6334683437635802e-24 8.6334683437635802e-24 8.6334683437635802e-24 8.6334683437635802e-24 8.6334683437635802e-24 8.3770120959700128e-14
1 5.8556067872049896e-08 2.5645578286513752e-15 4.6665255832439506e-21 8.6562660805528712e-24 8.6336501283765672e-24 8.6337820442917443e-24 8.6336288504892702e-24 8.6334771304039403e-24 8.6334762294436341e-24 8.6334758774059056e-24 8.6334758341207285e-24 8.6334758323582423e-24 8.6334758322823700e-24 8.3770195844770875e-14
2 1.2296774253130479e-07 2.5645527047252351e-15 9.7903839457371030e-21 8.7227655843562583e-24 8.6345746607885893e-24 8.6341379740187793e-24 8.6338084924592057e-24 8.6334877300430889e-24 8.6334858256111406e-24 8.6334850860340439e-24 8.6334849950921394e-24 8.6334849913892147e-24 8.6334849912298103e-24 8.3770287434115241e-14
0 0.0000000000000000 3.5899765861250859e-15 7.4944801491560746e-24 7.4944801491560746e-24 7.4944801491560746e-24 7.4944801491560746e-24 7.4944801491560746e-24 7.4944801491560746e-24 7.4944801491560746e-24 7.4944801491560746e-24 7.4944801491560746e-24 7.4944801491560746e-24 7.4944801491560746e-24 7.1354824912929246e-14
1 5.9694928185132600e-08 3.5899765861251656e-15 7.4944874211898590e-24 7.4944874177116286e-24 7.4944874177116286e-24 7.4944874177116286e-24 7.4944874177116286e-24 7.4944874177116286e-24 7.4944874177116286e-24 7.4944874177116286e-24 7.4944874177116286e-24 7.4944874177116286e-24 7.4944874177116286e-24 7.1354897598484802e-14
2 1.2535934918877847e-07 3.5899765861253060e-15 7.4944963166333664e-24 7.4944963093524191e-24 7.4944963093524191e-24 7.4944963093524191e-24 7.4944963093524191e-24 7.4944963093524191e-24 7.4944963093524191e-24 7.4944963093524191e-24 7.4944963093524191e-24 7.4944963093524191e-24 7.4944963093524191e-24 7.1354986514892610e-14
2 changes: 0 additions & 2 deletions Exec/science/flame_wave/inputs_2d.testsuite
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ problem.dtemp = 1.2e9
problem.x_half_max = 2.048e4
problem.x_half_width = 2048.e0

problem.dx_model = 20.e0

problem.dens_base = 3.43e6

problem.T_star = 1.e8
Expand Down
2 changes: 0 additions & 2 deletions Exec/science/flame_wave/inputs_3d.testsuite
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ problem.dtemp = 1.2e9
problem.x_half_max = 2.048e4
problem.x_half_width = 2048.e0

problem.dx_model = 20.e0

problem.dens_base = 3.43e6

problem.T_star = 1.e8
Expand Down
2 changes: 0 additions & 2 deletions Exec/science/flame_wave/inputs_3d.testsuite.gpu
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ problem.dtemp = 1.2e9
problem.x_half_max = 2.048e4
problem.x_half_width = 2048.e0

problem.dx_model = 20.e0

problem.dens_base = 3.43e6

problem.T_star = 1.e8
Expand Down
2 changes: 0 additions & 2 deletions Exec/science/flame_wave/inputs_H_He/inputs.H_He.1000Hz
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ problem.dtemp = 1.2e9
problem.x_half_max = 6.144e4
problem.x_half_width = 2048.e0

problem.dx_model = 30.e0

problem.dens_base = 1.e6

castro.hse_fixed_temp = 1.e8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ problem.dtemp = 1.1e9
problem.x_half_max = 6.144e4
problem.x_half_width = 2048.e0

problem.dx_model = 20.e0

problem.dens_base = 2.e6

castro.hse_fixed_temp = 3.e8 # this should match problem.T_star
Expand Down
2 changes: 0 additions & 2 deletions Exec/science/flame_wave/inputs_H_He/inputs.H_He.500Hz
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,6 @@ problem.dtemp = 1.2e9
problem.x_half_max = 6.144e4
problem.x_half_width = 2048.e0

problem.dx_model = 30.e0

problem.dens_base = 1.e6

castro.hse_fixed_temp = 1.e8
Expand Down
2 changes: 0 additions & 2 deletions Exec/science/flame_wave/inputs_He/inputs.He.1000Hz
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ problem.dtemp = 1.2e9
problem.x_half_max = 4.096e4
problem.x_half_width = 2048.e0

problem.dx_model = 20.e0

problem.dens_base = 3.43e6

problem.T_star = 1.e8
Expand Down
2 changes: 0 additions & 2 deletions Exec/science/flame_wave/inputs_He/inputs.He.250Hz
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ problem.dtemp = 1.2e9
problem.x_half_max = 4.096e4
problem.x_half_width = 2048.e0

problem.dx_model = 20.e0

problem.dens_base = 3.43e6

problem.T_star = 1.e8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ problem.dtemp = 1.1e9
problem.x_half_max = 4.096e4
problem.x_half_width = 2048.e0

problem.dx_model = 25.e0

problem.dens_base = 3.43e6

problem.T_star = 3.e8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ problem.dtemp = 1.1e9
problem.x_half_max = 4.096e4
problem.x_half_width = 2048.e0

problem.dx_model = 25.e0

problem.dens_base = 3.43e6

problem.T_star = 3.e8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ problem.dtemp = 1.1e9
problem.x_half_max = 4.096e4
problem.x_half_width = 2048.e0

problem.dx_model = 25.e0

problem.dens_base = 3.43e6

problem.T_star = 3.e8
Expand Down
2 changes: 0 additions & 2 deletions Exec/science/flame_wave/inputs_He/inputs.He.500Hz
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,6 @@ problem.dtemp = 1.2e9
problem.x_half_max = 4.096e4
problem.x_half_width = 2048.e0

problem.dx_model = 20.e0

problem.dens_base = 3.43e6

problem.T_star = 1.e8
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,6 @@ problem.dtemp = 1.2e9
problem.x_half_max = 2.56e4
problem.x_half_width = 2048.e0

problem.dx_model = 25.e0

problem.dens_base = 3.43e6

problem.T_star = 2.e8
Expand Down
12 changes: 9 additions & 3 deletions Exec/science/flame_wave/problem_initialize.H
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,14 @@ void problem_initialize ()
// lower boundary, we'll add 4 ghostcells to this, so we need to
// compute dx

// 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]) /
problem::dx_model);
dx_model);

int ng = 4;

Expand All @@ -164,7 +170,7 @@ void problem_initialize ()
model_params.low_density_cutoff = problem::low_density_cutoff;

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

Expand All @@ -174,7 +180,7 @@ void problem_initialize ()
model_params.T_hi = model_params.T_hi + problem::dtemp;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ problem.dtemp = 1.2e9
problem.x_half_max = 4.096e4
problem.x_half_width = 2048.e0

problem.dx_model = 25.e0

problem.dens_base = 3.43e6

problem.T_star = 1.e8
Expand Down