From de43d6c6ffb419ebc28dba6fc781efec6a4b370c Mon Sep 17 00:00:00 2001
From: SenHuang19
Date: Mon, 6 May 2024 11:24:47 -0400
Subject: [PATCH 01/29] model implementation improve
---
.../Latent/BaseClasses/Effectiveness.mo | 16 ++--
.../Latent/BaseClasses/PartialWheel.mo | 84 ++++++++-----------
.../BaseClasses/Validation/Effectiveness.mo | 4 +-
.../ThermalWheels/Latent/BypassDampers.mo | 27 +++---
.../ThermalWheels/Latent/SpeedControlled.mo | 39 ++++++---
5 files changed, 85 insertions(+), 85 deletions(-)
diff --git a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/Effectiveness.mo b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/Effectiveness.mo
index 553edb03963..c81650a0fe3 100644
--- a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/Effectiveness.mo
+++ b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/Effectiveness.mo
@@ -18,8 +18,8 @@ model Effectiveness
"Part load (75% of the nominal supply flow rate) sensible heat exchanger effectiveness at the heating mode";
parameter Modelica.Units.SI.Efficiency epsLatHeaPL(final max=1)
"Part load (75% of the nominal supply flow rate) latent heat exchanger effectiveness at the heating mode";
- parameter Modelica.Units.SI.VolumeFlowRate VSup_flow_nominal
- "Nominal supply air flow rate";
+ parameter Modelica.Units.SI.MassFlowRate mSup_flow_nominal
+ "Nominal supply air mass flow rate";
Buildings.Controls.OBC.CDL.Interfaces.RealInput TSup(
final min=0,
@@ -33,11 +33,11 @@ model Effectiveness
displayUnit="degC")
"Exhaust air temperature"
annotation (Placement(transformation(extent={{-140,-100},{-100,-60}})));
- Buildings.Controls.OBC.CDL.Interfaces.RealInput VSup_flow(final unit="m3/s")
- "Supply air volumetric flow rate"
+ Buildings.Controls.OBC.CDL.Interfaces.RealInput mSup_flow(final unit="kg/s")
+ "Supply air mass flow rate"
annotation (Placement(transformation(extent={{-140,60},{-100,100}})));
- Buildings.Controls.OBC.CDL.Interfaces.RealInput VExh_flow(final unit="m3/s")
- "Exhaust air volumetric flow rate"
+ Buildings.Controls.OBC.CDL.Interfaces.RealInput mExh_flow(final unit="kg/s")
+ "Exhaust air mass flow rate"
annotation (Placement(transformation(extent={{-140,20},{-100,60}})));
Buildings.Controls.OBC.CDL.Interfaces.RealInput uSpe(
final unit="1",
@@ -82,11 +82,11 @@ protected
equation
// Check if the air flows are too unbalanced
- assert(VSup_flow - 2*VExh_flow < 0 or VExh_flow - 2*VSup_flow < 0,
+ assert(mSup_flow - 2*mExh_flow < 0 or mExh_flow - 2*mSup_flow < 0,
"In " + getInstanceName() + ": The ratio of the supply flow rate to the exhaust flow rate should be in the range of [0.5, 2].",
level=AssertionLevel.warning);
// Calculate the average volumetric air flow and flow rate ratio.
- rat = (VSup_flow + VExh_flow)/2/VSup_flow_nominal;
+ rat = (mSup_flow +mExh_flow) /2/mSup_flow_nominal;
// Switch between cooling and heating modes based on the difference between the supply air temperature and the exhaust air temperature
fraCoo = if (equSen_nominal and equSenPL and equLat_nominal and equLatPL) then 0.5 else Buildings.Utilities.Math.Functions.regStep(TSup-TExh, 1, 0, 1e-5);
diff --git a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/PartialWheel.mo b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/PartialWheel.mo
index 5077d97dd83..8b249d07b58 100644
--- a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/PartialWheel.mo
+++ b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/PartialWheel.mo
@@ -2,22 +2,19 @@ within Buildings.Fluid.HeatExchangers.ThermalWheels.Latent.BaseClasses;
partial model PartialWheel
"Partial model for enthalpy recovery wheel"
extends Modelica.Blocks.Icons.Block;
- replaceable package Medium1 =
+ replaceable package Medium =
Modelica.Media.Interfaces.PartialCondensingGases
- "Supply air";
- replaceable package Medium2 =
- Modelica.Media.Interfaces.PartialCondensingGases
- "Exhaust air";
- parameter Modelica.Units.SI.MassFlowRate m1_flow_nominal
+ "Air";
+ parameter Modelica.Units.SI.MassFlowRate mSup_flow_nominal
"Nominal supply air mass flow rate"
annotation (Dialog(group="Nominal condition"));
- parameter Modelica.Units.SI.MassFlowRate m2_flow_nominal
+ parameter Modelica.Units.SI.MassFlowRate mExh_flow_nominal
"Nominal exhaust air mass flow rate"
annotation (Dialog(group="Nominal condition"));
- parameter Modelica.Units.SI.PressureDifference dp1_nominal(displayUnit="Pa") = 500
+ parameter Modelica.Units.SI.PressureDifference dpSup_nominal(displayUnit="Pa") = 500
"Nominal supply air pressure drop"
annotation (Dialog(group="Nominal condition"));
- parameter Modelica.Units.SI.PressureDifference dp2_nominal(displayUnit="Pa") = dp1_nominal
+ parameter Modelica.Units.SI.PressureDifference dpExh_nominal(displayUnit="Pa") = dpSup_nominal
"Nominal exhaust air pressure drop"
annotation (Dialog(group="Nominal condition"));
parameter Real P_nominal(final unit="W")
@@ -41,19 +38,19 @@ partial model PartialWheel
annotation (Dialog(group="Nominal condition"));
parameter Modelica.Units.SI.Efficiency epsSenCooPL(
final max=1) = 0.75
- "Part load (75% of the nominal supply flow rate) sensible heat exchanger effectiveness at the cooling mode"
+ "Part load (75% of the nominal supply mass flow rate) sensible heat exchanger effectiveness at the cooling mode"
annotation (Dialog(group="Part load effectiveness"));
parameter Modelica.Units.SI.Efficiency epsLatCooPL(
final max=1) = 0.75
- "Part load (75% of the nominal supply flow rate) latent heat exchanger effectiveness at the cooling mode"
+ "Part load (75% of the nominal supply mass flow rate) latent heat exchanger effectiveness at the cooling mode"
annotation (Dialog(group="Part load effectiveness"));
parameter Modelica.Units.SI.Efficiency epsSenHeaPL(
final max=1) = 0.75
- "Part load (75% of the nominal supply flow rate) sensible heat exchanger effectiveness at the heating mode"
+ "Part load (75% of the nominal supply mass flow rate) sensible heat exchanger effectiveness at the heating mode"
annotation (Dialog(group="Part load effectiveness"));
parameter Modelica.Units.SI.Efficiency epsLatHeaPL(
final max=1) = 0.75
- "Part load (75% of the nominal supply flow rate) latent heat exchanger effectiveness at the heating mode"
+ "Part load (75% of the nominal supply mass flow rate) latent heat exchanger effectiveness at the heating mode"
annotation (Dialog(group="Part load effectiveness"));
Buildings.Controls.OBC.CDL.Interfaces.RealOutput P(
@@ -70,32 +67,27 @@ partial model PartialWheel
annotation (Placement(transformation(extent={{100,-50},{140,-10}}),
iconTransformation(extent={{100,-50},{140,-10}})));
Modelica.Fluid.Interfaces.FluidPort_a port_a1(
- redeclare final package Medium = Medium1)
+ redeclare final package Medium = Medium)
"Fluid connector a1 of the supply air (positive design flow direction is from port_a1 to port_b1)"
annotation (Placement(transformation(extent={{-190,70},{-170,90}}),
iconTransformation(extent={{-110,50},{-90,70}})));
Modelica.Fluid.Interfaces.FluidPort_b port_b2(
- redeclare final package Medium = Medium2)
+ redeclare final package Medium = Medium)
"Fluid connector b2 of the exhaust air (positive design flow direction is from port_a2 to port_b2)"
annotation (Placement(transformation(extent={{-170,-70},{-190,-50}}),
iconTransformation(extent={{-90,-70},{-110,-50}})));
Modelica.Fluid.Interfaces.FluidPort_b port_b1(
- redeclare final package Medium = Medium1)
+ redeclare final package Medium = Medium)
"Fluid connector b1 of the supply air (positive design flow direction is from port_a1 to port_b1)"
annotation (Placement(transformation(extent={{110,70},{90,90}}),
iconTransformation(extent={{110,50},{90,70}})));
Modelica.Fluid.Interfaces.FluidPort_a port_a2(
- redeclare final package Medium = Medium2)
+ redeclare final package Medium = Medium)
"Fluid connector a2 of the exhaust air (positive design flow direction is from port_a2 to port_b2)"
annotation (Placement(transformation(extent={{90,-70},{110,-50}})));
protected
- parameter Medium1.ThermodynamicState sta_nominal=Medium1.setState_pTX(
- T=Buildings.Utilities.Psychrometrics.Constants.T_ref,
- p=101325,
- X=Medium1.X_default)
- "State of the supply air at the default properties";
- Buildings.Fluid.HeatExchangers.ThermalWheels.Latent.BaseClasses.Effectiveness effCal(
+ Buildings.Fluid.HeatExchangers.ThermalWheels.Latent.BaseClasses.Effectiveness effCal(
final epsSenCoo_nominal=epsSenCoo_nominal,
final epsLatCoo_nominal=epsLatCoo_nominal,
final epsSenCooPL=epsSenCooPL,
@@ -104,45 +96,37 @@ protected
final epsLatHea_nominal=epsLatHea_nominal,
final epsSenHeaPL=epsSenHeaPL,
final epsLatHeaPL=epsLatHeaPL,
- final VSup_flow_nominal=m1_flow_nominal/Medium1.density(sta_nominal))
+ final mSup_flow_nominal=mSup_flow_nominal)
"Calculates the effectiveness of heat exchange"
annotation (Placement(transformation(extent={{-100,-10},{-80,10}})));
Buildings.Fluid.HeatExchangers.ThermalWheels.Latent.BaseClasses.HeatExchangerWithInputEffectiveness hex(
- redeclare package Medium1 = Medium1,
- redeclare package Medium2 = Medium2,
- final m1_flow_nominal=m1_flow_nominal,
- final m2_flow_nominal=m2_flow_nominal,
- final dp1_nominal=dp1_nominal,
- final dp2_nominal=dp2_nominal)
+ redeclare package Medium1 = Medium,
+ redeclare package Medium2 = Medium,
+ final m1_flow_nominal=mSup_flow_nominal,
+ final m2_flow_nominal=mExh_flow_nominal,
+ final dp1_nominal=dpSup_nominal,
+ final dp2_nominal=dpExh_nominal)
"Heat exchanger"
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
- Modelica.Blocks.Sources.RealExpression VSup_flow(
- final y(final unit="m3/s")=hex.port_a1.m_flow/
- Medium1.density(state=Medium1.setState_phX(
- p=hex.port_a1.p,
- h=hex.port_a1.h_outflow,
- X=hex.port_a1.Xi_outflow)))
- "Supply air volume flow rate"
+ Modelica.Blocks.Sources.RealExpression mSup_flow(
+ final y(final unit="kg/s")=hex.port_a1.m_flow)
+ "Supply air mass flow rate"
annotation (Placement(transformation(extent={{-160,30},{-140,50}})));
- Modelica.Blocks.Sources.RealExpression VExh_flow(
- final y(final unit="m3/s")=hex.port_a2.m_flow/
- Medium2.density(state=Medium2.setState_phX(
- p=hex.port_a2.p,
- h=hex.port_a2.h_outflow,
- X=hex.port_a2.Xi_outflow)))
- "Exhaust air volume flow rate"
+ Modelica.Blocks.Sources.RealExpression mExh_flow(
+ final y(final unit="kg/s")=hex.port_a2.m_flow)
+ "Exhaust air mass flow rate"
annotation (Placement(transformation(extent={{-160,10},{-140,30}})));
Modelica.Blocks.Sources.RealExpression TSup(
- final y(final unit="K")=Medium1.temperature(
- Medium1.setState_phX(
+ final y(final unit="K")=Medium.temperature(
+ Medium.setState_phX(
p=port_a1.p,
h=inStream(port_a1.h_outflow),
X=inStream(port_a1.Xi_outflow))))
"Supply air temperature"
annotation (Placement(transformation(extent={{-160,-30},{-140,-10}})));
Modelica.Blocks.Sources.RealExpression TExh(
- final y(final unit="K")=Medium2.temperature(
- Medium2.setState_phX(
+ final y(final unit="K")=Medium.temperature(
+ Medium.setState_phX(
p=port_a2.p,
h=inStream(port_a2.h_outflow),
X=inStream(port_a2.Xi_outflow))))
@@ -168,10 +152,10 @@ equation
connect(port_b2, hex.port_b2)
annotation (Line(points={{-180,-60},{-40,-60},{-40,-6},{-10,-6}},
color={0,127,255}));
- connect(VSup_flow.y, effCal.VSup_flow)
+ connect(mSup_flow.y, effCal.mSup_flow)
annotation (Line(points={{-139,40},{-110,40},{-110,8},{-102,8}},
color={0,0,127}));
- connect(VExh_flow.y, effCal.VExh_flow)
+ connect(mExh_flow.y, effCal.mExh_flow)
annotation (Line(points={{-139,20},{-120,20},{-120,4},{-102,4}},
color={0,0,127}));
connect(epsSen, effCal.epsSen) annotation (Line(points={{120,30},{-60,30},{
diff --git a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/Validation/Effectiveness.mo b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/Validation/Effectiveness.mo
index 56ee5ae99c1..7b35542a646 100644
--- a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/Validation/Effectiveness.mo
+++ b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/Validation/Effectiveness.mo
@@ -51,9 +51,9 @@ model Effectiveness
"Exhaust air flow rate"
annotation (Placement(transformation(extent={{-80,20},{-60,40}})));
equation
- connect(VSup.y, epsCal.VSup_flow)
+ connect(VSup.y, epsCal.mSup_flow)
annotation (Line(points={{-59,70},{-28,70},{-28,8},{-14,8}}, color={0,0,127}));
- connect(VExh.y, epsCal.VExh_flow)
+ connect(VExh.y, epsCal.mExh_flow)
annotation (Line(points={{-59,30},{-40,30},{-40,4},{-14,4}}, color={0,0,127}));
connect(whSpe.y, epsCal.uSpe)
annotation (Line(points={{-59,0},{-14,0}}, color={0,0,127}));
diff --git a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BypassDampers.mo b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BypassDampers.mo
index b36e11a4b49..106a91a17bf 100644
--- a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BypassDampers.mo
+++ b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BypassDampers.mo
@@ -3,6 +3,9 @@ model BypassDampers
"Enthalpy recovery wheel with bypass dampers"
extends
Buildings.Fluid.HeatExchangers.ThermalWheels.Latent.BaseClasses.PartialWheel;
+ parameter Modelica.Units.SI.PressureDifference dpDam_nominal(displayUnit="Pa") = 20
+ "Nominal pressure drop of supply air dampers"
+ annotation (Dialog(group="Nominal condition"));
Buildings.Controls.OBC.CDL.Interfaces.RealInput uBypDamPos(
final unit="1",
final min=0,
@@ -15,29 +18,29 @@ model BypassDampers
annotation (Placement(transformation(extent={{-220,-20},{-180,20}}),
iconTransformation(extent={{-140,60},{-100,100}})));
Buildings.Fluid.Actuators.Dampers.Exponential bypDamSup(
- redeclare package Medium = Medium1,
- final m_flow_nominal=m1_flow_nominal,
- final dpDamper_nominal=dp1_nominal)
+ redeclare package Medium = Medium,
+ final m_flow_nominal=mSup_flow_nominal,
+ final dpDamper_nominal=dpDam_nominal)
"Supply air bypass damper"
annotation (Placement(transformation(extent={{-60,70},{-40,90}})));
Buildings.Fluid.Actuators.Dampers.Exponential damSup(
- redeclare package Medium = Medium1,
- final m_flow_nominal=m1_flow_nominal,
- final dpDamper_nominal=dp1_nominal)
+ redeclare package Medium = Medium,
+ final m_flow_nominal=mSup_flow_nominal,
+ final dpDamper_nominal=dpDam_nominal)
"Supply air damper"
annotation (Placement(transformation(
extent={{-10,-10},{10,10}},rotation=0,origin={-50,40})));
Buildings.Fluid.Actuators.Dampers.Exponential damExh(
- redeclare package Medium = Medium2,
- final m_flow_nominal=m2_flow_nominal,
- final dpDamper_nominal=dp2_nominal)
+ redeclare package Medium = Medium,
+ final m_flow_nominal=mExh_flow_nominal,
+ final dpDamper_nominal=dpDam_nominal)
"Exhaust air damper"
annotation (Placement(transformation(
extent={{10,10},{-10,-10}},rotation=-90,origin={60,-30})));
Buildings.Fluid.Actuators.Dampers.Exponential bypDamExh(
- redeclare package Medium = Medium2,
- final m_flow_nominal=m2_flow_nominal,
- final dpDamper_nominal=dp2_nominal)
+ redeclare package Medium = Medium,
+ final m_flow_nominal=mExh_flow_nominal,
+ final dpDamper_nominal=dpDam_nominal)
"Exhaust air bypass damper"
annotation (Placement(transformation(extent={{0,-70},{-20,-50}})));
protected
diff --git a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/SpeedControlled.mo b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/SpeedControlled.mo
index 8086248b8e9..4ab1034d8c6 100644
--- a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/SpeedControlled.mo
+++ b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/SpeedControlled.mo
@@ -3,8 +3,23 @@ model SpeedControlled
"Enthalpy recovery wheel with a variable speed drive"
extends
Buildings.Fluid.HeatExchangers.ThermalWheels.Latent.BaseClasses.PartialWheel;
- parameter Real a[:] = {1}
- "Coefficients for power consumption curve for rotor. The sum of the elements must be equal to 1"
+ parameter Boolean defaultMotorEfficiencyCurve = true "= true, use the default motor efficiency curve"
+ annotation (Dialog(group="Efficiency"));
+ parameter Real table[:,:]=[0.8,1]
+ "Table of motor power efficiency as a function of the wheel speed ratio (first column)"
+ annotation (Dialog(group="Efficiency", enable = not defaultMotorEfficiencyCurve));
+ final parameter
+ Buildings.Fluid.Movers.BaseClasses.Characteristics.efficiencyParameters_yMot
+ motorEfficiency_default=
+ Buildings.Fluid.Movers.BaseClasses.Characteristics.motorEfficiencyCurve(
+ P_nominal=P_nominal,
+ eta_max=1)
+ "default motor efficiency vs. whell speed ratio";
+ final parameter Real xSpe[:] = if defaultMotorEfficiencyCurve then motorEfficiency_default.y else table[:,1]
+ "x-axis support points of the power efficiency curve"
+ annotation (Dialog(group="Efficiency"));
+ final parameter Real[size(xSpe,1)] yeta = if defaultMotorEfficiencyCurve then motorEfficiency_default.eta else table[:,2]
+ "y-axis support points of the power efficiency curve"
annotation (Dialog(group="Efficiency"));
Buildings.Controls.OBC.CDL.Interfaces.RealInput uSpe(
@@ -15,16 +30,13 @@ model SpeedControlled
iconTransformation(extent={{-140,-20},{-100,20}})));
protected
Modelica.Blocks.Sources.RealExpression PEle(
- final y=P_nominal*Buildings.Utilities.Math.Functions.polynomial(a=a, x=uSpe))
+ final y=P_nominal*uSpe/Buildings.Utilities.Math.Functions.smoothInterpolation(
+ x=uSpe,
+ xSup=xSpe,
+ ySup=yeta))
"Electric power consumption"
annotation (Placement(transformation(extent={{60,-100},{80,-80}})));
-initial equation
- assert(abs(sum(a)-1) < Modelica.Constants.eps,
- "In " + getInstanceName() + ": Power efficiency curve is wrong.
- The sum of the coefficients for power efficiency curve must be 1.",
- level=AssertionLevel.error);
-
equation
connect(P, PEle.y)
annotation (Line(points={{120,-90},{81,-90}}, color={0,0,127}));
@@ -35,7 +47,7 @@ equation
{100,-60}}, color={0,127,255}));
connect(effCal.uSpe, uSpe)
annotation (Line(points={{-102,0},{-200,0}}, color={0,0,127}));
-annotation (
+ annotation (
defaultComponentName="whe",
Icon(coordinateSystem(extent={{-100,-100},{100,100}}),
graphics={
@@ -63,12 +75,13 @@ The operation of the heat recovery wheel is adjustable by modulating the wheel s
Accordingly, the power consumption of this wheel is calculated by
-P = P_nominal * (a1 + a2 uSpe + a3 uSpe2 + ...),
+P = P_nominal * eta,
where P_nominal
is the nominal wheel power consumption,
-uSpe
is the wheel speed ratio,
-and the a[:]
are the coefficients for power efficiency curve.
+uSpe
is the wheel speed ratio.
+The eta
is the motor power efficiency and is obtained from performing a polynomial fit
+based on the user input data table.
The sum of the coefficients must be 1, otherwise the model stops with an error.
Thus, when the speed ratio uSpe=1
, the power consumption is equal to
nominal consumption P=P_nominal
.
From 40a863ca416c7b716e8f6ba3ef7a0798b00a517c Mon Sep 17 00:00:00 2001
From: SenHuang19
Date: Wed, 8 May 2024 15:54:36 -0400
Subject: [PATCH 02/29] improve the implementation and examples
---
.../Latent/BaseClasses/PartialWheel.mo | 46 ++-
.../BaseClasses/Validation/Effectiveness.mo | 2 +-
.../ThermalWheels/Latent/BypassDampers.mo | 43 ++-
.../Latent/Examples/SpaceCooling.mo | 310 ++++++++++++++++++
.../ThermalWheels/Latent/Examples/package.mo | 12 +
.../Latent/Examples/package.order | 1 +
.../ThermalWheels/Latent/SpeedControlled.mo | 46 ++-
.../Latent/Validation/BypassDampers.mo | 27 +-
.../Latent/Validation/SpeedControlled.mo | 109 +++---
.../ThermalWheels/Latent/package.order | 1 +
.../Sensible/BaseClasses/Effectiveness.mo | 16 +-
.../Sensible/BaseClasses/PartialWheel.mo | 103 +++---
.../BaseClasses/Validation/Effectiveness.mo | 6 +-
.../ThermalWheels/Sensible/BypassDampers.mo | 34 +-
.../Sensible/Examples/SpaceCooling.mo | 310 ++++++++++++++++++
.../Sensible/Examples/package.mo | 12 +
.../Sensible/Examples/package.order | 1 +
.../ThermalWheels/Sensible/SpeedControlled.mo | 69 +++-
.../Sensible/Validation/BypassDampers.mo | 29 +-
.../Sensible/Validation/SpeedControlled.mo | 96 ++++--
.../ThermalWheels/Sensible/package.order | 1 +
21 files changed, 1007 insertions(+), 267 deletions(-)
create mode 100644 Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/Examples/SpaceCooling.mo
create mode 100644 Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/Examples/package.mo
create mode 100644 Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/Examples/package.order
create mode 100644 Buildings/Fluid/HeatExchangers/ThermalWheels/Sensible/Examples/SpaceCooling.mo
create mode 100644 Buildings/Fluid/HeatExchangers/ThermalWheels/Sensible/Examples/package.mo
create mode 100644 Buildings/Fluid/HeatExchangers/ThermalWheels/Sensible/Examples/package.order
diff --git a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/PartialWheel.mo b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/PartialWheel.mo
index 8b249d07b58..aec23570544 100644
--- a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/PartialWheel.mo
+++ b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/PartialWheel.mo
@@ -66,6 +66,12 @@ partial model PartialWheel
"Latent heat exchanger effectiveness"
annotation (Placement(transformation(extent={{100,-50},{140,-10}}),
iconTransformation(extent={{100,-50},{140,-10}})));
+ Buildings.Fluid.Sensors.MassFlowRate senSupMasFlo(redeclare package Medium = Medium)
+ "Supply air mass flow rate"
+ annotation (Placement(transformation(extent={{50,-4},{70,16}})));
+ Buildings.Fluid.Sensors.MassFlowRate senExhMasFlo(redeclare package Medium = Medium)
+ "Exhaust air mass flow rate"
+ annotation (Placement(transformation(extent={{-100,-50},{-120,-30}})));
Modelica.Fluid.Interfaces.FluidPort_a port_a1(
redeclare final package Medium = Medium)
"Fluid connector a1 of the supply air (positive design flow direction is from port_a1 to port_b1)"
@@ -108,14 +114,6 @@ protected
final dp2_nominal=dpExh_nominal)
"Heat exchanger"
annotation (Placement(transformation(extent={{-10,-10},{10,10}})));
- Modelica.Blocks.Sources.RealExpression mSup_flow(
- final y(final unit="kg/s")=hex.port_a1.m_flow)
- "Supply air mass flow rate"
- annotation (Placement(transformation(extent={{-160,30},{-140,50}})));
- Modelica.Blocks.Sources.RealExpression mExh_flow(
- final y(final unit="kg/s")=hex.port_a2.m_flow)
- "Exhaust air mass flow rate"
- annotation (Placement(transformation(extent={{-160,10},{-140,30}})));
Modelica.Blocks.Sources.RealExpression TSup(
final y(final unit="K")=Medium.temperature(
Medium.setState_phX(
@@ -123,7 +121,7 @@ protected
h=inStream(port_a1.h_outflow),
X=inStream(port_a1.Xi_outflow))))
"Supply air temperature"
- annotation (Placement(transformation(extent={{-160,-30},{-140,-10}})));
+ annotation (Placement(transformation(extent={{-160,18},{-140,38}})));
Modelica.Blocks.Sources.RealExpression TExh(
final y(final unit="K")=Medium.temperature(
Medium.setState_phX(
@@ -131,7 +129,7 @@ protected
h=inStream(port_a2.h_outflow),
X=inStream(port_a2.Xi_outflow))))
"Exhaust air temperature"
- annotation (Placement(transformation(extent={{-160,-50},{-140,-30}})));
+ annotation (Placement(transformation(extent={{-160,-40},{-140,-20}})));
equation
connect(effCal.epsSen, hex.epsSen)
@@ -141,27 +139,27 @@ equation
annotation (Line(points={{-78,-5},{-46,-5},{-46,-3},{-12,-3}},
color={0,0,127}));
connect(TSup.y, effCal.TSup)
- annotation (Line(points={{-139,-20},{-120,-20},{-120,-4},{-102,-4}},
+ annotation (Line(points={{-139,28},{-130,28},{-130,-4},{-102,-4}},
color={0,0,127}));
connect(TExh.y, effCal.TExh)
- annotation (Line(points={{-139,-40},{-110,-40},{-110,-8},{-102,-8}},
- color={0,0,127}));
- connect(hex.port_b1, port_b1)
- annotation (Line(points={{10,6},{60,6},{60,80},{100,80}},
- color={0,127,255}));
- connect(port_b2, hex.port_b2)
- annotation (Line(points={{-180,-60},{-40,-60},{-40,-6},{-10,-6}},
- color={0,127,255}));
- connect(mSup_flow.y, effCal.mSup_flow)
- annotation (Line(points={{-139,40},{-110,40},{-110,8},{-102,8}},
- color={0,0,127}));
- connect(mExh_flow.y, effCal.mExh_flow)
- annotation (Line(points={{-139,20},{-120,20},{-120,4},{-102,4}},
+ annotation (Line(points={{-139,-30},{-130,-30},{-130,-8},{-102,-8}},
color={0,0,127}));
connect(epsSen, effCal.epsSen) annotation (Line(points={{120,30},{-60,30},{
-60,5},{-78,5}}, color={0,0,127}));
connect(effCal.epsLat, epsLat) annotation (Line(points={{-78,-5},{-60,-5},{
-60,-16},{80,-16},{80,-30},{120,-30}}, color={0,0,127}));
+ connect(senSupMasFlo.m_flow, effCal.mSup_flow) annotation (Line(points={{60,17},
+ {60,60},{-110,60},{-110,8},{-102,8}}, color={0,0,127}));
+ connect(senExhMasFlo.m_flow, effCal.mExh_flow) annotation (Line(points={{-110,
+ -29},{-110,4},{-102,4}}, color={0,0,127}));
+ connect(hex.port_b1, senSupMasFlo.port_a)
+ annotation (Line(points={{10,6},{50,6}}, color={0,127,255}));
+ connect(senSupMasFlo.port_b, port_b1) annotation (Line(points={{70,6},{80,6},
+ {80,80},{100,80}}, color={0,127,255}));
+ connect(senExhMasFlo.port_a, hex.port_b2) annotation (Line(points={{-100,-40},
+ {-30,-40},{-30,-6},{-10,-6}}, color={0,127,255}));
+ connect(senExhMasFlo.port_b, port_b2) annotation (Line(points={{-120,-40},{
+ -160,-40},{-160,-60},{-180,-60}}, color={0,127,255}));
annotation (
defaultComponentName="whe",
Icon(coordinateSystem(extent={{-100,-100},{100,100}}),
diff --git a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/Validation/Effectiveness.mo b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/Validation/Effectiveness.mo
index 7b35542a646..d24f0385ac3 100644
--- a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/Validation/Effectiveness.mo
+++ b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BaseClasses/Validation/Effectiveness.mo
@@ -12,7 +12,7 @@ model Effectiveness
epsLatHea_nominal=0.6,
epsSenHeaPL=0.6,
epsLatHeaPL=0.5,
- VSup_flow_nominal=1)
+ mSup_flow_nominal=1)
"Effectiveness calculator"
annotation (Placement(transformation(extent={{-12,-10},{8,10}})));
Modelica.Blocks.Sources.Ramp whSpe(
diff --git a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BypassDampers.mo b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BypassDampers.mo
index 106a91a17bf..e982178b7fe 100644
--- a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BypassDampers.mo
+++ b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/BypassDampers.mo
@@ -29,14 +29,14 @@ model BypassDampers
final dpDamper_nominal=dpDam_nominal)
"Supply air damper"
annotation (Placement(transformation(
- extent={{-10,-10},{10,10}},rotation=0,origin={-50,40})));
+ extent={{-10,-10},{10,10}},rotation=0,origin={-90,36})));
Buildings.Fluid.Actuators.Dampers.Exponential damExh(
redeclare package Medium = Medium,
final m_flow_nominal=mExh_flow_nominal,
final dpDamper_nominal=dpDam_nominal)
"Exhaust air damper"
annotation (Placement(transformation(
- extent={{10,10},{-10,-10}},rotation=-90,origin={60,-30})));
+ extent={{10,10},{-10,-10}},rotation=-90,origin={40,-44})));
Buildings.Fluid.Actuators.Dampers.Exponential bypDamExh(
redeclare package Medium = Medium,
final m_flow_nominal=mExh_flow_nominal,
@@ -58,35 +58,19 @@ protected
final realFalse=0) "Electric power consumption for motor"
annotation (Placement(transformation(extent={{-160,-90},{-140,-70}})));
equation
- connect(bypDamSup.port_a, port_a1)
- annotation (Line(points={{-60,80},{-180,80}}, color={0,127,255}));
- connect(bypDamSup.port_b, port_b1)
- annotation (Line(points={{-40,80},{100,80}}, color={0,127,255}));
- connect(bypDamExh.port_a, port_a2)
- annotation (Line(points={{0,-60},{100,-60}}, color={0,127,255}));
- connect(bypDamExh.port_b, port_b2)
- annotation (Line(points={{-20,-60},{-180,-60}}, color={0,127,255}));
- connect(damExh.port_a, port_a2)
- annotation (Line(points={{60,-40},{60,-60},{100,-60}}, color={0,127,255}));
connect(sub.y, damSup.y)
- annotation (Line(points={{-78,100},{20,100},{20,60},{-50,60},{-50,52}},
+ annotation (Line(points={{-78,100},{20,100},{20,54},{-90,54},{-90,48}},
color={0,0,127}));
connect(damExh.y,sub. y)
- annotation (Line(points={{48,-30},{40,-30},{40,84},{20,84},{20,100},{-78,100}},
- color={0,0,127}));
+ annotation (Line(points={{28,-44},{20,-44},{20,100},{-78,100}}, color={0,0,127}));
connect(bypDamSup.y, uBypDamPos)
annotation (Line(points={{-50,92},{-50,140},{-202,140}}, color={0,0,127}));
connect(damSup.port_b, hex.port_a1)
- annotation (Line(points={{-40,40},{-20,40},{-20,6},{-10,6}},
+ annotation (Line(points={{-80,36},{-30,36},{-30,6},{-10,6}},
color={0,127,255}));
connect(bypDamExh.y, uBypDamPos)
annotation (Line(points={{-10,-48},{-10,-30},{30,-30},{30,140},{-202,140}},
color={0,0,127}));
- connect(hex.port_b1, port_b1)
- annotation (Line(points={{10,6},{60,6},{60,80},{100,80}},
- color={0,127,255}));
- connect(hex.port_a2, damExh.port_b)
- annotation (Line(points={{10,-6},{60,-6},{60,-20}}, color={0,127,255}));
connect(sub.u2, uBypDamPos)
annotation (Line(points={{-102,94},{-160,94},{-160,140},{-202,140}},
color={0,0,127}));
@@ -98,13 +82,24 @@ equation
connect(booleanToReal.y, effCal.uSpe)
annotation (Line(points={{-139,0},{-120,0},{-120,0},{-102,0}},
color={0,0,127}));
- connect(damSup.port_a, port_a1)
- annotation (Line(points={{-60,40},{-100,40},{-100,80},{-180,80}},
- color={0,127,255}));
connect(PEle.y, P) annotation (Line(points={{-139,-80},{80,-80},{80,-90},{120,
-90}}, color={0,0,127}));
connect(PEle.u, uRot) annotation (Line(points={{-162,-80},{-168,-80},{-168,0},
{-200,0}}, color={255,0,255}));
+ connect(damSup.port_a, port_a1) annotation (Line(points={{-100,36},{-130,36},
+ {-130,80},{-180,80}}, color={0,127,255}));
+ connect(damExh.port_b, hex.port_a2)
+ annotation (Line(points={{40,-34},{40,-6},{10,-6}}, color={0,127,255}));
+ connect(bypDamExh.port_b, port_b2)
+ annotation (Line(points={{-20,-60},{-180,-60}}, color={0,127,255}));
+ connect(damExh.port_a, port_a2)
+ annotation (Line(points={{40,-54},{40,-60},{100,-60}}, color={0,127,255}));
+ connect(bypDamExh.port_a, port_a2)
+ annotation (Line(points={{0,-60},{100,-60}}, color={0,127,255}));
+ connect(bypDamSup.port_b, port_b1)
+ annotation (Line(points={{-40,80},{100,80}}, color={0,127,255}));
+ connect(bypDamSup.port_a, port_a1)
+ annotation (Line(points={{-60,80},{-180,80}}, color={0,127,255}));
annotation (
defaultComponentName="whe",
Icon(coordinateSystem(extent={{-100,-100},{100,100}}),
diff --git a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/Examples/SpaceCooling.mo b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/Examples/SpaceCooling.mo
new file mode 100644
index 00000000000..0c11e75ec94
--- /dev/null
+++ b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/Examples/SpaceCooling.mo
@@ -0,0 +1,310 @@
+within Buildings.Fluid.HeatExchangers.ThermalWheels.Latent.Examples;
+model SpaceCooling "Space cooling system"
+ extends Modelica.Icons.Example;
+
+ replaceable package MediumA = Buildings.Media.Air "Medium for air";
+ replaceable package MediumW = Buildings.Media.Water "Medium for water";
+
+ Buildings.Fluid.MixingVolumes.MixingVolume vol(
+ redeclare package Medium = MediumA,
+ m_flow_nominal=mA_flow_nominal,
+ V=V,
+ nPorts=2,
+ energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
+ mSenFac=3)
+ annotation (Placement(transformation(extent={{60,20},{80,40}})));
+ Modelica.Thermal.HeatTransfer.Components.ThermalConductor theCon(G=10000/30)
+ "Thermal conductance with the ambient"
+ annotation (Placement(transformation(extent={{20,40},{40,60}})));
+ parameter Modelica.Units.SI.Volume V=6*10*3 "Room volume";
+ // Heat recovery effectiveness
+ parameter Real eps = 0.8 "Heat recovery effectiveness";
+
+ /////////////////////////////////////////////////////////
+ // Design air conditions
+ parameter Modelica.Units.SI.Temperature TASup_nominal=291.15
+ "Nominal air temperature supplied to room";
+ parameter Modelica.Units.SI.DimensionlessRatio wASup_nominal=0.012
+ "Nominal air humidity ratio supplied to room [kg/kg] assuming 90% relative humidity";
+ parameter Modelica.Units.SI.Temperature TRooSet=297.15
+ "Nominal room air temperature";
+ parameter Modelica.Units.SI.Temperature TOut_nominal=303.15
+ "Design outlet air temperature";
+ parameter Modelica.Units.SI.Temperature THeaRecLvg=TOut_nominal - eps*(
+ TOut_nominal - TRooSet) "Air temperature leaving the heat recovery";
+ parameter Modelica.Units.SI.DimensionlessRatio wHeaRecLvg=0.0135
+ "Air humidity ratio leaving the heat recovery [kg/kg]";
+
+ /////////////////////////////////////////////////////////
+ // Cooling loads and air mass flow rates
+ parameter Modelica.Units.SI.HeatFlowRate QRooInt_flow=1000
+ "Internal heat gains of the room";
+ parameter Modelica.Units.SI.HeatFlowRate QRooC_flow_nominal=-QRooInt_flow -
+ 10E3/30*(TOut_nominal - TRooSet) "Nominal cooling load of the room";
+ parameter Modelica.Units.SI.MassFlowRate mA_flow_nominal=1.3*
+ QRooC_flow_nominal/1006/(TASup_nominal - TRooSet)
+ "Nominal air mass flow rate, increased by factor 1.3 to allow for recovery after temperature setback";
+ parameter Modelica.Units.SI.TemperatureDifference dTFan=2
+ "Estimated temperature raise across fan that needs to be made up by the cooling coil";
+ parameter Modelica.Units.SI.HeatFlowRate QCoiC_flow_nominal=mA_flow_nominal*(
+ TASup_nominal - THeaRecLvg - dTFan)*1006 + mA_flow_nominal*(wASup_nominal
+ - wHeaRecLvg)*2458.3e3
+ "Cooling load of coil, taking into account outside air sensible and latent heat removal";
+
+ /////////////////////////////////////////////////////////
+ // Water temperatures and mass flow rates
+ parameter Modelica.Units.SI.Temperature TWSup_nominal=285.15
+ "Water supply temperature";
+ parameter Modelica.Units.SI.Temperature TWRet_nominal=289.15
+ "Water return temperature";
+ parameter Modelica.Units.SI.MassFlowRate mW_flow_nominal=-QCoiC_flow_nominal/
+ (TWRet_nominal - TWSup_nominal)/4200 "Nominal water mass flow rate";
+
+ Modelica.Thermal.HeatTransfer.Sources.PrescribedTemperature TOut
+ "Outside temperature"
+ annotation (Placement(transformation(extent={{-20,40},{0,60}})));
+ Modelica.Thermal.HeatTransfer.Sources.FixedHeatFlow preHea(Q_flow=
+ QRooInt_flow) "Prescribed heat flow"
+ annotation (Placement(transformation(extent={{20,70},{40,90}})));
+ Buildings.Fluid.Movers.FlowControlled_m_flow fan(
+ redeclare package Medium = MediumA,
+ m_flow_nominal=mA_flow_nominal,
+ energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial)
+ "Supply air fan"
+ annotation (Placement(transformation(extent={{40,-30},{60,-10}})));
+ Buildings.Fluid.HeatExchangers.ThermalWheels.Latent.BypassDampers whe(
+ redeclare package Medium = MediumA,
+ mSup_flow_nominal=mA_flow_nominal,
+ mExh_flow_nominal=mA_flow_nominal,
+ dpSup_nominal=200,
+ P_nominal=100,
+ epsSenCoo_nominal=eps,
+ epsLatCoo_nominal=eps,
+ epsSenHea_nominal=eps,
+ epsLatHea_nominal=eps) "Heat recovery"
+ annotation (Placement(transformation(extent={{-110,-36},{-90,-16}})));
+ Buildings.Fluid.HeatExchangers.WetCoilEffectivenessNTU cooCoi(
+ redeclare package Medium1 = MediumW,
+ redeclare package Medium2 = MediumA,
+ m1_flow_nominal=mW_flow_nominal,
+ m2_flow_nominal=mA_flow_nominal,
+ dp1_nominal=6000,
+ dp2_nominal=200,
+ use_Q_flow_nominal=true,
+ Q_flow_nominal=QCoiC_flow_nominal,
+ T_a1_nominal=TWSup_nominal,
+ T_a2_nominal=THeaRecLvg,
+ w_a2_nominal=wHeaRecLvg,
+ show_T=true,
+ energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial) "Cooling coil"
+ annotation (Placement(
+ transformation(
+ extent={{-10,-10},{10,10}},
+ rotation=180,
+ origin={-30,-26})));
+ Buildings.Fluid.Sources.Outside out(nPorts=2, redeclare package Medium = MediumA)
+ annotation (Placement(transformation(extent={{-140,-32},{-120,-12}})));
+ Buildings.Fluid.Sources.MassFlowSource_T souWat(
+ nPorts=1,
+ redeclare package Medium = MediumW,
+ use_m_flow_in=true,
+ T=TWSup_nominal) "Source for water flow rate"
+ annotation (Placement(transformation(extent={{-20,-110},{0,-90}})));
+ Buildings.Fluid.Sources.Boundary_pT sinWat(
+ nPorts=1, redeclare package Medium = MediumW) "Sink for water circuit"
+ annotation (Placement(transformation(extent={{-80,-76},{-60,-56}})));
+ BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
+ pAtmSou=Buildings.BoundaryConditions.Types.DataSource.Parameter,
+ TDryBul=TOut_nominal,
+ filNam=Modelica.Utilities.Files.loadResource("modelica://Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.mos"),
+ TDryBulSou=Buildings.BoundaryConditions.Types.DataSource.File)
+ "Weather data reader"
+ annotation (Placement(transformation(extent={{-160,40},{-140,60}})));
+ BoundaryConditions.WeatherData.Bus weaBus "Weather data bus"
+ annotation (Placement(transformation(extent={{-120,40},{-100,60}})));
+ Buildings.Controls.OBC.CDL.Reals.Sources.Constant mAir_flow(k=mA_flow_nominal)
+ "Fan air flow rate"
+ annotation (Placement(transformation(extent={{0,0},{20,20}})));
+ Buildings.Fluid.Sensors.TemperatureTwoPort senTemHXOut(redeclare package
+ Medium = MediumA, m_flow_nominal=mA_flow_nominal)
+ "Temperature sensor for heat recovery outlet on supply side"
+ annotation (Placement(transformation(extent={{-76,-26},{-64,-14}})));
+ Buildings.Fluid.Sensors.TemperatureTwoPort senTemSupAir(redeclare package
+ Medium = MediumA, m_flow_nominal=mA_flow_nominal)
+ "Temperature sensor for supply air"
+ annotation (Placement(transformation(extent={{6,-26},{18,-14}})));
+ Buildings.Controls.OBC.CDL.Reals.Sources.Constant TRooSetPoi(k=TRooSet)
+ "Room temperature set point"
+ annotation (Placement(transformation(extent={{-170,-104},{-150,-84}})));
+ Modelica.Thermal.HeatTransfer.Sensors.TemperatureSensor senTemRoo
+ "Room temperature sensor"
+ annotation (Placement(transformation(extent={{70,70},{90,90}})));
+ Buildings.Controls.OBC.CDL.Conversions.BooleanToReal mWat_flow(realTrue=0, realFalse=
+ mW_flow_nominal) "Conversion from boolean to real for water flow rate"
+ annotation (Placement(transformation(extent={{-60,-110},{-40,-90}})));
+ Buildings.Controls.OBC.CDL.Reals.Subtract sub
+ "Inputs different"
+ annotation (Placement(transformation(extent={{-130,-110},{-110,-90}})));
+ Buildings.Controls.OBC.CDL.Reals.Hysteresis con(
+ final uLow=-0.5,
+ final uHigh=0.5)
+ "Controller for coil water flow rate"
+ annotation (Placement(transformation(extent={{-100,-110},{-80,-90}})));
+ Buildings.Controls.OBC.CDL.Logical.Sources.Pulse opeSig(
+ width=0.5,
+ period=86400,
+ shift=0.25*86400)
+ "Operating signal"
+ annotation (Placement(transformation(extent={{-172,10},{-152,30}})));
+ Modelica.Blocks.Sources.Ramp bypDamPos(
+ height=0.5,
+ duration=86400/2,
+ offset=0,
+ startTime=15552000 + 6*3600)
+ "Bypass damper position"
+ annotation (Placement(transformation(extent={{-170,-60},{-150,-40}})));
+equation
+ connect(theCon.port_b, vol.heatPort) annotation (Line(
+ points={{40,50},{50,50},{50,30},{60,30}},
+ color={191,0,0},
+ smooth=Smooth.None));
+ connect(preHea.port, vol.heatPort) annotation (Line(
+ points={{40,80},{50,80},{50,30},{60,30}},
+ color={191,0,0},
+ smooth=Smooth.None));
+ connect(fan.port_b, vol.ports[1]) annotation (Line(
+ points={{60,-20},{69,-20},{69,20}},
+ color={0,127,255},
+ smooth=Smooth.None));
+ connect(vol.ports[2],whe. port_a2) annotation (Line(
+ points={{71,20},{71,-46},{-90,-46},{-90,-32}},
+ color={0,127,255},
+ smooth=Smooth.None));
+ connect(out.ports[2],whe. port_a1) annotation (Line(
+ points={{-120,-21},{-116,-21},{-116,-20},{-110,-20}},
+ color={0,127,255},
+ smooth=Smooth.None));
+ connect(souWat.ports[1], cooCoi.port_a1) annotation (Line(
+ points={{0,-100},{20,-100},{20,-32},{-20,-32}},
+ color={0,127,255},
+ smooth=Smooth.None));
+ connect(cooCoi.port_b1, sinWat.ports[1]) annotation (Line(
+ points={{-40,-32},{-48,-32},{-48,-66},{-60,-66}},
+ color={0,127,255},
+ smooth=Smooth.None));
+ connect(weaDat.weaBus, out.weaBus) annotation (Line(
+ points={{-140,50},{-128,50},{-128,4},{-148,4},{-148,-21.8},{-140,-21.8}},
+ color={255,204,51},
+ thickness=0.5,
+ smooth=Smooth.None));
+ connect(weaDat.weaBus, weaBus) annotation (Line(
+ points={{-140,50},{-110,50}},
+ color={255,204,51},
+ thickness=0.5,
+ smooth=Smooth.None), Text(
+ textString="%second",
+ index=1,
+ extent={{6,3},{6,3}}));
+ connect(weaBus.TDryBul, TOut.T) annotation (Line(
+ points={{-109.95,50.05},{-66,50.05},{-66,50},{-22,50}},
+ color={255,204,51},
+ thickness=0.5,
+ smooth=Smooth.None), Text(
+ textString="%first",
+ index=-1,
+ extent={{-6,3},{-6,3}}));
+ connect(fan.m_flow_in, mAir_flow.y) annotation (Line(
+ points={{50,-8},{50,10},{22,10}},
+ color={0,0,127},
+ smooth=Smooth.None));
+ connect(whe.port_b1, senTemHXOut.port_a) annotation (Line(
+ points={{-90,-20},{-76,-20}},
+ color={0,127,255},
+ smooth=Smooth.None));
+ connect(senTemHXOut.port_b, cooCoi.port_a2) annotation (Line(
+ points={{-64,-20},{-40,-20}},
+ color={0,127,255},
+ smooth=Smooth.None));
+ connect(cooCoi.port_b2, senTemSupAir.port_a) annotation (Line(
+ points={{-20,-20},{6,-20}},
+ color={0,127,255},
+ smooth=Smooth.None));
+ connect(senTemSupAir.port_b, fan.port_a) annotation (Line(
+ points={{18,-20},{40,-20}},
+ color={0,127,255},
+ smooth=Smooth.None));
+ connect(TOut.port, theCon.port_a) annotation (Line(
+ points={{5.55112e-16,50},{20,50}},
+ color={191,0,0},
+ smooth=Smooth.None));
+ connect(vol.heatPort, senTemRoo.port) annotation (Line(
+ points={{60,30},{50,30},{50,80},{70,80}},
+ color={191,0,0},
+ smooth=Smooth.None));
+ connect(mWat_flow.y, souWat.m_flow_in) annotation (Line(
+ points={{-38,-100},{-30,-100},{-30,-92},{-22,-92}},
+ color={0,0,127},
+ smooth=Smooth.None));
+ connect(sub.y, con.u)
+ annotation (Line(points={{-108,-100},{-102,-100}}, color={0,0,127}));
+ connect(con.y, mWat_flow.u)
+ annotation (Line(points={{-78,-100},{-62,-100}}, color={255,0,255}));
+ connect(TRooSetPoi.y, sub.u1)
+ annotation (Line(points={{-148,-94},{-132,-94}}, color={0,0,127}));
+ connect(senTemRoo.T, sub.u2) annotation (Line(points={{91,80},{100,80},{100,-140},
+ {-140,-140},{-140,-106},{-132,-106}}, color={0,0,127}));
+ connect(whe.port_b2, out.ports[1]) annotation (Line(points={{-110,-32},{-116,-32},
+ {-116,-23},{-120,-23}}, color={0,127,255}));
+ connect(opeSig.y, whe.uRot) annotation (Line(points={{-150,20},{-116,20},{-116,
+ -18},{-112,-18}}, color={255,0,255}));
+ connect(bypDamPos.y, whe.uBypDamPos) annotation (Line(points={{-149,-50},{-118,
+ -50},{-118,-26},{-112,-26}}, color={0,0,127}));
+ annotation (Documentation(info="
+
+This block is identical to
+
+Buildings.Examples.Tutorial.SpaceCooling.System3,
+except that the heat recovery device is modelled with
+Buildings.Fluid.HeatExchangers.ThermalWheels.Latent.BypassDampers.
+
+
+The major input signals for the heat recovery device are configured as follows:
+
+
+-
+The operating signal uRot changes from
false
to true
at 6:00
+and from false
to true
at 18:00.
+
+-
+The bypass damper position uBypDamPos changes from 0 to 0.5
+during the period from 200 seconds to 360 seconds.
+
+
+
+The expected outputs are:
+
+
+-
+The outdoor temperature,
TOut.T
, and the temperature of the air leaving the exchanger, senTemHXOut.T,
+becomes different at 6:00.
+
+-
+Their difference becomes smaller and smaller after 6:00 and equals to 0 after 18:00.
+
+
+", revisions="
+
+"),
+ Diagram(coordinateSystem(preserveAspectRatio=true, extent={{-180,-160},{120,
+ 100}})),
+ __Dymola_Commands(file=
+ "modelica://Buildings/Resources/Scripts/Dymola/Fluid/HeatExchangers/ThermalWheels/Latent/Examples/SpaceCooling.mos"
+ "Simulate and plot"),
+ experiment(StartTime=15552000, Tolerance=1e-6, StopTime=15638400));
+end SpaceCooling;
diff --git a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/Examples/package.mo b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/Examples/package.mo
new file mode 100644
index 00000000000..1c14fd101b5
--- /dev/null
+++ b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/Examples/package.mo
@@ -0,0 +1,12 @@
+within Buildings.Fluid.HeatExchangers.ThermalWheels.Latent;
+package Examples "Collection of models that illustrate model use and test models"
+ extends Modelica.Icons.ExamplesPackage;
+
+annotation (preferredView="info", Documentation(info="
+
+This package contains validation models for the classes in
+
+Buildings.Fluid.HeatExchangers.ThermalWheels.Latent.
+
+"));
+end Examples;
diff --git a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/Examples/package.order b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/Examples/package.order
new file mode 100644
index 00000000000..50303e7a6b0
--- /dev/null
+++ b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/Examples/package.order
@@ -0,0 +1 @@
+SpaceCooling
diff --git a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/SpeedControlled.mo b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/SpeedControlled.mo
index 4ab1034d8c6..af8e21b2b02 100644
--- a/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/SpeedControlled.mo
+++ b/Buildings/Fluid/HeatExchangers/ThermalWheels/Latent/SpeedControlled.mo
@@ -21,7 +21,6 @@ model SpeedControlled
final parameter Real[size(xSpe,1)] yeta = if defaultMotorEfficiencyCurve then motorEfficiency_default.eta else table[:,2]
"y-axis support points of the power efficiency curve"
annotation (Dialog(group="Efficiency"));
-
Buildings.Controls.OBC.CDL.Interfaces.RealInput uSpe(
final unit="1",
final max=1)
@@ -37,16 +36,22 @@ protected
"Electric power consumption"
annotation (Placement(transformation(extent={{60,-100},{80,-80}})));
+initial equation
+ assert(table[end,1] < 1,
+ "In " + getInstanceName() + ": Power efficiency curve is wrong.
+ No need to define efficiency for the nominal condition",
+ level=AssertionLevel.error)
+ "Check if the effiency for the nominal conidtion is defined.";
+
equation
connect(P, PEle.y)
annotation (Line(points={{120,-90},{81,-90}}, color={0,0,127}));
- connect(port_a1, hex.port_a1) annotation (Line(points={{-180,80},{-40,80},{
- -40,6},{-10,6}},
- color={0,127,255}));
- connect(hex.port_a2, port_a2) annotation (Line(points={{10,-6},{60,-6},{60,-60},
- {100,-60}}, color={0,127,255}));
connect(effCal.uSpe, uSpe)
annotation (Line(points={{-102,0},{-200,0}}, color={0,0,127}));
+ connect(hex.port_a2, port_a2) annotation (Line(points={{10,-6},{60,-6},{60,
+ -60},{100,-60},{100,-60}}, color={0,127,255}));
+ connect(hex.port_a1, port_a1) annotation (Line(points={{-10,6},{-32,6},{-32,
+ 80},{-180,80}}, color={0,127,255}));
annotation (
defaultComponentName="whe",
Icon(coordinateSystem(extent={{-100,-100},{100,100}}),
@@ -75,22 +80,39 @@ The operation of the heat recovery wheel is adjustable by modulating the wheel s
Accordingly, the power consumption of this wheel is calculated by
-P = P_nominal * eta,
+P = P_nominal * uSpe / eta,
where P_nominal
is the nominal wheel power consumption,
uSpe
is the wheel speed ratio.
-The eta
is the motor power efficiency and is obtained from performing a polynomial fit
-based on the user input data table.
-The sum of the coefficients must be 1, otherwise the model stops with an error.
-Thus, when the speed ratio uSpe=1
, the power consumption is equal to
-nominal consumption P=P_nominal
.
+The eta
is the motor percent full-Load efficiency, i.e.,
+the ratio of the motor efficiency to that when the uSpe
is 1.
+There are two ways to define eta
:
+
+
+-
+Default curves in U.S. DOE (2014).
+
+-
+Polynomial fit based on the user input data table.
+
+
+
+One can switch between those two options with the parameter defaultMotorEfficiencyCurve
.
The sensible and latent effectiveness is calculated with
Buildings.Fluid.HeatExchangers.ThermalWheels.Latent.BaseClasses.Effectiveness.
+References
+
+U.S. DOE (2014).
+Determining Electric Motor Load and Efficiency.
+URL:
+
+https://www.energy.gov/sites/prod/files/2014/04/f15/10097517.pdf
+