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

add error check on pressure matching for Manifold EOS #448

Merged
merged 1 commit into from
Dec 13, 2024
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
1 change: 1 addition & 0 deletions Source/PeleLMeX.H
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ public:
* parameters.
*/
void checkRunParams();
void checkSetupParams();

//-----------------------------------------------------------------------------
// REGRID / LOAD BALANCE
Expand Down
32 changes: 25 additions & 7 deletions Source/PeleLMeX_Setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ PeleLM::Setup()

// Initialize active control
initActiveControl();

// Check setup parameters
checkSetupParams();
}

void
Expand Down Expand Up @@ -748,6 +751,18 @@ PeleLM::readParameters()
}
#endif

// -----------------------------------------
// External Sources
// -----------------------------------------
m_user_defined_ext_sources = false;
m_ext_sources_SDC = false; // TODO: add capability to update ext_srcs in SDC
pp.query("user_defined_ext_sources", m_user_defined_ext_sources);
}

void
PeleLM::checkSetupParams()
{
BL_PROFILE("PeleLMeX::checkSetupParams()");
// Ensure unsupported physics is not used with manifiold models
if (pele::physics::PhysicsType::eos_type::identifier() == "Manifold") {
if (m_closed_chamber != 0) {
Expand All @@ -772,15 +787,18 @@ PeleLM::readParameters()
#endif
#ifdef PELE_USE_EFIELD
amrex::Abort("Efield models are not yet supported for Manifold EOS");
#endif
#ifdef USE_MANIFOLD_EOS
if (
std::abs(
(0.1 * eos_parms.host_parm().Pnom_cgs - prob_parm->P_mean) /
prob_parm->P_mean) > 1e-6) {
amrex::Abort("For Manifold EOS, pressure in manifold model "
"(manifold.nominal_pressure_cgs) and pressure in PeleLMeX "
"(prob.Pmean) must match");
}
#endif
}

// -----------------------------------------
// External Sources
// -----------------------------------------
m_user_defined_ext_sources = false;
m_ext_sources_SDC = false; // TODO: add capability to update ext_srcs in SDC
pp.query("user_defined_ext_sources", m_user_defined_ext_sources);
}

void
Expand Down
Loading