This subroutine calculates the log mean temperature difference for the detailed ice storage unit. The temperature difference is non-dimensionalized using a nominal temperature difference of 10 Kelvin. This value must be used when obtaining the curve fit coefficients.
The log mean temperature difference is calculated using
Tlmtd* = Tlmtd/Tnom
Tlmtd = (Tin - Tout)/ln((Tin - Tfre)/(Tout - Tfre))
where Tin is the inlet temperature, Tout is the outlet temperature, Tfre is the freezing temperature and Tnom is a nominal temperature difference of 10 Kelvin.
function calculateLMTDStar extends Modelica.Icons.Function; input Modelica.Units.SI.Temperature TIn "Inlet temperature"; input Modelica.Units.SI.Temperature TOut "Outlet temperature"; input Modelica.Units.SI.Temperature TFre = 273.15 "Freezing temperature of water or the latent energy storage material"; input Modelica.Units.SI.TemperatureDifference dT_nominal = 10 "Nominal temperature difference"; output Real lmtd "Normalized LMTD"; end calculateLMTDStar;