File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1323,6 +1323,15 @@ def check_chemistry(self):
13231323 # Fetch global chemistry and diffusion flags
13241324 chemistry = self .get ("chemistry" , "F" ) == "T"
13251325 diffusion = self .get ("chem_params%diffusion" , "F" ) == "T"
1326+ num_fluids = self .get ("num_fluids" )
1327+
1328+ # Chemistry assumes a single reacting gas phase: the temperature/pressure
1329+ # inversion recovers T from the total internal energy via Cantera's ideal-gas
1330+ # EOS (ignoring pi_inf), and the cons->prim conversion collapses all partial
1331+ # densities onto the species-summed total density. Both are only correct for
1332+ # num_fluids = 1; with a second (e.g. stiffened-gas) fluid the state is
1333+ # inconsistent and the simulation NaNs. See MFlowCode/MFC#1470.
1334+ self .prohibit (chemistry and num_fluids is not None and num_fluids != 1 , "chemistry is only supported for single-component flows (num_fluids = 1)" )
13261335
13271336 # Define what constitutes a wall (-15 for slip, -16 for no-slip)
13281337 wall_bcs = [- 15 , - 16 ]
You can’t perform that action at this time.
0 commit comments