Buildings.Experimental.DHC.Loads.Validation.BaseClasses

Package with base classes

Information

This package contains base classes that are used to construct the classes in Buildings.Experimental.DHC.Loads.Validation.

Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).

Package Content

Name Description
Buildings.Experimental.DHC.Loads.Validation.BaseClasses.Connection2Pipe Connection2Pipe Model for connecting an agent to a two-pipe distribution network, using fixed resistance pipe model
Buildings.Experimental.DHC.Loads.Validation.BaseClasses.Distribution2Pipe Distribution2Pipe Model of a two-pipe distribution network, using fixed resistance pipe model
Buildings.Experimental.DHC.Loads.Validation.BaseClasses.FanCoil2PipeCooling FanCoil2PipeCooling Model of a sensible only two-pipe fan coil unit for cooling, computing a required chilled water mass flow rate
Buildings.Experimental.DHC.Loads.Validation.BaseClasses.FanCoil2PipeHeating FanCoil2PipeHeating Model of a two-pipe fan coil unit for heating, computing a required heating water mass flow rate
Buildings.Experimental.DHC.Loads.Validation.BaseClasses.FanCoil2PipeHeatingValve FanCoil2PipeHeatingValve Model of a two-pipe fan coil unit for heating, with a two-way control valve

Buildings.Experimental.DHC.Loads.Validation.BaseClasses.Connection2Pipe Buildings.Experimental.DHC.Loads.Validation.BaseClasses.Connection2Pipe

Model for connecting an agent to a two-pipe distribution network, using fixed resistance pipe model

Buildings.Experimental.DHC.Loads.Validation.BaseClasses.Connection2Pipe

Information

This is a model of a connection with a two-pipe distribution network using as pipe model a fixed hydraulic resistance with no heat loss .

Extends from Networks.BaseClasses.PartialConnection2Pipe (Partial model for connecting an agent to a two-pipe distribution network).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model
replaceable model Model_pipDisFluid.FixedResistances.Press... 
replaceable model Model_pipConFluid.FixedResistances.Lossl... 
Booleanshow_entFlofalseSet to true to output enthalpy flow rate difference
PressureDifferencedpDis_nominal Pressure drop in distribution line (supply only, not counting return line) [Pa]
Nominal condition
MassFlowRatemDis_flow_nominal Nominal mass flow rate in the distribution line [kg/s]
MassFlowRatemCon_flow_nominal Nominal mass flow rate in the connection line [kg/s]
Assumptions
BooleanallowFlowReversalfalse= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Nominal condition
Timetau10Time constant at nominal flow for dynamic energy and momentum balance [s]

Connectors

TypeNameDescription
replaceable model Model_pipDis 
replaceable model Model_pipCon 
FluidPort_aport_aDisSupDistribution supply inlet port
FluidPort_bport_bDisSupDistribution supply outlet port
FluidPort_aport_aDisRetDistribution return inlet port
FluidPort_bport_bDisRetDistribution return outlet port
FluidPort_bport_bConConnection supply port
FluidPort_aport_aConConnection return port
output RealOutputmCon_flowConnection supply mass flow rate [kg/s]
output RealOutputdpPressure drop accross the connection (measured) [Pa]
output RealOutputdH_flowDifference in enthalpy flow rate between connection supply and return [W]

Modelica definition

model Connection2Pipe "Model for connecting an agent to a two-pipe distribution network, using fixed resistance pipe model" extends Networks.BaseClasses.PartialConnection2Pipe( redeclare model Model_pipDis=Fluid.FixedResistances.PressureDrop ( final dp_nominal=dpDis_nominal), redeclare model Model_pipCon=Fluid.FixedResistances.LosslessPipe); parameter Modelica.SIunits.PressureDifference dpDis_nominal "Pressure drop in distribution line (supply only, not counting return line)"; end Connection2Pipe;

Buildings.Experimental.DHC.Loads.Validation.BaseClasses.Distribution2Pipe Buildings.Experimental.DHC.Loads.Validation.BaseClasses.Distribution2Pipe

Model of a two-pipe distribution network, using fixed resistance pipe model

Buildings.Experimental.DHC.Loads.Validation.BaseClasses.Distribution2Pipe

Information

This is a model of a two-pipe distribution network using

Extends from Networks.BaseClasses.PartialDistribution2Pipe (Partial model for two-pipe distribution network).

Parameters

TypeNameDefaultDescription
replaceable package MediumPartialMediumMedium model
IntegernCon Number of connections
replaceable model Model_pipDisFluid.FixedResistances.Lossl...Model for distribution pipe
IntegeriConDpSennConIndex of the connection where the pressure drop is measured
Booleanshow_entFlofalseSet to true to output enthalpy flow rate difference at each connection
Nominal condition
MassFlowRatemDis_flow_nominal Nominal mass flow rate in the distribution line before the first connection [kg/s]
MassFlowRatemCon_flow_nominal[nCon] Nominal mass flow rate in each connection line [kg/s]
MassFlowRatemEnd_flow_nominalmDis_flow_nominal - sum(mCon...Nominal mass flow rate in the end of the distribution line [kg/s]
MassFlowRatemDisCon_flow_nominal[nCon]cat(1, {mDis_flow_nominal}, ...Nominal mass flow rate in the distribution line before each connection [kg/s]
PressureDifferencedpDis_nominal[nCon] Pressure drop in distribution line (supply only, not counting return line) [Pa]
Assumptions
BooleanallowFlowReversalfalse= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
Dynamics
Equations
DynamicsenergyDynamicsModelica.Fluid.Types.Dynamic...Type of energy balance: dynamic (3 initialization options) or steady state
Nominal condition
Timetau10Time constant at nominal flow for dynamic energy and momentum balance [s]

Connectors

TypeNameDescription
FluidPorts_aports_aCon[nCon]Connection return ports
FluidPorts_bports_bCon[nCon]Connection supply ports
FluidPort_aport_aDisSupDistribution supply inlet port
FluidPort_bport_bDisSupDistribution supply outlet port
replaceable model Model_pipDisModel for distribution pipe
FluidPort_bport_bDisRetDistribution return outlet port
FluidPort_aport_aDisRetDistribution return inlet port
output RealOutputdpPressure difference at given location (measured) [Pa]
output RealOutputdH_flow[nCon]Difference in enthalpy flow rate between connection supply and return [W]
output RealOutputmCon_flow[nCon]Connection supply mass flow rate (measured) [kg/s]

Modelica definition

model Distribution2Pipe "Model of a two-pipe distribution network, using fixed resistance pipe model" extends Networks.BaseClasses.PartialDistribution2Pipe( redeclare Connection2Pipe con[nCon]( final dpDis_nominal=dpDis_nominal), redeclare model Model_pipDis=Fluid.FixedResistances.LosslessPipe); parameter Modelica.SIunits.PressureDifference dpDis_nominal[nCon] "Pressure drop in distribution line (supply only, not counting return line)"; end Distribution2Pipe;

Buildings.Experimental.DHC.Loads.Validation.BaseClasses.FanCoil2PipeCooling Buildings.Experimental.DHC.Loads.Validation.BaseClasses.FanCoil2PipeCooling

Model of a sensible only two-pipe fan coil unit for cooling, computing a required chilled water mass flow rate

Buildings.Experimental.DHC.Loads.Validation.BaseClasses.FanCoil2PipeCooling

Information

This is a sensible only simplified model of a two-pipe fan coil unit for cooling. It is intended to be used

For the sake of simplicity, a sensible only heat exchanger model is considered.

For the sake of computational performance, a PI controller is used instead of an inverse model of the heat exchanger to assess the required water mass flow rate. The controller output signal is mapped linearly to both,

The controller tracks the load while the impact of an unmet load on the room air temperature is assessed with Buildings.Experimental.DHC.Loads.SimpleRoomODE.

Extends from Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit (Partial model for HVAC terminal unit).

Parameters

TypeNameDefaultDescription
replaceable package Medium1WaterMedium in the building distribution system
replaceable package Medium2AirLoad side medium
Realk1Gain of controller
TimeTi10Time constant of integrator block [s]
Scaling
RealfacMul1Multiplier factor
RealfacMulZon1Zone multiplier factor
Configuration
Booleanhave_heaWatfalseSet to true if the system uses heating water
Booleanhave_chiWattrueSet to true if the system uses chilled water
Booleanhave_chaOvefalseSet to true if the chilled water based heat exchanger operates in change-over
Booleanhave_eleHeafalseSet to true if the system has electric heating system
Booleanhave_eleCoofalseSet to true if the system has electric cooling system
Booleanhave_heaPorfalseSet to true for heat ports on the load side
Booleanhave_fluPorfalseSet to true for fluid ports on the load side
Booleanhave_TSenfalseSet to true for measured temperature as an input
Booleanhave_QReq_flowtrueSet to true for required heat flow rate as an input
Booleanhave_weaBusfalseSet to true to use a weather bus
Booleanhave_fantrueSet to true if fan power is computed
Booleanhave_pumfalseSet to true if pump power is computed
Booleanhave_speVartrueSet to true for a variable speed fan (otherwise fan is always on)
Nominal condition
HeatFlowRateQHea_flow_nominal0Nominal heating capacity (>=0) [W]
HeatFlowRateQCoo_flow_nominal0Nominal cooling capacity (<=0) [W]
MassFlowRatemHeaWat_flow_nominal0Heating water mass flow rate at nominal conditions [kg/s]
MassFlowRatemChiWat_flow_nominalabs(QCoo_flow_nominal/cpChiW...Chilled water mass flow rate at nominal conditions [kg/s]
MassFlowRatemLoaHea_flow_nominal0Load side mass flow rate at nominal conditions in heating mode [kg/s]
MassFlowRatemLoaCoo_flow_nominal0Load side mass flow rate at nominal conditions in cooling mode [kg/s]
TemperatureT_aHeaWat_nominal273.15 + 60Heating water inlet temperature at nominal conditions [K]
TemperatureT_bHeaWat_nominalT_aHeaWat_nominal - 22.2Heating water outlet temperature at nominal conditions [K]
TemperatureT_aChiWat_nominal273.15 + 7.2Chilled water inlet temperature at nominal conditions [K]
TemperatureT_bChiWat_nominalT_aChiWat_nominal + 5.6Chilled water outlet temperature at nominal conditions [K]
TemperatureT_aLoaHea_nominal273.15 + 21.1Load side inlet temperature at nominal conditions in heating mode [K]
TemperatureT_aLoaCoo_nominal273.15 + 26.7Load side inlet temperature at nominal conditions in cooling mode [K]
PressureDifferencedpLoa_nominal250Load side pressure drop [Pa]
Assumptions
BooleanallowFlowReversalfalseSet to true to allow flow reversal in building distribution system
BooleanallowFlowReversalLoatrueSet to true to allow flow reversal on the load side

Connectors

TypeNameDescription
replaceable package Medium1Medium in the building distribution system
replaceable package Medium2Load side medium
input RealInputTSenTemperature (measured) [K]
input RealInputTSetHeaHeating set point [K]
input RealInputTSetCooCooling set point [K]
input RealInputQReqHea_flowRequired heat flow rate to meet heating set point (>=0) [W]
input RealInputQReqCoo_flowRequired heat flow rate to meet cooling set point (<=0) [W]
output RealOutputQActHea_flowHeating heat flow rate transferred to the load (>=0) [W]
output RealOutputQActCoo_flowCooling heat flow rate transferred to the load (<=0) [W]
output RealOutputPHeaPower drawn by heating system [W]
output RealOutputPCooPower drawn by cooling system [W]
output RealOutputPFanPower drawn by fans motors [W]
output RealOutputPPumPower drawn by pumps motors [W]
output RealOutputmReqHeaWat_flowRequired heating water flow rate to meet heating set point [kg/s]
output RealOutputmReqChiWat_flowRequired chilled water flow rate to meet cooling set point [kg/s]
FluidPort_aport_aLoaFluid stream inlet port on the load side
FluidPort_bport_bLoaFluid stream outlet port on the load side
HeatPort_bheaPorConHeat port transferring convective heat to the load
HeatPort_bheaPorRadHeat port transferring radiative heat to the load
BusweaBusWeather data bus
FluidPort_aport_aHeaWatHeating water inlet port
FluidPort_aport_aChiWatChilled water inlet port
FluidPort_bport_bHeaWatHeating water outlet port
FluidPort_bport_bChiWatChilled water outlet port

Modelica definition

model FanCoil2PipeCooling "Model of a sensible only two-pipe fan coil unit for cooling, computing a required chilled water mass flow rate" extends Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit( redeclare package Medium1=Buildings.Media.Water, redeclare package Medium2=Buildings.Media.Air, final have_heaPor=false, final have_fluPor=false, final have_fan=true, final have_heaWat=false, final have_chiWat=true, final have_QReq_flow=true, allowFlowReversal=false, allowFlowReversalLoa=true, final have_chaOve=false, final have_eleHea=false, final have_eleCoo=false, final have_TSen=false, final have_weaBus=false, final have_pum=false, mChiWat_flow_nominal=abs( QCoo_flow_nominal/cpChiWat_nominal/(T_aChiWat_nominal-T_bChiWat_nominal))); import hexConfiguration=Buildings.Fluid.Types.HeatExchangerConfiguration; parameter Real k( min=0)=1 "Gain of controller"; parameter Modelica.SIunits.Time Ti( min=Modelica.Constants.small)=10 "Time constant of integrator block"; parameter Modelica.SIunits.PressureDifference dpLoa_nominal( displayUnit="Pa") = 250 "Load side pressure drop"; final parameter hexConfiguration hexConCoo=hexConfiguration.CounterFlow "Cooling heat exchanger configuration"; parameter Boolean have_speVar=true "Set to true for a variable speed fan (otherwise fan is always on)"; Buildings.Controls.OBC.CDL.Continuous.PIDWithReset con( final k=k, final Ti=Ti, controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, final reverseActing=true) "PI controller"; Buildings.Fluid.Movers.FlowControlled_m_flow fan( redeclare final package Medium=Medium2, final allowFlowReversal=allowFlowReversalLoa, final m_flow_nominal=mLoaCoo_flow_nominal, redeclare final Fluid.Movers.Data.Generic per, nominalValuesDefineDefaultPressureCurve=true, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, use_inputFilter=false, final dp_nominal=dpLoa_nominal) "Fan"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hex( redeclare final package Medium1=Medium1, redeclare final package Medium2=Medium2, final configuration=hexConCoo, final m1_flow_nominal=mChiWat_flow_nominal, final m2_flow_nominal=mLoaCoo_flow_nominal, final dp1_nominal=0, final dp2_nominal=0, final Q_flow_nominal=QCoo_flow_nominal, final T_a1_nominal=T_aChiWat_nominal, final T_a2_nominal=T_aLoaCoo_nominal, final allowFlowReversal1=allowFlowReversal, final allowFlowReversal2=allowFlowReversalLoa) "Cooling coil"; Buildings.Controls.OBC.CDL.Continuous.Gain gaiMasFlo( k=mChiWat_flow_nominal) "Scale water flow rate"; Modelica.Blocks.Sources.RealExpression Q_flowCoo( y=hex.Q2_flow); Buildings.Controls.OBC.CDL.Continuous.Gain gaiFloNom2( k=mLoaCoo_flow_nominal) "Scale air flow rate"; Fluid.Sources.Boundary_pT sinAir( redeclare package Medium=Medium2, use_T_in=false, nPorts=1) "Sink for supply air"; Fluid.Sources.Boundary_pT retAir( redeclare package Medium=Medium2, use_T_in=true, nPorts=1) "Source for return air"; Buildings.Experimental.DHC.Loads.SimpleRoomODE TLoaODE( TOutHea_nominal=273.15 - 5, TIndHea_nominal=T_aLoaHea_nominal, QHea_flow_nominal=QHea_flow_nominal); Buildings.Controls.OBC.CDL.Continuous.Gain gaiHeaFlo( k=1/QCoo_flow_nominal); Buildings.Controls.OBC.CDL.Continuous.Gain gaiHeaFlo1( k=1/QCoo_flow_nominal); Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr( t=1E-4, h=0.5E-4) "Reset when demand rises from zero"; Fluid.FixedResistances.PressureDrop resLoa( redeclare final package Medium = Medium2, final m_flow_nominal=mLoaCoo_flow_nominal, final dp_nominal=dpLoa_nominal) "Load side pressure drop"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant one(k=1) "One constant"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con1(k=have_speVar); Buildings.Controls.OBC.CDL.Logical.Switch swi "Logical switch"; equation connect(gaiFloNom2.y,fan.m_flow_in); connect(con.y,gaiMasFlo.u); connect(fan.P,mulPFan.u); connect(fan.port_b,hex.port_a2); connect(hex.port_b2,sinAir.ports[1]); connect(Q_flowCoo.y,TLoaODE.QAct_flow); connect(TLoaODE.TAir,retAir.T_in); connect(gaiMasFlo.y,mulMasFloReqChiWat.u); connect(mulQReqCoo_flow.y,TLoaODE.QReq_flow); connect(Q_flowCoo.y,mulQActCoo_flow.u); connect(TSetCoo,TLoaODE.TSet); connect(mulQReqCoo_flow.y,gaiHeaFlo.u); connect(gaiHeaFlo.y,con.u_s); connect(con.u_m,gaiHeaFlo1.y); connect(Q_flowCoo.y,gaiHeaFlo1.u); connect(greThr.y,con.trigger); connect(gaiHeaFlo.y,greThr.u); connect(mulChiWatFloInl.port_b,hex.port_a1); connect(hex.port_b1,mulChiWatFloOut.port_a); connect(retAir.ports[1], resLoa.port_a); connect(resLoa.port_b, fan.port_a); connect(gaiFloNom2.u, swi.y); connect(con.y, swi.u1); connect(con1.y, swi.u2); connect(one.y, swi.u3); end FanCoil2PipeCooling;

Buildings.Experimental.DHC.Loads.Validation.BaseClasses.FanCoil2PipeHeating Buildings.Experimental.DHC.Loads.Validation.BaseClasses.FanCoil2PipeHeating

Model of a two-pipe fan coil unit for heating, computing a required heating water mass flow rate

Buildings.Experimental.DHC.Loads.Validation.BaseClasses.FanCoil2PipeHeating

Information

This is a simplified model of a two-pipe fan coil unit for heating. It is intended to be used

For the sake of computational performance, a PI controller is used instead of an inverse model of the heat exchanger to assess the required water mass flow rate. The controller output signal is mapped linearly to both,

The controller tracks the load while the impact of an unmet load on the room air temperature is assessed with Buildings.Experimental.DHC.Loads.SimpleRoomODE.

Extends from Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit (Partial model for HVAC terminal unit).

Parameters

TypeNameDefaultDescription
replaceable package Medium1WaterMedium in the building distribution system
replaceable package Medium2AirLoad side medium
Realk1Gain of controller
TimeTi10Time constant of integrator block [s]
Scaling
RealfacMul1Multiplier factor
RealfacMulZon1Zone multiplier factor
Configuration
Booleanhave_heaWattrueSet to true if the system uses heating water
Booleanhave_chiWatfalseSet to true if the system uses chilled water
Booleanhave_chaOvefalseSet to true if the chilled water based heat exchanger operates in change-over
Booleanhave_eleHeafalseSet to true if the system has electric heating system
Booleanhave_eleCoofalseSet to true if the system has electric cooling system
Booleanhave_heaPorfalseSet to true for heat ports on the load side
Booleanhave_fluPorfalseSet to true for fluid ports on the load side
Booleanhave_TSenfalseSet to true for measured temperature as an input
Booleanhave_QReq_flowtrueSet to true for required heat flow rate as an input
Booleanhave_weaBusfalseSet to true to use a weather bus
Booleanhave_fantrueSet to true if fan power is computed
Booleanhave_pumfalseSet to true if pump power is computed
Booleanhave_speVartrueSet to true for a variable speed fan (otherwise fan is always on)
Nominal condition
HeatFlowRateQHea_flow_nominal0Nominal heating capacity (>=0) [W]
HeatFlowRateQCoo_flow_nominal0Nominal cooling capacity (<=0) [W]
MassFlowRatemHeaWat_flow_nominalabs(QHea_flow_nominal/cpHeaW...Heating water mass flow rate at nominal conditions [kg/s]
MassFlowRatemChiWat_flow_nominal0Chilled water mass flow rate at nominal conditions [kg/s]
MassFlowRatemLoaHea_flow_nominal0Load side mass flow rate at nominal conditions in heating mode [kg/s]
MassFlowRatemLoaCoo_flow_nominal0Load side mass flow rate at nominal conditions in cooling mode [kg/s]
TemperatureT_aHeaWat_nominal273.15 + 60Heating water inlet temperature at nominal conditions [K]
TemperatureT_bHeaWat_nominalT_aHeaWat_nominal - 22.2Heating water outlet temperature at nominal conditions [K]
TemperatureT_aChiWat_nominal273.15 + 7.2Chilled water inlet temperature at nominal conditions [K]
TemperatureT_bChiWat_nominalT_aChiWat_nominal + 5.6Chilled water outlet temperature at nominal conditions [K]
TemperatureT_aLoaHea_nominal273.15 + 21.1Load side inlet temperature at nominal conditions in heating mode [K]
TemperatureT_aLoaCoo_nominal273.15 + 26.7Load side inlet temperature at nominal conditions in cooling mode [K]
PressureDifferencedpLoa_nominal250Load side pressure drop [Pa]
Assumptions
BooleanallowFlowReversalfalseSet to true to allow flow reversal in building distribution system
BooleanallowFlowReversalLoatrueSet to true to allow flow reversal on the load side

Connectors

TypeNameDescription
replaceable package Medium1Medium in the building distribution system
replaceable package Medium2Load side medium
input RealInputTSenTemperature (measured) [K]
input RealInputTSetHeaHeating set point [K]
input RealInputTSetCooCooling set point [K]
input RealInputQReqHea_flowRequired heat flow rate to meet heating set point (>=0) [W]
input RealInputQReqCoo_flowRequired heat flow rate to meet cooling set point (<=0) [W]
output RealOutputQActHea_flowHeating heat flow rate transferred to the load (>=0) [W]
output RealOutputQActCoo_flowCooling heat flow rate transferred to the load (<=0) [W]
output RealOutputPHeaPower drawn by heating system [W]
output RealOutputPCooPower drawn by cooling system [W]
output RealOutputPFanPower drawn by fans motors [W]
output RealOutputPPumPower drawn by pumps motors [W]
output RealOutputmReqHeaWat_flowRequired heating water flow rate to meet heating set point [kg/s]
output RealOutputmReqChiWat_flowRequired chilled water flow rate to meet cooling set point [kg/s]
FluidPort_aport_aLoaFluid stream inlet port on the load side
FluidPort_bport_bLoaFluid stream outlet port on the load side
HeatPort_bheaPorConHeat port transferring convective heat to the load
HeatPort_bheaPorRadHeat port transferring radiative heat to the load
BusweaBusWeather data bus
FluidPort_aport_aHeaWatHeating water inlet port
FluidPort_aport_aChiWatChilled water inlet port
FluidPort_bport_bHeaWatHeating water outlet port
FluidPort_bport_bChiWatChilled water outlet port

Modelica definition

model FanCoil2PipeHeating "Model of a two-pipe fan coil unit for heating, computing a required heating water mass flow rate" extends Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit( redeclare package Medium1=Buildings.Media.Water, redeclare package Medium2=Buildings.Media.Air, final have_heaPor=false, final have_fluPor=false, final have_fan=true, final have_heaWat=true, final have_chiWat=false, final have_QReq_flow=true, allowFlowReversal=false, allowFlowReversalLoa=true, final have_chaOve=false, final have_eleHea=false, final have_eleCoo=false, final have_TSen=false, final have_weaBus=false, final have_pum=false, mHeaWat_flow_nominal=abs( QHea_flow_nominal/cpHeaWat_nominal/(T_aHeaWat_nominal-T_bHeaWat_nominal))); import hexConfiguration=Buildings.Fluid.Types.HeatExchangerConfiguration; parameter Real k( min=0)=1 "Gain of controller"; parameter Modelica.SIunits.Time Ti( min=Modelica.Constants.small)=10 "Time constant of integrator block"; parameter Modelica.SIunits.PressureDifference dpLoa_nominal( displayUnit="Pa") = 250 "Load side pressure drop"; final parameter hexConfiguration hexConHea=hexConfiguration.CounterFlow "Heating heat exchanger configuration"; parameter Boolean have_speVar=true "Set to true for a variable speed fan (otherwise fan is always on)"; Buildings.Fluid.Movers.FlowControlled_m_flow fan( redeclare final package Medium=Medium2, final allowFlowReversal=allowFlowReversalLoa, final m_flow_nominal=mLoaHea_flow_nominal, redeclare final Fluid.Movers.Data.Generic per, nominalValuesDefineDefaultPressureCurve=true, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, use_inputFilter=false, final dp_nominal=dpLoa_nominal) "Fan"; Buildings.Controls.OBC.CDL.Continuous.PIDWithReset con( final k=k, final Ti=Ti, controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, final reverseActing=true) "PI controller"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hex( redeclare final package Medium1=Medium1, redeclare final package Medium2=Medium2, final configuration=hexConHea, final m1_flow_nominal=mHeaWat_flow_nominal, final m2_flow_nominal=mLoaHea_flow_nominal, final dp1_nominal=0, final dp2_nominal=0, final Q_flow_nominal=QHea_flow_nominal, final T_a1_nominal=T_aHeaWat_nominal, final T_a2_nominal=T_aLoaHea_nominal, final allowFlowReversal1=allowFlowReversal, final allowFlowReversal2=allowFlowReversalLoa) "Heating coil"; Buildings.Controls.OBC.CDL.Continuous.Gain gaiMasFlo( k=mHeaWat_flow_nominal) "Scale water flow rate"; Modelica.Blocks.Sources.RealExpression Q_flowHea( y=hex.Q2_flow); Buildings.Controls.OBC.CDL.Continuous.Gain gaiFloNom2( k=mLoaHea_flow_nominal) "Scale air flow rate"; Fluid.Sources.Boundary_pT sinAir( redeclare package Medium=Medium2, use_p_in=false, nPorts=1) "Sink for supply air"; Fluid.Sources.Boundary_pT retAir( redeclare package Medium=Medium2, p(displayUnit="Pa"), use_T_in=true, nPorts=1) "Source for return air"; Buildings.Experimental.DHC.Loads.SimpleRoomODE TLoaODE( TOutHea_nominal=273.15-5, TIndHea_nominal=T_aLoaHea_nominal, QHea_flow_nominal=QHea_flow_nominal); Buildings.Controls.OBC.CDL.Continuous.Gain gaiHeaFlo( k=1/QHea_flow_nominal); Buildings.Controls.OBC.CDL.Continuous.Gain gaiHeaFlo1( k=1/QHea_flow_nominal); Buildings.Controls.OBC.CDL.Logical.Switch swi "Logical switch"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant one( k=1) "One constant"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con1( k=have_speVar); Buildings.Controls.OBC.CDL.Continuous.GreaterThreshold greThr( t=1E-4, h=0.5E-4) "Reset when demand rises from zero"; Fluid.FixedResistances.PressureDrop resLoa( redeclare final package Medium = Medium2, final m_flow_nominal=mLoaHea_flow_nominal, final dp_nominal=dpLoa_nominal) "Load side pressure drop"; equation connect(gaiFloNom2.y,fan.m_flow_in); connect(con.y,gaiMasFlo.u); connect(gaiMasFlo.y,mulMasFloReqHeaWat.u); connect(fan.P,mulPFan.u); connect(Q_flowHea.y,mulQActHea_flow.u); connect(fan.port_b,hex.port_a2); connect(hex.port_b2,sinAir.ports[1]); connect(TSetHea,TLoaODE.TSet); connect(TLoaODE.TAir,retAir.T_in); connect(gaiHeaFlo.y,con.u_s); connect(con.u_m,gaiHeaFlo1.y); connect(swi.y,gaiFloNom2.u); connect(con.y,swi.u1); connect(one.y,swi.u3); connect(con1.y,swi.u2); connect(mulQReqHea_flow.y,gaiHeaFlo.u); connect(mulQReqHea_flow.y,TLoaODE.QReq_flow); connect(Q_flowHea.y,gaiHeaFlo1.u); connect(Q_flowHea.y,TLoaODE.QAct_flow); connect(mulHeaWatFloInl.port_b,hex.port_a1); connect(hex.port_b1,mulHeaWatFloOut.port_a); connect(gaiHeaFlo.y,greThr.u); connect(greThr.y,con.trigger); connect(retAir.ports[1], resLoa.port_a); connect(resLoa.port_b, fan.port_a); end FanCoil2PipeHeating;

Buildings.Experimental.DHC.Loads.Validation.BaseClasses.FanCoil2PipeHeatingValve Buildings.Experimental.DHC.Loads.Validation.BaseClasses.FanCoil2PipeHeatingValve

Model of a two-pipe fan coil unit for heating, with a two-way control valve

Buildings.Experimental.DHC.Loads.Validation.BaseClasses.FanCoil2PipeHeatingValve

Information

This is a simplified model of a two-pipe fan coil unit for heating. It is intended to be used in a case where the room thermal loads are provided as time series, and hence it takes the load as an input.

A PI controller tracks the load. The controller output signal is mapped linearly to both,

The impact of an unmet load on the room air temperature is assessed with Buildings.Experimental.DHC.Loads.SimpleRoomODE.

Extends from Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit (Partial model for HVAC terminal unit).

Parameters

TypeNameDefaultDescription
replaceable package Medium1WaterMedium in the building distribution system
replaceable package Medium2AirLoad side medium
Booleanhave_speVartrueSet to true for a variable speed fan (otherwise fan is always on)
PressureDifferencedpSou_nominal30000Nominal pressure drop on source side [Pa]
Scaling
RealfacMul1Multiplier factor
RealfacMulZon1Zone multiplier factor
Configuration
Booleanhave_heaWattrueSet to true if the system uses heating water
Booleanhave_chiWatfalseSet to true if the system uses chilled water
Booleanhave_chaOvefalseSet to true if the chilled water based heat exchanger operates in change-over
Booleanhave_eleHeafalseSet to true if the system has electric heating system
Booleanhave_eleCoofalseSet to true if the system has electric cooling system
Booleanhave_heaPorfalseSet to true for heat ports on the load side
Booleanhave_fluPorfalseSet to true for fluid ports on the load side
Booleanhave_TSenfalseSet to true for measured temperature as an input
Booleanhave_QReq_flowtrueSet to true for required heat flow rate as an input
Booleanhave_weaBusfalseSet to true to use a weather bus
Booleanhave_fantrueSet to true if fan power is computed
Booleanhave_pumfalseSet to true if pump power is computed
Nominal condition
HeatFlowRateQHea_flow_nominal0Nominal heating capacity (>=0) [W]
HeatFlowRateQCoo_flow_nominal0Nominal cooling capacity (<=0) [W]
MassFlowRatemHeaWat_flow_nominalabs(QHea_flow_nominal/cpHeaW...Heating water mass flow rate at nominal conditions [kg/s]
MassFlowRatemChiWat_flow_nominal0Chilled water mass flow rate at nominal conditions [kg/s]
MassFlowRatemLoaHea_flow_nominal0Load side mass flow rate at nominal conditions in heating mode [kg/s]
MassFlowRatemLoaCoo_flow_nominal0Load side mass flow rate at nominal conditions in cooling mode [kg/s]
TemperatureT_aHeaWat_nominal273.15 + 60Heating water inlet temperature at nominal conditions [K]
TemperatureT_bHeaWat_nominalT_aHeaWat_nominal - 22.2Heating water outlet temperature at nominal conditions [K]
TemperatureT_aChiWat_nominal273.15 + 7.2Chilled water inlet temperature at nominal conditions [K]
TemperatureT_bChiWat_nominalT_aChiWat_nominal + 5.6Chilled water outlet temperature at nominal conditions [K]
TemperatureT_aLoaHea_nominal273.15 + 21.1Load side inlet temperature at nominal conditions in heating mode [K]
TemperatureT_aLoaCoo_nominal273.15 + 26.7Load side inlet temperature at nominal conditions in cooling mode [K]
PressureDifferencedpLoa_nominal250Load side pressure drop [Pa]
Assumptions
BooleanallowFlowReversalfalseSet to true to allow flow reversal in building distribution system
BooleanallowFlowReversalLoatrueSet to true to allow flow reversal on the load side

Connectors

TypeNameDescription
replaceable package Medium1Medium in the building distribution system
replaceable package Medium2Load side medium
input RealInputTSenTemperature (measured) [K]
input RealInputTSetHeaHeating set point [K]
input RealInputTSetCooCooling set point [K]
input RealInputQReqHea_flowRequired heat flow rate to meet heating set point (>=0) [W]
input RealInputQReqCoo_flowRequired heat flow rate to meet cooling set point (<=0) [W]
output RealOutputQActHea_flowHeating heat flow rate transferred to the load (>=0) [W]
output RealOutputQActCoo_flowCooling heat flow rate transferred to the load (<=0) [W]
output RealOutputPHeaPower drawn by heating system [W]
output RealOutputPCooPower drawn by cooling system [W]
output RealOutputPFanPower drawn by fans motors [W]
output RealOutputPPumPower drawn by pumps motors [W]
output RealOutputmReqHeaWat_flowRequired heating water flow rate to meet heating set point [kg/s]
output RealOutputmReqChiWat_flowRequired chilled water flow rate to meet cooling set point [kg/s]
FluidPort_aport_aLoaFluid stream inlet port on the load side
FluidPort_bport_bLoaFluid stream outlet port on the load side
HeatPort_bheaPorConHeat port transferring convective heat to the load
HeatPort_bheaPorRadHeat port transferring radiative heat to the load
BusweaBusWeather data bus
FluidPort_aport_aHeaWatHeating water inlet port
FluidPort_aport_aChiWatChilled water inlet port
FluidPort_bport_bHeaWatHeating water outlet port
FluidPort_bport_bChiWatChilled water outlet port

Modelica definition

model FanCoil2PipeHeatingValve "Model of a two-pipe fan coil unit for heating, with a two-way control valve" extends Buildings.Experimental.DHC.Loads.BaseClasses.PartialTerminalUnit( redeclare package Medium1=Buildings.Media.Water, redeclare package Medium2=Buildings.Media.Air, final have_heaPor=false, final have_fluPor=false, final have_fan=true, final have_heaWat=true, final have_chiWat=false, final have_QReq_flow=true, final allowFlowReversal=false, final allowFlowReversalLoa=true, final have_chaOve=false, final have_eleHea=false, final have_eleCoo=false, final have_TSen=false, final have_weaBus=false, final have_pum=false, final mHeaWat_flow_nominal=abs( QHea_flow_nominal/cpHeaWat_nominal/(T_aHeaWat_nominal-T_bHeaWat_nominal))); import hexConfiguration=Buildings.Fluid.Types.HeatExchangerConfiguration; final parameter hexConfiguration hexConHea=hexConfiguration.CounterFlow "Heating heat exchanger configuration"; parameter Boolean have_speVar=true "Set to true for a variable speed fan (otherwise fan is always on)"; parameter Modelica.SIunits.PressureDifference dpLoa_nominal( displayUnit="Pa") = 250 "Load side pressure drop"; parameter Modelica.SIunits.PressureDifference dpSou_nominal=30000 "Nominal pressure drop on source side"; Buildings.Fluid.Movers.FlowControlled_m_flow fan( redeclare final package Medium=Medium2, final allowFlowReversal=allowFlowReversalLoa, final m_flow_nominal=mLoaHea_flow_nominal, redeclare final Fluid.Movers.Data.Generic per, addPowerToMedium=true, nominalValuesDefineDefaultPressureCurve=true, energyDynamics=Modelica.Fluid.Types.Dynamics.SteadyState, use_inputFilter=false, final dp_nominal=dpLoa_nominal) "Fan"; Buildings.Controls.OBC.CDL.Continuous.PID con( Ti=10, yMax=1, controllerType=Buildings.Controls.OBC.CDL.Types.SimpleController.PI, reverseActing=true, yMin=0) "PI controller"; Buildings.Fluid.HeatExchangers.DryCoilEffectivenessNTU hex( redeclare final package Medium1=Medium1, redeclare final package Medium2=Medium2, final configuration=hexConHea, final m1_flow_nominal=mHeaWat_flow_nominal, final m2_flow_nominal=mLoaHea_flow_nominal, final dp1_nominal=0, final dp2_nominal=0, final Q_flow_nominal=QHea_flow_nominal, final T_a1_nominal=T_aHeaWat_nominal, final T_a2_nominal=T_aLoaHea_nominal, final allowFlowReversal1=allowFlowReversal, final allowFlowReversal2=allowFlowReversalLoa) "Heating coil"; Modelica.Blocks.Sources.RealExpression Q_flowHea( y=hex.Q2_flow); Buildings.Controls.OBC.CDL.Continuous.Gain gaiFloNom2( k=mLoaHea_flow_nominal); Fluid.Sources.Boundary_pT sinAir( redeclare package Medium=Medium2, use_T_in=false, nPorts=1) "Sink for supply air"; Fluid.Sources.Boundary_pT retAir( redeclare package Medium=Medium2, use_T_in=true, nPorts=1) "Source for return air"; Buildings.Experimental.DHC.Loads.SimpleRoomODE TLoaODE( TOutHea_nominal=273.15-5, TIndHea_nominal=T_aLoaHea_nominal, QHea_flow_nominal=QHea_flow_nominal); Fluid.Actuators.Valves.TwoWayEqualPercentage val( redeclare final package Medium=Medium1, final m_flow_nominal=mHeaWat_flow_nominal, dpValve_nominal=10000, use_inputFilter=false, final allowFlowReversal=allowFlowReversal, dpFixed_nominal=dpSou_nominal-10000); Fluid.Sensors.MassFlowRate senMasFlo( redeclare final package Medium=Medium1, final allowFlowReversal=allowFlowReversal); Buildings.Controls.OBC.CDL.Continuous.Gain gaiHeaFlo( k=1/QHea_flow_nominal); Buildings.Controls.OBC.CDL.Continuous.Gain gaiHeaFlo1( k=1/QHea_flow_nominal); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant one( k=1) "One constant"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con1( k=have_speVar); Buildings.Controls.OBC.CDL.Logical.Switch swi "Logical switch"; Fluid.FixedResistances.PressureDrop resLoa( redeclare final package Medium = Medium2, final m_flow_nominal=mLoaHea_flow_nominal, final dp_nominal=dpLoa_nominal) "Load side pressure drop"; equation connect(gaiFloNom2.y,fan.m_flow_in); connect(fan.P,mulPFan.u); connect(Q_flowHea.y,mulQActHea_flow.u); connect(fan.port_b,hex.port_a2); connect(hex.port_b2,sinAir.ports[1]); connect(TSetHea,TLoaODE.TSet); connect(mulQReqHea_flow.y,TLoaODE.QReq_flow); connect(Q_flowHea.y,TLoaODE.QAct_flow); connect(TLoaODE.TAir,retAir.T_in); connect(hex.port_b1,val.port_a); connect(val.port_b,senMasFlo.port_a); connect(con.y,val.y); connect(senMasFlo.m_flow,mulMasFloReqHeaWat.u); connect(mulQReqHea_flow.y,gaiHeaFlo.u); connect(gaiHeaFlo.y,con.u_s); connect(Q_flowHea.y,gaiHeaFlo1.u); connect(con.u_m,gaiHeaFlo1.y); connect(gaiFloNom2.u,swi.y); connect(con.y,swi.u1); connect(con1.y,swi.u2); connect(one.y,swi.u3); connect(senMasFlo.port_b,mulHeaWatFloOut.port_a); connect(mulHeaWatFloInl.port_b,hex.port_a1); connect(retAir.ports[1], resLoa.port_a); connect(resLoa.port_b, fan.port_a); end FanCoil2PipeHeatingValve;