function calculateEfficiency
extends Modelica.Icons.Function;
replaceable package MediumA = Media.myMedia.Interfaces.PartialMedium "Medium model A";
replaceable package MediumB = Media.myMedia.Interfaces.PartialMedium "Medium model B";
input MediumA.ThermodynamicState state_A_in "Inlet A thermodynamic state";
input MediumB.ThermodynamicState state_B_in "Inlet B thermodynamic state";
input MediumA.ThermodynamicState state_A_out "Outlet A thermodynamic state";
input MediumB.ThermodynamicState state_B_out "Outlet B thermodynamic state";
input SI.MassFlowRate m_flow_A "Mass flow rate of medium A";
input SI.MassFlowRate m_flow_B "Mass flow rate of medium B";
input SI.Power Q_flow "Heat flow rate";
output Real efficiency(unit = "1") = 0 "Heat exchanger efficiency";
end calculateEfficiency;