function LMTD extends Modelica.Icons.Function; input SI.Temperature T_hi "Hot stream inlet temperature"; input SI.Temperature T_ho "Hot stream outlet temperature"; input SI.Temperature T_ci "Cold stream inlet temperature"; input SI.Temperature T_co "Cold stream outlet temperature"; input Boolean counterCurrent "=true then flow counter current else parallel flow"; output SI.TemperatureDifference dT_lm "Log mean temperature difference"; output SI.TemperatureDifference dT_1 "Temperature difference 1 of LMTD"; output SI.TemperatureDifference dT_2 "Temperature difference 2 of LMTD"; end LMTD;