Skip to content

Commit

Permalink
Removing the phase check
Browse files Browse the repository at this point in the history
  • Loading branch information
gkogekar committed Jun 22, 2023
1 parent 7f0de65 commit cdf9e8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions src/oneD/StFlow.cpp
Expand Up @@ -26,13 +26,7 @@ StFlow::StFlow(ThermoPhase* ph, size_t nsp, size_t points) :
if (ph == 0) {
return; // used to create a dummy object
}
if (ph->type() == "ideal-gas" || ph->type() == "Redlich-Kwong" ||
ph->type() == "Peng-Robinson") {
m_thermo = ph;
} else {
throw CanteraError("StFlow::StFlow", "Unsupported phase type:",
"need 'IdealGasPhase' or 'Redlich-Kwong'or 'Peng-Robinson'");
}
m_thermo = ph;

size_t nsp2 = m_thermo->nSpecies();
if (nsp2 != m_nsp) {
Expand Down
2 changes: 1 addition & 1 deletion test/python/test_onedim.py
Expand Up @@ -13,7 +13,7 @@ def test_instantiate(self):

def test_badInstantiate(self):
solid = ct.Solution("diamond.yaml", "diamond")
with pytest.raises(ct.CanteraError, match="Unsupported phase type"):
with pytest.raises(ct.CanteraError, match="An appropriate transport model\nshould be set when instantiating"):
ct.FreeFlow(solid)

def test_instantiateSurface(self):
Expand Down

0 comments on commit cdf9e8c

Please sign in to comment.