[Transport] Relax requirements of thermo model for WaterTransport

The ThermoPhase object used by the WaterTransport model can be any
reasonably-accurate equation of state for water.
This commit is contained in:
Ray Speth 2018-08-30 10:30:32 -04:00
parent 426c2bc56e
commit 0ade0acf18

View file

@ -43,33 +43,6 @@ WaterTransport::WaterTransport(thermo_t* thermo, int ndim) :
void WaterTransport::init(thermo_t* thermo, int mode, int log_level)
{
m_thermo = thermo;
// The expectation is that we have a VPStandardStateTP derived object
VPStandardStateTP* vpthermo = dynamic_cast<VPStandardStateTP*>(m_thermo);
if (!vpthermo) {
WaterSSTP* wsstp = dynamic_cast<WaterSSTP*>(m_thermo);
if (!wsstp) {
throw CanteraError("WaterTransport::initTP()",
"Expectation is that ThermoPhase be a VPStandardStateTP");
} else {
m_sub = wsstp->getWater();
AssertTrace(m_sub != 0);
// Get a pointer to a changeable WaterProps object
m_waterProps = wsstp->getWaterProps();
AssertTrace(m_waterProps != 0);
}
} else {
m_waterPDSS = dynamic_cast<PDSS_Water*>(vpthermo->providePDSS(0));
if (!m_waterPDSS) {
throw CanteraError("WaterTransport::initTP()",
"Expectation is that first species be water with a PDSS_Water object");
}
// Get a pointer to a changeable WaterPropsIAPWS object
m_sub = m_waterPDSS->getWater();
AssertTrace(m_sub != 0);
// Get a pointer to a changeable WaterProps object
m_waterProps = m_waterPDSS->getWaterProps();
AssertTrace(m_waterProps != 0);
}
}
double WaterTransport::viscosity()