Name |
Description |
SupplyBranch
|
Supply branch of a dual duct system |
model SupplyBranch
replaceable package MediumA =
Modelica.Media.Interfaces.PartialMedium ;
Modelica.Fluid.Interfaces.FluidPort_a port_aHot(
redeclare package Medium =
MediumA) ;
Modelica.Fluid.Interfaces.FluidPort_a port_aCol(
redeclare package Medium =
MediumA) ;
Modelica.Fluid.Interfaces.FluidPort_a port_b(
redeclare package Medium =
MediumA) ;
parameter Boolean from_dp=false ;
parameter Boolean linearizeFlowResistance=false ;
parameter Modelica.SIunits.MassFlowRate m_flow_nominal ;
parameter Modelica.SIunits.MassFlowRate mAirHot_flow_nominal = 0.3*m_flow_nominal ;
parameter Modelica.SIunits.MassFlowRate mAirCol_flow_nominal = m_flow_nominal ;
parameter Modelica.SIunits.Volume VRoo ;
Controls.RoomMixingBox con(m_flow_min=VRoo*3*1.2/3600) ;
VAVReheat.Controls.ControlBus controlBus;
Buildings.Fluid.Actuators.Dampers.VAVBoxExponential vavHot(
redeclare package Medium =
MediumA,
A=0.6,
use_v_nominal=true,
m_flow_nominal=mAirHot_flow_nominal,
dp_nominal(displayUnit="Pa") = 40,
from_dp=from_dp,
linearized=linearizeFlowResistance) ;
Buildings.Fluid.Actuators.Dampers.VAVBoxExponential vavCol(
redeclare package Medium =
MediumA,
A=0.6,
use_v_nominal=true,
m_flow_nominal=mAirCol_flow_nominal,
dp_nominal(displayUnit="Pa") = 40,
from_dp=from_dp,
linearized=linearizeFlowResistance) ;
Buildings.Fluid.Sensors.MassFlowRate senMasFlo(
redeclare package Medium =
MediumA) ;
Modelica.Blocks.Math.Gain fraMasFlo(k=1/m_flow_nominal) ;
Modelica.Blocks.Math.Gain ACH(k=1/VRoo/1.2*3600) ;
Modelica.Blocks.Interfaces.RealInput TRoo ;
Fluid.FixedResistances.SplitterFixedResistanceDpM mix(
redeclare package Medium =
MediumA,
m_flow_nominal={mAirCol_flow_nominal,mAirHot_flow_nominal,
mAirCol_flow_nominal + mAirHot_flow_nominal},
from_dp=from_dp,
linearized=linearizeFlowResistance,
dp_nominal=20*{0,0,0},
energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState) ;
Fluid.Sensors.RelativePressure senRelPreHot(
redeclare package Medium =
MediumA) ;
Fluid.Sensors.RelativePressure senRelPreCol(
redeclare package Medium =
MediumA) ;
Modelica.Blocks.Interfaces.RealOutput p_relCol ;
Modelica.Blocks.Interfaces.RealOutput p_relHot ;
Fluid.Sensors.TemperatureTwoPort TSup(
redeclare package Medium =
MediumA,
m_flow_nominal=m_flow_nominal) ;
equation
connect(fraMasFlo.u, senMasFlo.m_flow);
connect(ACH.u, senMasFlo.m_flow);
connect(con.TRoo, TRoo);
connect(vavHot.port_a, port_aHot);
connect(vavHot.port_b, mix.port_2);
connect(mix.port_1, vavCol.port_b);
connect(mix.port_3, senMasFlo.port_a);
connect(senMasFlo.m_flow, con.mAir_flow);
connect(con.yHot, vavHot.y);
connect(con.yCol, vavCol.y);
connect(senRelPreHot.port_a, port_aHot);
connect(senRelPreCol.port_a, port_aCol);
connect(vavCol.port_a, port_aCol);
connect(senRelPreHot.port_b, mix.port_3);
connect(senRelPreCol.port_b, mix.port_3);
connect(senRelPreCol.p_rel, p_relCol);
connect(senRelPreHot.p_rel, p_relHot);
connect(con.TRooSetHea, controlBus.TRooSetHea);
connect(con.TRooSetCoo, controlBus.TRooSetCoo);
connect(senMasFlo.port_b, TSup.port_a);
connect(TSup.port_b, port_b);
end SupplyBranch;