Skip to content
Merged
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
9 changes: 9 additions & 0 deletions toolchain/mfc/case_validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,15 @@ def check_chemistry(self):
# Fetch global chemistry and diffusion flags
chemistry = self.get("chemistry", "F") == "T"
diffusion = self.get("chem_params%diffusion", "F") == "T"
num_fluids = self.get("num_fluids")

# Chemistry assumes a single reacting gas phase: the temperature/pressure
# inversion recovers T from the total internal energy via Cantera's ideal-gas
# EOS (ignoring pi_inf), and the cons->prim conversion collapses all partial
# densities onto the species-summed total density. Both are only correct for
# num_fluids = 1; with a second (e.g. stiffened-gas) fluid the state is
# inconsistent and the simulation NaNs. See MFlowCode/MFC#1470.
self.prohibit(chemistry and num_fluids is not None and num_fluids != 1, "chemistry is only supported for single-component flows (num_fluids = 1)")

# Define what constitutes a wall (-15 for slip, -16 for no-slip)
wall_bcs = [-15, -16]
Expand Down
Loading