This function computes the log mean temperature difference of a heat exchanger.
Note that the implementation requires the temperature differences Ta1 - Tb2 and Tb1 - Ta2 to be not equal to each other.
function lmtd input Modelica.Units.SI.Temperature T_a1 "Temperature at port a1"; input Modelica.Units.SI.Temperature T_b1 "Temperature at port b1"; input Modelica.Units.SI.Temperature T_a2 "Temperature at port a2"; input Modelica.Units.SI.Temperature T_b2 "Temperature at port b2"; output Modelica.Units.SI.TemperatureDifference lmtd "Log-mean temperature difference"; end lmtd;