Skip to content

Commit

Permalink
Merge pull request #1401 from open-ideas/issue1400_VentilationTemplate
Browse files Browse the repository at this point in the history
Issue1400 Ventilation template update
  • Loading branch information
jelgerjansen authored Feb 4, 2025
2 parents 9feb231 + 160fb83 commit 6ad3d70
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
5 changes: 2 additions & 3 deletions IDEAS/Templates/Examples/ConstantAirFlowRecup.mo
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ model ConstantAirFlowRecup
IDEAS.Templates.Structure.ThreeZone structure(
redeclare package Medium = Medium)
annotation (Placement(transformation(extent={{-80,-40},{-50,-20}})));
replaceable IDEAS.Templates.Ventilation.ConstantAirFlowRecup constantAirFlowRecup(
n=2.*structure.VZones)
replaceable IDEAS.Templates.Ventilation.ConstantAirFlowRecup constantAirFlowRecup(nZones=structure.nZones, n=2.*ones(structure.nZones))
constrainedby IDEAS.Templates.Interfaces.BaseClasses.VentilationSystem(
nZones=3,
nZones=structure.nZones,
VZones=structure.VZones,
redeclare package Medium = Medium)
annotation (Placement(transformation(extent={{-38,-10},{-2,8}})));
Expand Down
9 changes: 6 additions & 3 deletions IDEAS/Templates/Interfaces/BaseClasses/VentilationSystem.mo
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ partial model VentilationSystem
constrainedby Modelica.Media.Interfaces.PartialMedium
"Medium in the component"
annotation (choicesAllMatching = true);
parameter Integer nZones(min=1)
"Number of conditioned thermal building zones";
parameter Real[nZones] VZones "Conditioned volumes of the zones";

parameter Modelica.Units.SI.Power[nZones] Q_design=zeros(nZones)
"Design heat loss due to ventilation";//must be calculated depending on the case

Modelica.Blocks.Interfaces.RealInput[nZones] TSensor(
each final quantity="ThermodynamicTemperature",
each unit="K",
Expand Down Expand Up @@ -59,6 +57,11 @@ partial model VentilationSystem
Documentation(revisions="<html>
<ul>
<li>
December 23, 2024, by Lucas Verleyen:<br>
Removed nZones parameter, since it is already declared in PartialSystem, from which this model extends.
See <a href=\"https://github.com/open-ideas/IDEAS/pull/1401\">#1401</a>.
</li>
<li>
May 22, 2022, by Filip Jorissen:<br/>
Fixed Modelica specification compatibility issue.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1254\">
Expand Down
17 changes: 13 additions & 4 deletions IDEAS/Templates/Ventilation/ConstantAirFlowRecup.mo
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ model ConstantAirFlowRecup

parameter Real[nZones] n
"Air change rate (Air changes per hour ACH)";
final parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=sum(n)/3600*
final parameter Modelica.Units.SI.MassFlowRate m_flow_nominal=sum(n .* VZones)/3600*
1.204 "total ventilation mass flow rate";
parameter Modelica.Units.SI.Time tau=30
"time constant of the ventilation system";
Expand All @@ -26,11 +26,15 @@ model ConstantAirFlowRecup
min=0,
max=1) = 0.80 "Motor efficiency";

parameter Modelica.Units.SI.Pressure dp_nominal_sup=0
"Nominal pressure drop in the heat exchanger at the supply side";
parameter Modelica.Units.SI.Pressure dp_nominal_ret=0
"Nominal pressure drop in the heat exchanger at the return side";
IDEAS.Fluid.HeatExchangers.ConstantEffectiveness hex(
m1_flow_nominal=m_flow_nominal,
m2_flow_nominal=m_flow_nominal,
dp1_nominal=0,
dp2_nominal=0,
dp1_nominal=dp_nominal_ret,
dp2_nominal=dp_nominal_sup,
redeclare package Medium1 = Medium,
redeclare package Medium2 = Medium,
eps=recupEff) "Heat exchanger for the recuperator"
Expand All @@ -46,7 +50,7 @@ model ConstantAirFlowRecup
annotation (Placement(transformation(extent={{-80,-30},{-100,-10}})));
IDEAS.Fluid.Movers.FlowControlled_m_flow fan[nZones](
each use_riseTime=false,
m_flow_nominal=n ./ 3600.*1.204,
m_flow_nominal=n .* VZones ./ 3600.*1.204,
redeclare each package Medium = Medium,
each energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState,
each inputType=IDEAS.Fluid.Types.InputType.Constant)
Expand Down Expand Up @@ -94,6 +98,11 @@ equation
Documentation(revisions="<html>
<ul>
<li>
December 17, 2024, by Anna Dell'Isola:<br/>
Update calculation of ventilation mass flow rate and addition of nominal pressure drops in heat exchanger.
See <a href=\"https://github.com/open-ideas/IDEAS/issues/1400\">#1400</a>
</li>
<li>
October 30, 2024, by Lucas Verleyen:<br/>
Updates according to <a href=\"https://github.com/ibpsa/modelica-ibpsa/tree/8ed71caee72b911a1d9b5a76e6cb7ed809875e1e\">IBPSA</a>.<br/>
See <a href=\"https://github.com/open-ideas/IDEAS/pull/1383\">#1383</a>
Expand Down

0 comments on commit 6ad3d70

Please sign in to comment.