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 BuildingSystems.Fluid.Types.HeatExchangerFlowRegime.
function epsilon_ntuZ import f = BuildingSystems.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 BuildingSystems.Fluid.Types.HeatExchangerFlowRegime"; output Real eps(min = 0, max = 1) "Heat exchanger effectiveness"; end epsilon_ntuZ;
flowRegime
from
BuildingSystems.Fluid.Types.HeatExchangerFlowRegime
to Integer
.
This was required because this argument is passed in Dymola 2015 in the function
BuildingSystems.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.