-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add COP and EER calculation to models
- Loading branch information
fabian.wuellhorst
committed
Oct 8, 2023
1 parent
165c212
commit ec91f38
Showing
8 changed files
with
83 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
...Pumps/ModularReversible/RefrigerantCycle/BaseClasses/CalculateCoefficientOfPerformance.mo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
within IBPSA.Fluid.HeatPumps.ModularReversible.RefrigerantCycle.BaseClasses; | ||
model CalculateCoefficientOfPerformance | ||
"Calculate the COP or EER of a device" | ||
|
||
parameter Modelica.Units.SI.Power PEleMin(min=Modelica.Constants.eps) | ||
"If eletrical power consumption falls below this value, COP will not be calculated"; | ||
|
||
Modelica.Blocks.Interfaces.RealInput PEle(final unit="W", final displayUnit="kW") | ||
"Electrical power consumed by the system" annotation (Placement( | ||
transformation(extent={{-140,-60},{-100,-20}}), iconTransformation(extent= | ||
{{-140,-60},{-100,-20}}))); | ||
Modelica.Blocks.Interfaces.RealInput QUse_flow(final unit="W", final | ||
displayUnit="kW") "Useful heat flow" annotation (Placement(transformation( | ||
extent={{-140,20},{-100,60}}), iconTransformation(extent={{-140,20},{-100, | ||
60}}))); | ||
Modelica.Blocks.Interfaces.RealOutput COP "Output for calculated COP value" | ||
annotation (Placement(transformation(extent={{100,-10},{120,10}}))); | ||
Modelica.Blocks.Logical.Hysteresis hys(uLow=PEleMin, uHigh=PEleMin*1.1) | ||
"Hysteresis to switch between calculation and no calculation" | ||
annotation (Placement(transformation(extent={{-60,-50},{-40,-30}}))); | ||
equation | ||
if hys.y then | ||
COP = QUse_flow/PEle; | ||
else | ||
COP = 0; | ||
end if; | ||
|
||
|
||
connect(hys.u, PEle) | ||
annotation (Line(points={{-62,-40},{-120,-40}}, color={0,0,127})); | ||
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram( | ||
coordinateSystem(preserveAspectRatio=false)), | ||
Documentation(revisions="<html><ul> | ||
<li> | ||
<i>November 26, 2018 </i> by Fabian Wüllhorst:<br/> | ||
First implementation (see issue <a href= | ||
\"https://github.com/RWTH-EBC/AixLib/issues/577\">#577</a>) | ||
</li> | ||
</ul> | ||
</html>", info="<html> | ||
<p> | ||
This model is used to calculate the COP or the EER of a device. As | ||
the electrical power can get zero, a lower boundary is used to | ||
avoid division by zero. If the threshold is surpassed by 10 percent, | ||
the efficiency is calculated again. | ||
</p> | ||
</html>")); | ||
end CalculateCoefficientOfPerformance; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ PartialCarnot | |
PartialHeatPumpCycle | ||
PartialRefrigerantCycle | ||
PartialTableData2D | ||
CalculateCoefficientOfPerformance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters