From 15352460337ae29352739b182ae057e7e08c900c Mon Sep 17 00:00:00 2001 From: "Eric T. Johnson" Date: Mon, 18 Mar 2024 13:56:04 -0400 Subject: [PATCH] flame_wave: error out if atm_delta is too small 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. --- Exec/science/flame_wave/initial_model.H | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Exec/science/flame_wave/initial_model.H b/Exec/science/flame_wave/initial_model.H index 7deae43d94..27d7f2b5ca 100644 --- a/Exec/science/flame_wave/initial_model.H +++ b/Exec/science/flame_wave/initial_model.H @@ -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;