From 45c8ab12b73d926763177f3ac670eff9a299983e Mon Sep 17 00:00:00 2001 From: Jon Rood Date: Wed, 20 Dec 2023 13:35:20 -0700 Subject: [PATCH] Add triple flame test (#330) * Add triple flame test. * No 3D triple flame. * No 3D triple flame. * uninitialized variable causing issues * changes for no prob parm in spray * another spray update --------- Co-authored-by: Bruce Perry --- Exec/RegTests/CMakeLists.txt | 8 +++++--- Exec/RegTests/SprayTest/SprayParticlesInitInsert.cpp | 6 ++---- Source/PeleLMeX_Init.cpp | 3 +++ Source/PeleLMeX_SprayParticles.cpp | 10 ++++------ Tests/CMakeLists.txt | 11 ++++++----- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/Exec/RegTests/CMakeLists.txt b/Exec/RegTests/CMakeLists.txt index 7ae937db..2cc866db 100644 --- a/Exec/RegTests/CMakeLists.txt +++ b/Exec/RegTests/CMakeLists.txt @@ -3,7 +3,7 @@ if(PELELMEX_ENABLE_EB) add_subdirectory(EB_EnclosedFlame) add_subdirectory(EB_EnclosedVortex) add_subdirectory(EB_FlowPastCylinder) - if(PELELMEX_DIM GREATER 2) + if(PELELMEX_DIM EQUAL 3) add_subdirectory(EB_PipeFlow) endif() else() @@ -18,8 +18,10 @@ else() add_subdirectory(PeriodicCases) #add_subdirectory(SprayTest) add_subdirectory(TaylorGreen) - add_subdirectory(TripleFlame) - if(PELELMEX_DIM GREATER 2) + if(PELELMEX_DIM EQUAL 2) + add_subdirectory(TripleFlame) + endif() + if(PELELMEX_DIM EQUAL 3) add_subdirectory(TurbInflow) endif() #add_subdirectory(Unit) diff --git a/Exec/RegTests/SprayTest/SprayParticlesInitInsert.cpp b/Exec/RegTests/SprayTest/SprayParticlesInitInsert.cpp index ed27ad08..c98c0f84 100644 --- a/Exec/RegTests/SprayTest/SprayParticlesInitInsert.cpp +++ b/Exec/RegTests/SprayTest/SprayParticlesInitInsert.cpp @@ -8,15 +8,13 @@ SprayParticleContainer::injectParticles( amrex::Real /*dt*/, int /*nstep*/, int /*lev*/, - int /*finest_level*/, - ProbParm const& /*prob_parm*/) + int /*finest_level*/) { return false; } void -SprayParticleContainer::InitSprayParticles( - const bool init_parts, ProbParm const& prob_parm) +SprayParticleContainer::InitSprayParticles(const bool init_parts) { if (!init_parts) { return; diff --git a/Source/PeleLMeX_Init.cpp b/Source/PeleLMeX_Init.cpp index b121ed21..826c62f4 100644 --- a/Source/PeleLMeX_Init.cpp +++ b/Source/PeleLMeX_Init.cpp @@ -78,6 +78,9 @@ PeleLM::MakeNewLevelFromScratch( m_leveldatareact[lev] = std::make_unique(grids[lev], dmap[lev], *m_factory[lev]); m_leveldatareact[lev]->functC.setVal(0.0); + // Make sure this is initialized - may get used for ErrorEst when setting + // up levels but before reactions are actually computed + m_leveldatareact[lev]->I_R.setVal(0.0); } #ifdef PELE_USE_EFIELD diff --git a/Source/PeleLMeX_SprayParticles.cpp b/Source/PeleLMeX_SprayParticles.cpp index d9ff8d83..67e80549 100644 --- a/Source/PeleLMeX_SprayParticles.cpp +++ b/Source/PeleLMeX_SprayParticles.cpp @@ -167,8 +167,7 @@ PeleLM::SprayInit() Warning(warn_msg); } } - ProbParm const* lprobparm = prob_parm; - SprayPC->SprayInitialize(*lprobparm, restart_file); + SprayPC->SprayInitialize(restart_file); SprayPostRegrid(); SprayInjectRedist(); if (spray_verbose >= 1) { @@ -375,12 +374,11 @@ PeleLM::SprayInjectRedist() } bool injected = false; for (int lev = 0; lev <= finest_level; ++lev) { - int nstep = 0; // Unused - ProbParm const* lprobparm = prob_parm; + int nstep = 0; // Unused Real cur_time = m_t_new[lev]; // Still the time from the last time step Real dt = m_dt; - bool lev_injected = SprayPC->injectParticles( - cur_time, dt, nstep, lev, finest_level, *lprobparm); + bool lev_injected = + SprayPC->injectParticles(cur_time, dt, nstep, lev, finest_level); if (lev_injected) { injected = true; } diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 53a07236..ef8347cd 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -209,16 +209,17 @@ endfunction(add_test_spray) # Regression tests #============================================================================= -# Run in CI if(NOT PELELMEX_ENABLE_EB) - if(PELELMEX_ENABLE_RADIATION) - add_test_r(soot-rad-${PELELMEX_DIM}d SootRadTest) - endif() add_test_r(flamesheet-drm19-${PELELMEX_DIM}d FlameSheet) - #add_test_r(tripleflame-${PELELMEX_DIM}d TripleFlame) add_test_rv(covo-${PELELMEX_DIM}d PeriodicCases) add_test_r(hotbubble-${PELELMEX_DIM}d HotBubble) add_test_rv(enclosedflame-${PELELMEX_DIM}d EnclosedFlame) + if(PELELMEX_ENABLE_RADIATION) + add_test_r(soot-rad-${PELELMEX_DIM}d SootRadTest) + endif() + if(PELELMEX_DIM EQUAL 2) + add_test_r(tripleflame-${PELELMEX_DIM}d TripleFlame) + endif() if(PELELMEX_DIM EQUAL 3) add_test_r(hit-${PELELMEX_DIM}d HITDecay) add_test_r(hit-les-${PELELMEX_DIM}d HITDecay)