From ae1f033e5c8cb41d6cdd1db156071cec5de2d089 Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Mon, 27 Apr 2015 19:02:27 -0600 Subject: [PATCH] Fix W = 0 for HAPropsSI; closes #628 --- src/HumidAirProp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/HumidAirProp.cpp b/src/HumidAirProp.cpp index a2bb0bc3..932aa3f8 100644 --- a/src/HumidAirProp.cpp +++ b/src/HumidAirProp.cpp @@ -76,24 +76,28 @@ static double MM_Water(void) static double B_Air(double T) { check_fluid_instantiation(); + Air->specify_phase(CoolProp::iphase_gas); Air->update(CoolProp::DmolarT_INPUTS,1e-12,T); return Air->keyed_output(CoolProp::iBvirial); } static double dBdT_Air(double T) { check_fluid_instantiation(); + Air->specify_phase(CoolProp::iphase_gas); Air->update(CoolProp::DmolarT_INPUTS,1e-12,T); return Air->keyed_output(CoolProp::idBvirial_dT); } static double B_Water(double T) { check_fluid_instantiation(); + Water->specify_phase(CoolProp::iphase_gas); Water->update(CoolProp::DmolarT_INPUTS,1e-12,T); return Water->keyed_output(CoolProp::iBvirial); } static double dBdT_Water(double T) { check_fluid_instantiation(); + Water->specify_phase(CoolProp::iphase_gas); Water->update(CoolProp::DmolarT_INPUTS,1e-12,T); return Water->keyed_output(CoolProp::idBvirial_dT); }