From 0b9cbadf044f99874090bb2ad76ef57373672387 Mon Sep 17 00:00:00 2001 From: Ian Bell Date: Mon, 20 Jul 2015 19:28:59 -0600 Subject: [PATCH] when wet bulb is given and dry air, decrease max temperature in solver; closes #727 --- src/HumidAirProp.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/HumidAirProp.cpp b/src/HumidAirProp.cpp index 7fbd4634..cd28cfdc 100644 --- a/src/HumidAirProp.cpp +++ b/src/HumidAirProp.cpp @@ -1522,6 +1522,10 @@ void _HAPropsSI_inputs(double p, const std::vector &input_keys, const st if (MainInputKey == GIVEN_RH){ if (MainInputValue < 1e-10){ T_max = 1000; + // For wetbulb, has to be below critical temp + if (SecondaryInputKey == GIVEN_TWB){ + T_max = 600; + } } else{ T_max = CoolProp::PropsSI("T","P",p,"Q",0,"Water") - 1;