Skip to content

Commit

Permalink
flame_wave: error out if atm_delta is too small
Browse files Browse the repository at this point in the history
If atm_delta is significantly smaller than the finest-level resolution,
the peak temperature gets reset to T_star instead of T_hi, and the hot
and cool zones end up with the same temperature profiles. I'm not
entirely sure how it happens, and it's probably fixable, but we
shouldn't be doing any actual runs with such a low resolution anyways.
I only ran into this when I was using a single level for local testing.
  • Loading branch information
yut23 committed Mar 18, 2024
1 parent 3a32318 commit 1535246
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Exec/science/flame_wave/initial_model.H
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ generate_initial_model(const int npts_model, const Real xmin, const Real xmax,
for (int i = index_base+1; i < npts_model; i++) {

if ((model::profile(model_num).r(i) > xmin + model_params.H_star + 3.0_rt * model_params.atm_delta) && !flipped) {
if (i == index_base + 1) {
amrex::Error("atm_delta is too small for the grid spacing (at least one transition zone is required)");
}
isentropic = true;
flipped = true;

Expand Down

0 comments on commit 1535246

Please sign in to comment.