Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue3538 thermal wheel #3909

Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
de43d6c
model implementation improve
SenHuang19 May 6, 2024
40a863c
improve the implementation and examples
SenHuang19 May 8, 2024
e265a62
model improve and clean
SenHuang19 May 9, 2024
c803b24
update the scripts
SenHuang19 May 9, 2024
a11281b
update the reference data
SenHuang19 May 9, 2024
8a14a33
model doc update and example improves
SenHuang19 May 13, 2024
cfdf906
update the power calculation
SenHuang19 Jun 10, 2024
01c29ac
update the model directory
SenHuang19 Jun 14, 2024
0c728c6
update the thermal wheels
SenHuang19 Jun 14, 2024
4c757ae
update scripts
SenHuang19 Jun 14, 2024
d60cb27
update the reference dataset
SenHuang19 Jun 14, 2024
206d94f
improve the model doc
SenHuang19 Jun 17, 2024
c63596a
model doc improve and typo fix
SenHuang19 Jun 20, 2024
030d1cc
reference data update
SenHuang19 Jun 20, 2024
49341ae
model doc update
SenHuang19 Jun 20, 2024
3a28f6d
model doc improve
SenHuang19 Jun 21, 2024
84f9d01
format update
SenHuang19 Jun 22, 2024
822e498
format update
SenHuang19 Jun 22, 2024
5711f57
minor changes to model implementation
SenHuang19 Jun 24, 2024
81b0f28
reference data update
SenHuang19 Jun 24, 2024
1af8bcb
minor change
SenHuang19 Jun 24, 2024
3b4309d
model doc update
SenHuang19 Jul 5, 2024
df18e6b
improve the model doc
SenHuang19 Aug 14, 2024
37f3c7d
model doc improve
SenHuang19 Aug 30, 2024
ee21c9f
model doc update
SenHuang19 Sep 3, 2024
4da862d
change the performance dataset into parameters
Sep 26, 2024
0b7f334
minor doc format update
SenHuang19 Sep 27, 2024
d27b421
fix typos
Nov 22, 2024
1e96958
update reference
Nov 22, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
within Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.BaseClasses.Characteristics;
record heatExchangerEffectivenessParameters
"Parameters for defining heat exchanger effectiveness at different wheel speed ratios"
extends Modelica.Icons.Record;
parameter Real uSpe[:](each final min=0)
"Wheel speed ratio";
parameter Real epsCor[:](each final max=1)
"Correction of the heat exchange effectiveness at a given speed ratio";
annotation (Documentation(info="<html>
<p>
Data record that describes wheel speed ratio <code>uSpe</code> versus
heat exchange effectiveness corrections <code>epsCor</code>, i.e., the ratio of the heat exchange effectiveness
to that when the <code>uSpe</code> is <i>1</i>.
The elements of the vector <code>uSpe</code> should be in ascending order,
i.e.,<code>uSpe[i] &lt; uSpe[i+1]</code>.
Both vectors, <code>uSpe</code> and <code>epsCor</code>
must have the same size.
</p>
</html>", revisions="<html>
<ul>
<li>
May 28, 2024, by Sen Huang:<br/>
First implementation.
</li>
</ul>
</html>"));
end heatExchangerEffectivenessParameters;
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
within Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.BaseClasses.Characteristics;
record motorEfficiencyParameters
"Parameters for defining motor efficiency at different wheel speed ratios"
extends Modelica.Icons.Record;
parameter Real uSpe[:](each final min=0)
"Wheel speed ratio";
parameter Modelica.Units.SI.Efficiency eta[size(uSpe, 1)](each final max=1)
"Wheel motor efficiency at a given speed ratio";
annotation (Documentation(info="<html>
<p>
This model describes wheel speed ratio <code>uSpe</code> versus
the motor percent full-load efficiency (see
<a href=\"modelica://Buildings.Fluid.Movers.BaseClasses.Characteristics.motorEfficiencyCurve\">
Buildings.Fluid.Movers.BaseClasses.Characteristics.motorEfficiencyCurve</a>).
It is based on
<a href=\"modelica://Buildings.Fluid.Movers.BaseClasses.Characteristics.efficiencyParameters_yMot\">
Buildings.Fluid.Movers.BaseClasses.Characteristics.efficiencyParameters_yMot</a>.
</p>
</html>",
revisions="<html>
<ul>
<li>
June 11, 2024, by Sen Huang:<br/>
First implementation based on <a href=\"modelica://Buildings.Fluid.Movers.BaseClasses.Characteristics.efficiencyParameters_yMot\">
Buildings.Fluid.Movers.BaseClasses.Characteristics.efficiencyParameters_yMot</a>.
</li>
</ul>
</html>"));
end motorEfficiencyParameters;
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
within Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.BaseClasses;
package Characteristics "Functions for wheel characteristics"

annotation (Documentation(info="<html>
<p>
This package implements performance curves for wheels.
</p>
</html>"));
end Characteristics;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
heatExchangerEffectivenessParameters
motorEfficiencyParameters
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
within Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.BaseClasses.Data;
record ASHRAE =
Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.BaseClasses.Data.Generic
(senHeatExchangeEffectiveness(uSpe={0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1},
epsCor={0,0.40,0.71,0.83,0.90,0.93,0.96,0.97,0.98,0.99,1}),
latHeatExchangeEffectiveness(uSpe={0,0.15,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1},
epsCor={0,0.26,0.37,0.58,0.72,0.81,0.86,0.90,0.96,1}))
"ASHRAE data record for variable-speed thermal wheels"
annotation (Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)),
Documentation(revisions="<html>
<ul>
<li>
May 28, 2024, by Sen Huang:<br/>
First implementation.
</li>
</ul>
</html>", info="<html>
<p>
ASHRAE performance dataset for the variable-speed wheel model.
</p>
<p>
It is developed based on Figure 7 in ASHRAE (2024).
However, the original data set was extrapolated to cover lower values
of speed ratio, i.e. <code> &lt;= 0.2</code>, by setting the heat exchange effectiveness
corrections to 0 when the speed ratio is 0.
</p>
<h4>References</h4>
<p>
ASHRAE (2024).
<i>Chapter 26, Air-to-Air Energy Recovery Equipment, ASHRAE Handbook—HVAC Systems and Equipment.</i>
</p>
</html>"));
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
within Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.BaseClasses.Data;
record Generic "Generic data record for variable-speed wheels"
extends Modelica.Icons.Record;
import cha = Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.BaseClasses.Characteristics;
parameter Real P_nominal(final unit="W")=100
"Power consumption at the design condition";
parameter cha.heatExchangerEffectivenessParameters
senHeatExchangeEffectiveness(uSpe={0}, epsCor={0.7})
"Sensible heat exchange effectiveness vs. wheel speed ratio"
annotation (Dialog(group="Heat exchange effectiveness computation"));
parameter cha.heatExchangerEffectivenessParameters
latHeatExchangeEffectiveness(uSpe={0}, epsCor={0.7})
"Latent heat exchange effectiveness vs. wheel speed ratio" annotation (
Dialog(group="Heat exchange effectiveness computation", enable=
haveLatentHeatExchange));
parameter
cha.motorEfficiencyParameters
motorEfficiency(uSpe={0}, eta={0.7})
"Motor efficiency vs. wheel speed ratio"
annotation (Dialog(group="Power computation", enable=useDefaultMotorEfficiencyCurve ==
false));
final parameter
Buildings.Fluid.Movers.BaseClasses.Characteristics.efficiencyParameters_yMot
motorEfficiency_default=
Buildings.Fluid.Movers.BaseClasses.Characteristics.motorEfficiencyCurve(
P_nominal=P_nominal,
eta_max=1)
"Motor efficiency vs. default wheel speed ratio"
annotation (Dialog(group="Power computation", enable=useDefaultMotorEfficiencyCurve ==
true));
parameter Boolean haveLatentHeatExchange = true
"= true, if latent heat exchange occurs";
parameter Boolean useDefaultMotorEfficiencyCurve = true
"= true, if default motor efficiency curve is adopted";

annotation (Documentation(revisions="<html>
<ul>
<li>
May 28, 2024, by Sen Huang:<br/>
First implementation.
</li>
</ul>
</html>", info="<html>
<p>
Record containing power and heat exchange parameters for variable-speed thermal wheels.
</p>
<p>
It is used as a template of performance data
for the variable-speed wheel models in
<a href=\"modelica://Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels\">
Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels</a>.
</p>
<p>
The record contains four datasets:
</p>
<ul>
<li>
the motor efficiency versus wheel speed ratio,
</li>
<li>
the default motor percent full-load
efficiency (see <a href=
\"modelica://Buildings.Fluid.Movers.BaseClasses.Characteristics.motorEfficiencyCurve\">
Buildings.Fluid.Movers.BaseClasses.Characteristics.motorEfficiencyCurve</a>)
versus wheel speed ratio,
</li>
<li>
the sensible heat exchange effectiveness
corrections versus wheel speed ratio,
</li>
<li>
the latent heat exchange effectiveness
corrections versus wheel speed ratio .
</li>
</ul>
<p>
Note that
</p>
<ul>
<li>
When <code>haveLatentHeatExchange</code> is false,
the dataset of the latent heat exchange effectiveness
corrections versus wheel speed ratio is disabled,
</li>
<li>
When <code>useDefaultMotorEfficiencyCurve</code> is true,
the motor efficiency versus wheel speed ratio is disabled
while the default motor percent full-load
efficiency versus wheel speed ratio is enabled.
</li>
</ul>
</html>"));
end Generic;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
within Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.BaseClasses;
package Data "Performance data for variable-speed wheels"
extends Modelica.Icons.MaterialPropertiesPackage;

annotation (Documentation(info="<html>
<p>
This package contains performance data sets for variable-speed thermal wheels.
</p>
</html>"));
end Data;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ASHRAE
Generic
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
within Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels;
package BaseClasses "Package with base classes for the variable-speed thermal wheel model"
extends Modelica.Icons.BasesPackage;

annotation (Documentation(revisions="",
info="<html>
<p>
This package contains base classes that are used to construct the models in
<a href=\"modelica://Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels\">Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels</a>.
</p>
</html>"));
end BaseClasses;
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Characteristics
Data
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
within Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels;
model Latent "Enthalpy wheels"
extends Sensible;
Buildings.Controls.OBC.CDL.Interfaces.RealOutput epsLatCor(
final unit="1")
"Latent heat exchanger effectiveness correction" annotation (Placement(
transformation(extent={{100,-100},{140,-60}}), iconTransformation(
extent={{100,-100},{140,-60}})));
equation
epsLatCor = Buildings.Utilities.Math.Functions.smoothInterpolation(
x=uSpe,
xSup=per.latHeatExchangeEffectiveness.uSpe,
ySup=per.latHeatExchangeEffectiveness.epsCor)
"Calculate the latent heat exchanger effectiveness correction";

annotation (
defaultComponentName="latWhe",
Documentation(info="<html>
<p>
This model calculates the power consumption, the sensible
heat exchange effectiveness correction, and the latent
heat exchange effectiveness correction of an enthalpy wheel.
</p>
<p>
The calculation of the power consumption and the sensible
heat exchange effectiveness correction is elaborated in
<a href=\"modelica://Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.Sensible\">
Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.Sensible</a>.
</p>
<p>
The latent heat exchange effectiveness correction is calculated based
on the cubic hermite spline interpolation of the latent heat exchange
effectiveness dataset (see
<a href=\"modelica://Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.BaseClasses.Characteristics.heatExchangerEffectivenessParameters\">
Buildings.Fluid.HeatExchangers.BaseClasses.BaseClasses.VariableSpeedThermalWheels.Characteristics.heatExchangerEffectivenessParameters</a>).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.BaseClasses.

</p>
</html>", revisions="<html>
<ul>
<li>
May 28, 2024, by Sen Huang:<br/>
First implementation.
</li>
</ul>
</html>"));
end Latent;
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
within Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels;
model Sensible "Sensible heat wheels"
extends Modelica.Blocks.Icons.Block;
import whe = Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels;
final parameter Real xSpe[:] = if per.useDefaultMotorEfficiencyCurve
then per.motorEfficiency_default.y else per.motorEfficiency.uSpe
"x-axis support points of the power efficiency curve"
annotation (Dialog(group="Efficiency"));
final parameter Real[size(xSpe,1)] yeta = if per.useDefaultMotorEfficiencyCurve
then per.motorEfficiency_default.eta else per.motorEfficiency.eta
"y-axis support points of the power efficiency curve"
annotation (Dialog(group="Efficiency"));
parameter whe.BaseClasses.Data.Generic per
"Record with performance data"
annotation (Placement(transformation(extent={{60,60},{80,80}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput uSpe(
final unit="1",
final max=1)
"Wheel speed ratio"
annotation (Placement(transformation(extent={{-140,-20},{-100,20}}),
iconTransformation(extent={{-140,-20},{-100,20}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput P(final unit="W")
"Electric power consumption"
annotation (Placement(transformation(extent={{100,60},{140,100}}),
iconTransformation(extent={{100,60},{140,100}})));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput epsSenCor(final unit="1")
"Sensible heat exchanger effectiveness correction"
annotation (Placement(transformation(extent={{100,-20},{140,20}}),
iconTransformation(extent={{100,-20},{140,20}})));

initial equation
for i in 1:size(yeta,1)-1 loop
assert(xSpe[i]/yeta[i] < 1 + 1E-4,
"In " + getInstanceName() + ": the motor efficiency curve is wrong.
The ratio of the speed ratio to the motor percent
full-load efficiency should be less than 1",
level=AssertionLevel.error)
"Check if the motor efficiency curve is correct";
end for;
assert(abs(yeta[size(yeta,1)]-1) < 1E-4,
"In " + getInstanceName() + ": the motor efficiency curve is wrong.
The motor percent full-load efficiency at the full seepd should be 1",
level=AssertionLevel.error)
"Check if the motor efficiency curve is consistent with the nominal condition";
equation
P = per.P_nominal*uSpe/Buildings.Utilities.Math.Functions.smoothInterpolation(
x=uSpe,
xSup=xSpe,
ySup=yeta)
"Calculate the wheel power consumption";
epsSenCor = Buildings.Utilities.Math.Functions.smoothInterpolation(
x=uSpe,
xSup=per.senHeatExchangeEffectiveness.uSpe,
ySup=per.senHeatExchangeEffectiveness.epsCor)
"Calculate the sensible heat exchanger effectiveness correction";
annotation (
defaultComponentName="senWhe",
Icon(coordinateSystem(preserveAspectRatio=false)), Diagram(
coordinateSystem(preserveAspectRatio=false)),
Documentation(info="<html>
<p>
This model calculates the power consumption and the sensible heat exchanger
effectiveness correction of a sensible heat wheel.
Specifically, this calculation is configured as follows.
</p>
<ul>
<li>
The power consumption of this wheel is calculated by
<p align=\"center\" style=\"font-style:italic;\">
P = P_nominal * uSpe / eta,
</p>
<p>
where <code>P_nominal</code> is the nominal wheel power consumption,
<code>uSpe</code> is the wheel speed ratio,
and <code>eta</code> is the motor percent full-load efficiency,
which is calculated by
<p align=\"center\" style=\"font-style:italic;\">
eta = eff(uSpe=x) / eff(uSpe=1),
</p>
<p>
where <code>eff(uSpe=x)</code> is the motor efficiency when the speed ratio is <code>x</code>.
The <code>eta</code> is obtained based on the cubic hermite spline interpolation of
the motor percent full-load efficiency dataset (see
<a href=\"modelica://Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.BaseClasses.Characteristics.motorEfficiencyParameters\">
Buildings.Fluid.HeatExchangers.BaseClasses.BaseClasses.VariableSpeedThermalWheels.Characteristics.motorEfficiencyParameters</a>).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct the model path

Please note that <code>uSpe/eta</code> must be less or equal to 1.
</p>
</li>
<li>
The sensible heat exchanger effectiveness correction is calculated based
on the cubic hermite spline interpolation of the sensible heat exchanger effectiveness
dataset (see <a href=\"modelica://Buildings.Fluid.HeatExchangers.BaseClasses.VariableSpeedThermalWheels.BaseClasses.Characteristics.heatExchangerEffectivenessParameters\">
Buildings.Fluid.HeatExchangers.BaseClasses.BaseClasses.VariableSpeedThermalWheels.Characteristics.heatExchangerEffectivenessParameters</a>).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct the model path

</li>
</ul>
</html>", revisions="<html>
<ul>
<li>
May 28, 2024, by Sen Huang:<br/>
First implementation.
</li>
</ul>
</html>"));
end Sensible;
Loading