Skip to content

Commit

Permalink
renamed connectors [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
JayHuLBL committed Dec 14, 2023
1 parent 54ec5d8 commit 1d32a41
Show file tree
Hide file tree
Showing 13 changed files with 63 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ model Effectiveness
Modelica.Blocks.Interfaces.RealInput VExh_flow( final unit="m3/s")
"Exhaust air volumetric flow rate"
annotation (Placement(transformation(extent={{-140,20},{-100,60}})));
Modelica.Blocks.Interfaces.RealInput wheSpe(final unit="1")
"Wheel speed ratio"
Modelica.Blocks.Interfaces.RealInput uSpe(final unit="1") "Wheel speed"
annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
Modelica.Blocks.Interfaces.RealOutput epsSen(final unit="1")
"Sensible heat exchanger effectiveness"
Expand Down Expand Up @@ -79,8 +78,8 @@ equation
epsLatPL = Buildings.Utilities.Math.Functions.regStep(TSup-TExh, epsLatCooPL, epsLatHeaPL, 1e-5);
epsLat_nominal = Buildings.Utilities.Math.Functions.regStep(TSup-TExh, epsLatCoo_nominal, epsLatHea_nominal, 1e-5);
// calculate effectiveness.
epsSen =wheSpe*(epsSenPL + (epsSen_nominal - epsSenPL)*(rat - 0.75)/0.25);
epsLat =wheSpe*(epsLatPL + (epsLat_nominal - epsLatPL)*(rat - 0.75)/0.25);
epsSen =uSpe*(epsSenPL + (epsSen_nominal - epsSenPL)*(rat - 0.75)/0.25);
epsLat =uSpe*(epsLatPL + (epsLat_nominal - epsLatPL)*(rat - 0.75)/0.25);
assert(epsSen > 0 and epsSen < 1,
"Insensed value for the sensible heat exchanger effectiveness",
level=AssertionLevel.error);
Expand All @@ -107,9 +106,9 @@ supply flow rate by:
rat = (VSup_flow + VExh_flow)/(2*VSup_flow_nominal),
</pre>
<p>
where <code>VSup_flow</code> is the flow rate of the supply air,
<code>VExh_flow</code> is the flow rate of the exhaust air,
<code>VSup_flow_nominal</code> is the nominal flow rate of the supply air, and
where <code>VSup_flow</code> is the flow rate of the supply air;
<code>VExh_flow</code> is the flow rate of the exhaust air;
<code>VSup_flow_nominal</code> is the nominal flow rate of the supply air; and
<code>rat</code> is the flow ratio.
</p>
<p>
Expand All @@ -120,16 +119,16 @@ It then calculates the sensible and latent effectiveness by:
epsLat = wheSpe * (epsLatPL + (epsLat_nominal - epsLatPL) * (rat - 0.75)/0.25),
</pre>
where <code>epsSen</code> and <code>epsLat</code> are the effectiveness
for the sensible and latent heat transfer, respectively.
for the sensible and latent heat transfer, respectively;
<code>epsSen_nominal</code> and <code>epsSenPL</code> are the effectiveness
for the sensible heat transfer when <code>rat</code> is 1 and 0.75, respectively.
for the sensible heat transfer when <code>rat</code> is 1 and 0.75, respectively;
<code>epsLat_nominal</code> and <code>epsLatPL</code> are the effectiveness
for the latent heat transfer when <code>vRat</code> is 1 and 0.75, respectively.
<code>wheSpe</code> is the speed of a rotary wheel.
for the latent heat transfer when <code>Rat</code> is 1 and 0.75, respectively;
<code>uSpe</code> is the speed of a rotary wheel.
<p>
<code>epsSen_nominal</code>, <code>epsSenPL</code>, <code>epsLat_nominal</code>, and
<code>epsLatPL</code> are parameters.
Depending on the cooling or heating mode, their values are different.
The parameters <code>epsSen_nominal</code>, <code>epsSenPL</code>, <code>epsLat_nominal</code>, and
<code>epsLatPL</code> have different values depending on if the wheel is in
the cooling or heating mode.
If the supply air temperature is greater than the exhaust air
temperature, the exchanger is considered to operate under
the cooling mode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ within Buildings.Fluid.HeatExchangers.AirToAirHeatRecovery.BaseClasses;
model HeatExchangerWithInputEffectiveness
"Heat and moisture exchanger with varying effectiveness"
extends Buildings.Fluid.HeatExchangers.BaseClasses.PartialEffectiveness(
redeclare replaceable package Medium1 =
redeclare replaceable package Medium1 =
Modelica.Media.Interfaces.PartialCondensingGases,
redeclare replaceable package Medium2 =
redeclare replaceable package Medium2 =
Modelica.Media.Interfaces.PartialCondensingGases,
sensibleOnly1=false,
sensibleOnly2=false,
final prescribedHeatFlowRate1=true,
final prescribedHeatFlowRate2=true,
Q1_flow = epsSen * QMax_flow + QLat_flow,
Q2_flow = -Q1_flow,
mWat1_flow = +mWat_flow,
mWat2_flow = -mWat_flow);
sensibleOnly1=false,
sensibleOnly2=false,
final prescribedHeatFlowRate1=true,
final prescribedHeatFlowRate2=true,
Q1_flow = epsSen * QMax_flow + QLat_flow,
Q2_flow = -Q1_flow,
mWat1_flow = +mWat_flow,
mWat2_flow = -mWat_flow);

Modelica.Blocks.Interfaces.RealInput epsSen(unit="1")
"Sensible heat exchanger effectiveness"
Expand Down Expand Up @@ -123,7 +123,7 @@ This model transfers heat and moisture in the amount of
m = epsLat * mWat_max,
</pre>
<p>
where <code>epsSen</code> and <code>epsLat</code> are input effectiveness
where <code>epsSen</code> and <code>epsLat</code> are the input effectiveness
for the sensible and latent heat transfer, respectively;
<code>Q_max</code> is the maximum sensible heat that can be transferred,
<code>m</code> is the moisture that is transferred, and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ equation
annotation (Line(points={{-59,70},{-28,70},{-28,8},{-14,8}}, color={0,0,127}));
connect(VExh.y, epsCal.VExh_flow)
annotation (Line(points={{-59,30},{-40,30},{-40,4},{-14,4}}, color={0,0,127}));
connect(whSpe.y, epsCal.wheSpe)
connect(whSpe.y, epsCal.uSpe)
annotation (Line(points={{-59,0},{-14,0}}, color={0,0,127}));
connect(TSup.y, epsCal.TSup)
annotation (Line(points={{-59,-40},{-40,-40},{-40,-4},{-14,-4}}, color={0,0,127}));
Expand Down Expand Up @@ -86,7 +86,7 @@ exhaust air flow rate, <i>VExh</i>, change from
0.6 to 1 and 0.8 to 1 respectively. The flow rates then stay constant.
</li>
<li>
In the first 60 seonds, the wheel speed ratio, <i>wheSpe</i>, keeps constant.
In the first 60 seonds, the wheel speed <i>uSpe</i> keeps constant.
It then increases from 0.3 to 1 during the period from 60 seconds to 120
seconds.
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ equation
connect(whe.port_b2, sin_2.ports[1])
annotation (Line(points={{6,0},{-18,0},{-18,6.66134e-16},{-38,6.66134e-16}},
color={0,127,255}));
connect(bypDamPos.y, whe.bypDamPos)
annotation (Line(points={{-59,-30},{-28,-30},{-28,6},{4,6}},
color={0,0,127}));
connect(bypDamPos.y, whe.uBypDamPos) annotation (Line(points={{-59,-30},{-28,-30},
{-28,6},{4,6}}, color={0,0,127}));

annotation(experiment(Tolerance=1e-6, StopTime=360),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Fluid/HeatExchangers/AirToAirHeatRecovery/Examples/WheelWithBypassDamper.mos"
Expand All @@ -102,7 +101,7 @@ The supply air temperature <i>TSup</i> changes from <i>273.15 + 30 K</i> to
The exhaust air temperature keeps constant.
</li>
<li>
The bypass damper position <i>bypDamPos</i> changes from <i>0</i> to <i>0.2</i>
The bypass damper position <i>uBypDamPos</i> changes from <i>0</i> to <i>0.2</i>
during the period from 200 seconds to 360 seconds.
</li>
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@ equation
connect(whe.port_b2, sin_2.ports[1])
annotation (Line(points={{6,5.55112e-16},{-18,5.55112e-16},{-18,0},{-38,0}},
color={0,127,255}));
connect(wheSpe.y, whe.wheSpe)
annotation (Line(points={{-59,-30},{-28,-30},{-28,6},{4,6}},
color={0,0,127}));
connect(wheSpe.y, whe.uSpe) annotation (Line(points={{-59,-30},{-28,-30},{-28,
6},{4,6}}, color={0,0,127}));

annotation(experiment(Tolerance=1e-6, StopTime=360),
__Dymola_Commands(file="modelica://Buildings/Resources/Scripts/Dymola/Fluid/HeatExchangers/AirToAirHeatRecovery/Examples/WheelWithVariableSpeed.mos"
Expand All @@ -102,7 +101,7 @@ The supply air temperature <i>TSup</i> changes from <i>273.15 + 30 K</i> to
The exhaust air temperature keeps constant.
</li>
<li>
The wheel speed ratio <i>wheSpe</i> changes from <i>0.7</i> to <i>1</i>
The wheel speed <i>uSpe</i> changes from <i>0.7</i> to <i>1</i>
during the period from 200 seconds to 360 seconds.
</li>
<li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@ model WheelWithBypassDamper
parameter Modelica.Units.SI.Efficiency epsLatHeaPL(
final max=1) = 0.75
"Part load (75%) latent heat exchanger effectiveness at the heating mode";
Modelica.Blocks.Interfaces.RealInput bypDamPos(
final unit="1")

Modelica.Blocks.Interfaces.RealInput uBypDamPos(
final unit="1",
final min=0,
final max=1)
"Bypass damper position"
annotation (Placement(transformation(extent={{-220,100},{-180,140}}),
iconTransformation(extent={{-140,-20},{-100,20}})));
iconTransformation(extent={{-140,-20},{-100,20}})));
Modelica.Blocks.Interfaces.RealOutput P
"Electric power consumed by the wheel"
annotation (Placement(transformation(extent={{100,-10},{120,10}})));
Expand Down Expand Up @@ -175,11 +178,10 @@ equation
annotation (Line(points={{-79,14},{-12,14}}, color={0,0,127}));
connect(effCal.epsLat, hex.epsLat)
annotation (Line(points={{-79,6},{-12,6}},color={0,0,127}));
connect(bypDamSup.y, bypDamPos)
connect(bypDamSup.y, uBypDamPos)
annotation (Line(points={{-28,92},{-28,120},{-200,120}}, color={0,0,127}));
connect(effCal.wheSpe, uni.y)
annotation (Line(points={{-102,10},{-130,10},{-130,40},{-139,40}},
color={0,0,127}));
connect(effCal.uSpe, uni.y) annotation (Line(points={{-102,10},{-130,10},{-130,
40},{-139,40}}, color={0,0,127}));
connect(TSup.y, effCal.TSup)
annotation (Line(points={{-139,-20},{-114,-20},{-114,6},{-102,6}},
color={0,0,127}));
Expand All @@ -189,9 +191,8 @@ equation
connect(damSup.port_b, hex.port_a1)
annotation (Line(points={{-22,40},{-20,40},{-20,16},{-10,16}},
color={0,127,255}));
connect(bypDamExh.y, bypDamPos)
annotation (Line(points={{-30,-48},{-30,-30},{40,-30},{40,120},{-200,120}},
color={0,0,127}));
connect(bypDamExh.y, uBypDamPos) annotation (Line(points={{-30,-48},{-30,-30},
{40,-30},{40,120},{-200,120}}, color={0,0,127}));
connect(damSup.port_a, VSup_flow.port_b)
annotation (Line(points={{-42,40},{-60,40}}, color={0,127,255}));
connect(VSup_flow.port_a, port_a1)
Expand All @@ -211,9 +212,8 @@ equation
connect(VExh_flow.V_flow, effCal.VExh_flow)
annotation (Line(points={{-50,-9},{-50,60},{-120,60},{-120,14},{-102,14}},
color={0,0,127}));
connect(sub.u2, bypDamPos)
annotation (Line(points={{-122,94},{-140,94},{-140,120},{-200,120}},
color={0,0,127}));
connect(sub.u2, uBypDamPos) annotation (Line(points={{-122,94},{-140,94},{-140,
120},{-200,120}}, color={0,0,127}));
connect(uni.y, sub.u1)
annotation (Line(points={{-139,40},{-130,40},{-130,106},{-122,106}},
color={0,0,127}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ model WheelWithVariableSpeed
parameter Modelica.Units.SI.Efficiency epsLatHeaPL(
final max=1) = 0.75
"Part load (75%) latent heat exchanger effectiveness at the heating mode";
Modelica.Blocks.Interfaces.RealInput wheSpe(
final unit="1")
"Wheel speed ratio"

Modelica.Blocks.Interfaces.RealInput uSpe(
final unit="1",
final min=0,
final max=1)
"Wheel speed"
annotation (Placement(transformation(extent={{-140,-20},{-100,20}})));
Modelica.Blocks.Interfaces.RealOutput P
"Electric power consumed by the wheel"
Expand Down Expand Up @@ -146,9 +149,8 @@ equation
connect(effCal.epsLat, hex.epsLat)
annotation (Line(points={{-19,46},{-12,46},{-12,-4},{4,-4}},
color={0,0,127}));
connect(effCal.wheSpe, wheSpe)
annotation (Line(points={{-42,50},{-94,50},{-94,0},{-120,0}},
color={0,0,127}));
connect(effCal.uSpe, uSpe) annotation (Line(points={{-42,50},{-94,50},{-94,0},
{-120,0}}, color={0,0,127}));
connect(senSupFlow.V_flow, effCal.VSup_flow)
annotation (Line(points={{-30,111},{-30,120},{-80,120},{-80,58},{-42,58}},
color={0,0,127}));
Expand Down
Loading

0 comments on commit 1d32a41

Please sign in to comment.