From f999f1cfc0c6b3f8ddade76704de57433c400f2f Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Wed, 4 Mar 2009 01:01:57 +0000 Subject: [PATCH] Fixed an issue that arose when there was a mixed set of standard state types. --- Cantera/src/thermo/VPSSMgrFactory.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Cantera/src/thermo/VPSSMgrFactory.cpp b/Cantera/src/thermo/VPSSMgrFactory.cpp index a5a006e50..c0746c7da 100644 --- a/Cantera/src/thermo/VPSSMgrFactory.cpp +++ b/Cantera/src/thermo/VPSSMgrFactory.cpp @@ -301,9 +301,19 @@ namespace Cantera { if (iwater == 1) { if (ihptx == 0) { - vpss = new VPSSMgr_Water_ConstVol(vp_ptr, spth); + if (inasaIG || ishomateIG || isimpleIG) { + throw CanteraError("newVPSSMgr", "Ideal gas with liquid water"); + } else { + vpss = new VPSSMgr_Water_ConstVol(vp_ptr, spth); + } } else { - vpss = new VPSSMgr_Water_HKFT(vp_ptr, spth); + if (inasaIG || ishomateIG || isimpleIG) { + throw CanteraError("newVPSSMgr", "Ideal gas with liquid water"); + } else if (inasaCV || ishomateCV || isimpleCV) { + vpss = new VPSSMgr_General(vp_ptr, spth); + } else { + vpss = new VPSSMgr_Water_HKFT(vp_ptr, spth); + } } } if (vpss == 0) {