This function computes the heat exchanger effectiveness for a given number of transfer units, capacity flow ratio and heat exchanger flow regime. The different options for the flow regime are declared in IBPSA.Fluid.Types.HeatExchangerFlowRegime.
function epsilon_ntuZ import f = IBPSA.Fluid.Types.HeatExchangerFlowRegime; input Real NTU "Number of transfer units"; input Real Z(min = 0, max = 1) "Ratio of capacity flow rate (CMin/CMax)"; input Integer flowRegime "Heat exchanger flow regime, see IBPSA.Fluid.Types.HeatExchangerFlowRegime"; output Real eps(min = 0, max = 1) "Heat exchanger effectiveness"; end epsilon_ntuZ;
flowRegime
from
IBPSA.Fluid.Types.HeatExchangerFlowRegime
to Integer
.
This was required because this argument is passed in Dymola 2015 in the function
IBPSA.Fluid.HeatExchangers.BaseClasses.epsilon_C
as an integer. Without this change, a translation warning occurs.
assert
statement as OpenModelica
had an error when comparing enumerations with integers.