Skip to content
Snippets Groups Projects
Commit 3270be81 authored by ENRI's avatar ENRI
Browse files

add function to find second law efficiency

parent b8f71e5f
No related branches found
No related tags found
No related merge requests found
......@@ -212,3 +212,23 @@ def getCOP(self, T_source_in: float, T_sink_out: float, Q_dot_H: float, K: int =
return (Q_dot_H / self.getElectricalPower(T_source_in, T_sink_out, Q_dot_H, K))
# ====================================================================================================
def getEta_II(self, T_source_in: float, T_sink_out: float, Q_dot_H: float, K: int = 3) -> float:
"""
Calculates the interpolated second law efficiency value at the specified coordinate point.
Args:
T_source_in (float): Source temerature (in).
T_sink_out (float): Sink temperature (out).
Q_dot_H (float): Heating power.
K (int, optional): Number of neighbors to consider. Defaults to 3.
Returns:
float: Interpolated second law efficiency value.
"""
COP = self.getCOP(T_source_in, T_sink_out, Q_dot_H, K)
COP_Carnot = (T_sink_out + 273.15) / (T_sink_out - T_source_in) # in Kelvin!
return (COP / COP_Carnot)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment