Buildings.Obsolete.Examples.VAVReheat.BaseClasses
Package with base classes
Information
This package contains base classes.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
VAVBranch | Supply branch of a VAV system |
Buildings.Obsolete.Examples.VAVReheat.BaseClasses.VAVBranch
Supply branch of a VAV system
Information
Model for a VAV supply branch. The terminal VAV box has a pressure independent damper and a water reheat coil. The pressure independent damper model includes an idealized flow rate controller and requires a discharge air flow rate set-point (normalized to the nominal value) as a control signal.
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package MediumA | Modelica.Media.Interfaces.Pa... | Medium model for air | |
replaceable package MediumW | Modelica.Media.Interfaces.Pa... | Medium model for water | |
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
MassFlowRate | m_flow_nominal | Mass flow rate of this thermal zone [kg/s] | |
Volume | VRoo | Room volume [m3] |
Connectors
Type | Name | Description |
---|---|---|
replaceable package MediumA | Medium model for air | |
replaceable package MediumW | Medium model for water | |
FluidPort_a | port_a | Fluid connector a1 (positive design flow direction is from port_a1 to port_b1) |
FluidPort_a | port_b | Fluid connector b (positive design flow direction is from port_a1 to port_b1) |
input RealInput | yVAV | Signal for VAV damper |
input RealInput | yVal | Actuator position for reheat valve (0: closed, 1: open) |
output RealOutput | y_actual | Actual VAV damper position |
Modelica definition
model VAVBranch "Supply branch of a VAV system"
extends Modelica.Blocks.Icons.Block;
replaceable package MediumA = Modelica.Media.Interfaces.PartialMedium
"Medium model for air";
replaceable package MediumW = Modelica.Media.Interfaces.PartialMedium
"Medium model for water";
parameter Boolean allowFlowReversal=true
"= false to simplify equations, assuming, but not enforcing, no flow reversal";
parameter Modelica.SIunits.MassFlowRate m_flow_nominal
"Mass flow rate of this thermal zone";
parameter Modelica.SIunits.Volume VRoo "Room volume";
Buildings.Fluid.Actuators.Dampers.PressureIndependent vav(
redeclare package Medium = MediumA,
m_flow_nominal=m_flow_nominal,
dpDamper_nominal=220 + 20,
allowFlowReversal=allowFlowReversal) "VAV box for room";
Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU terHea(
redeclare package Medium1 = MediumA,
redeclare package Medium2 = MediumW,
m1_flow_nominal=m_flow_nominal,
m2_flow_nominal=m_flow_nominal*1000*(50 - 17)/4200/10,
Q_flow_nominal=m_flow_nominal*1006*(16.7 - 50),
configuration=Buildings.Fluid.Types.HeatExchangerConfiguration.CounterFlow,
dp1_nominal=0,
from_dp2=true,
dp2_nominal=0,
allowFlowReversal1=allowFlowReversal,
allowFlowReversal2=false,
T_a1_nominal=289.85,
T_a2_nominal=355.35) "Heat exchanger of terminal box";
Buildings.Fluid.Sources.Boundary_pT sinTer(
redeclare package Medium = MediumW,
p(displayUnit="Pa") = 3E5,
nPorts=1) "Sink for terminal box ";
Modelica.Fluid.Interfaces.FluidPort_a port_a(
redeclare package Medium = MediumA)
"Fluid connector a1 (positive design flow direction is from port_a1 to port_b1)";
Modelica.Fluid.Interfaces.FluidPort_a port_b(
redeclare package Medium = MediumA)
"Fluid connector b (positive design flow direction is from port_a1 to port_b1)";
Buildings.Fluid.Sensors.MassFlowRate senMasFlo(
redeclare package Medium = MediumA,
allowFlowReversal=allowFlowReversal)
"Sensor for mass flow rate";
Modelica.Blocks.Math.Gain fraMasFlo(k=1/m_flow_nominal)
"Fraction of mass flow rate, relative to nominal flow";
Modelica.Blocks.Math.Gain ACH(k=1/VRoo/1.2*3600) "Air change per hour";
Buildings.Fluid.Sources.MassFlowSource_T souTer(
redeclare package Medium = MediumW,
nPorts=1,
use_m_flow_in=true,
T=323.15) "Source for terminal box ";
Modelica.Blocks.Interfaces.RealInput yVAV "Signal for VAV damper";
Modelica.Blocks.Interfaces.RealInput yVal
"Actuator position for reheat valve (0: closed, 1: open)";
Buildings.Controls.OBC.CDL.Continuous.Gain gaiM_flow(
final k=m_flow_nominal*1000*15/4200/10) "Gain for mass flow rate";
Modelica.Blocks.Interfaces.RealOutput y_actual "Actual VAV damper position";
equation
connect(fraMasFlo.u, senMasFlo.m_flow);
connect(vav.port_b, senMasFlo.port_a);
connect(ACH.u, senMasFlo.m_flow);
connect(souTer.ports[1], terHea.port_a2);
connect(port_a, terHea.port_a1);
connect(senMasFlo.port_b, port_b);
connect(terHea.port_b1, vav.port_a);
connect(vav.y, yVAV);
connect(souTer.m_flow_in, gaiM_flow.y);
connect(sinTer.ports[1], terHea.port_b2);
connect(gaiM_flow.u, yVal);
connect(vav.y_actual, y_actual);
end VAVBranch;