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

Package with base classes

Information

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

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

Package Content

Name Description
Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.Building Building Dummy building model for validation purposes
Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.BuildingWithETS BuildingWithETS Dummy building with ETS model for validation purposes
Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.ETS ETS Dummy ETS model for validation purposes
Buildings.Experimental.DHC.Loads.BaseClasses.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.BaseClasses.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.BaseClasses.Validation.BaseClasses.FanCoil2PipeHeatingValve FanCoil2PipeHeatingValve Model of a two-pipe fan coil unit for heating, with a two-way control valve

Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.Building Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.Building

Dummy building model for validation purposes

Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.Building

Information

This is a minimum example of a class extending Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding developed for testing purposes only.

Extends from Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding (Partial class for building model).

Parameters

TypeNameDefaultDescription
replaceable package MediumWaterMedium in the building distribution system
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
Configuration
Booleanhave_heaWatfalseSet to true if the building has heating water system
Booleanhave_chiWatfalseSet to true if the building has chilled water system
Booleanhave_eleHeafalseSet to true if the building has decentralized electric heating system
Booleanhave_eleCoofalseSet to true if the building has decentralized electric cooling system
Booleanhave_fanfalseSet to true if fan power is computed
Booleanhave_pumfalseSet to true if pump power is computed
Booleanhave_weaBusfalseSet to true to use a weather bus
Scaling
RealfacMul1Multiplier factor
Nominal condition
HeatFlowRateQChiWat_flow_nominal Design heat flow rate for chilled water production (<0) [W]
HeatFlowRateQHeaWat_flow_nominal Design heat flow rate for heating water production (>0) [W]
Assumptions
BooleanallowFlowReversalfalse= true to allow flow reversal, false restricts to design direction (port_a -> port_b)

Connectors

TypeNameDescription
BusweaBusWeather data bus
FluidPorts_aports_aHeaWat[nPorts_aHeaWat]Heating water inlet ports
FluidPorts_bports_bHeaWat[nPorts_bHeaWat]Heating water outlet ports
FluidPorts_aports_aChiWat[nPorts_aChiWat]Chilled water inlet ports
FluidPorts_bports_bChiWat[nPorts_bChiWat]Chilled water outlet ports
output RealOutputQHea_flowTotal heating heat flow rate transferred to the loads (>=0) [W]
output RealOutputQCoo_flowTotal cooling heat flow rate transferred to the loads (<=0) [W]
output RealOutputPHeaPower drawn by decentralized heating system [W]
output RealOutputPCooPower drawn by decentralized cooling system [W]
output RealOutputPFanPower drawn by fan motors [W]
output RealOutputPPumPower drawn by pump motors [W]

Modelica definition

model Building "Dummy building model for validation purposes" extends Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuilding; parameter Modelica.Units.SI.HeatFlowRate QChiWat_flow_nominal "Design heat flow rate for chilled water production (<0)"; parameter Modelica.Units.SI.HeatFlowRate QHeaWat_flow_nominal "Design heat flow rate for heating water production (>0)"; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal "Nominal mass flow rate"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant souPHea( k=1); Buildings.Controls.OBC.CDL.Reals.Sources.Constant souPCoo( k=1); Buildings.Controls.OBC.CDL.Reals.Sources.Constant souPFan( k=1); Buildings.Controls.OBC.CDL.Reals.Sources.Constant souPPum( k=1); Fluid.HeatExchangers.HeaterCooler_u loaHea( redeclare final package Medium=Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, final Q_flow_nominal=-QHeaWat_flow_nominal, final m_flow_nominal=m_flow_nominal, dp_nominal=0) if have_heaWat "Heating load"; Fluid.HeatExchangers.HeaterCooler_u loaCoo( redeclare final package Medium = Medium, energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial, final Q_flow_nominal=-QChiWat_flow_nominal, final m_flow_nominal=m_flow_nominal, dp_nominal=0) if have_chiWat "Cooling load"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant one(k=1) "One"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai( k=-1) if have_heaWat "Opposite"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gai1( k=-1) if have_chiWat "Opposite"; equation connect(souPHea.y, mulPHea.u); connect(souPCoo.y, mulPCoo.u); connect(souPFan.y, mulPFan.u); connect(souPPum.y, mulPPum.u); connect(mulHeaWatInl[1].port_b, loaHea.port_a); connect(loaHea.port_b, mulHeaWatOut[1].port_a); connect(loaCoo.port_b, mulChiWatOut[1].port_a); connect(mulChiWatInl[1].port_b, loaCoo.port_a); connect(loaHea.Q_flow, gai.u); connect(loaCoo.Q_flow, gai1.u); connect(gai.y, mulQHea_flow.u); connect(gai1.y, mulQCoo_flow.u); connect(one.y, loaHea.u); connect(one.y, loaCoo.u); end Building;

Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.BuildingWithETS Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.BuildingWithETS

Dummy building with ETS model for validation purposes

Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.BuildingWithETS

Information

This is a minimum example of a class extending Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuildingWithPartialETS developed for testing purposes only.

Extends from Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuildingWithPartialETS (Partial model of a building with an energy transfer station).

Parameters

TypeNameDefaultDescription
replaceable package MediumSerWaterService side medium
replaceable package MediumSerHea_aWaterService side medium at heating inlet
replaceable package MediumBuiWaterBuilding side medium
Configuration
IntegernPorts_heaWat0Number of heating water fluid ports
IntegernPorts_chiWat0Number of chilled water fluid ports
Scaling
RealfacMul1Multiplier factor
Assumptions
BooleanallowFlowReversalSerfalseSet to true to allow flow reversal on service side
BooleanallowFlowReversalBuifalseSet to true to allow flow reversal on building side

Connectors

TypeNameDescription
FluidPort_aport_aSerAmbFluid connector for ambient water service supply line
FluidPort_bport_bSerAmbFluid connector for ambient water service return line
FluidPort_aport_aSerHeaFluid connector for heating service supply line
FluidPort_bport_bSerHeaFluid connector for heating service return line
FluidPort_aport_aSerCooFluid connector for cooling service supply line
FluidPort_bport_bSerCooFluid connector for cooling service return line
BusweaBusWeather data bus
output RealOutputQHea_flowTotal heating heat flow rate transferred to the loads (>=0) [W]
output RealOutputQCoo_flowTotal cooling heat flow rate transferred to the loads (<=0) [W]
output RealOutputPHeaPower drawn by heating system [W]
output RealOutputPCooPower drawn by cooling system [W]
output RealOutputPFanPower drawn by fan motors [W]
output RealOutputPPumPower drawn by pump motors [W]
output RealOutputQFue_flow[nFue]Fuel energy input rate [W]

Modelica definition

model BuildingWithETS "Dummy building with ETS model for validation purposes" extends Buildings.Experimental.DHC.Loads.BaseClasses.PartialBuildingWithPartialETS ( redeclare ETS ets, redeclare Building bui( final QChiWat_flow_nominal=QChiWat_flow_nominal, final QHeaWat_flow_nominal=QHeaWat_flow_nominal, final m_flow_nominal=ets.m_flow_nominal)); end BuildingWithETS;

Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.ETS Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.ETS

Dummy ETS model for validation purposes

Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.ETS

Information

This is a minimum example of a class extending Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.PartialETS developed for testing purposes only.

Extends from Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.PartialETS (Partial class for modeling an energy transfer station).

Parameters

TypeNameDefaultDescription
replaceable package MediumSerWaterService side medium
replaceable package MediumSerHea_aWaterService side medium at heating inlet
replaceable package MediumBuiWaterBuilding side medium
Genericfue[nFue] Fuel type
MassFlowRatem_flow_nominal Nominal mass flow rate [kg/s]
Configuration
DistrictSystemTypetypTypDisSys.CombinedGeneration...Type of district system
Booleanhave_heaWatfalseSet to true if the ETS supplies heating water
Booleanhave_hotWatfalseSet to true if the ETS supplies hot water
Booleanhave_chiWatfalseSet to true if the ETS supplies chilled water
Booleanhave_fanfalseSet to true if fan power is computed
Booleanhave_pumfalseSet to true if pump power is computed
Booleanhave_eleHeafalseSet to true if the ETS has electric heating system
IntegernFue0Number of fuel types (0 means no combustion system)
Booleanhave_eleCoofalseSet to true if the ETS has electric cooling system
Booleanhave_weaBusfalseSet to true to use a weather bus
Nominal condition
HeatFlowRateQHeaWat_flow_nominal0Nominal capacity of heating system (>=0) [W]
HeatFlowRateQHotWat_flow_nominal0Nominal capacity of hot water production system (>=0) [W]
HeatFlowRateQChiWat_flow_nominal0Nominal capacity of cooling system (<=0) [W]
Assumptions
BooleanallowFlowReversalSerfalseSet to true to allow flow reversal on service side
BooleanallowFlowReversalBuifalseSet to true to allow flow reversal on building side

Connectors

TypeNameDescription
FluidPorts_aports_aHeaWat[nPorts_aHeaWat]Fluid connectors for heating water return (from building)
FluidPorts_bports_bHeaWat[nPorts_bHeaWat]Fluid connectors for heating water supply (to building)
FluidPorts_aports_aChiWat[nPorts_aChiWat]Fluid connectors for chilled water return (from building)
FluidPorts_bports_bChiWat[nPorts_bChiWat]Fluid connectors for chilled water supply (to building)
FluidPort_aport_aSerAmbFluid connector for ambient water service supply line
FluidPort_bport_bSerAmbFluid connector for ambient water service return line
FluidPort_aport_aSerHeaFluid connector for heating service supply line
FluidPort_bport_bSerHeaFluid connector for heating service return line
FluidPort_aport_aSerCooFluid connector for cooling service supply line
FluidPort_bport_bSerCooFluid connector for cooling service return line
output RealOutputPHeaPower drawn by heating system [W]
output RealOutputPCooPower drawn by cooling system [W]
output RealOutputPFanPower drawn by fan motors [W]
output RealOutputPPumPower drawn by pump motors [W]
output RealOutputQFue_flow[nFue]Fuel energy input rate [W]
BusweaBusWeather data bus

Modelica definition

model ETS "Dummy ETS model for validation purposes" extends Buildings.Experimental.DHC.EnergyTransferStations.BaseClasses.PartialETS; parameter Modelica.Units.SI.MassFlowRate m_flow_nominal "Nominal mass flow rate"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant souPHea( k=1); Buildings.Controls.OBC.CDL.Reals.Sources.Constant souPCoo( k=1); Buildings.Controls.OBC.CDL.Reals.Sources.Constant souPFan( k=1); Buildings.Controls.OBC.CDL.Reals.Sources.Constant souPPum( k=1); Fluid.Sources.Boundary_pT sinSerAmbSup( redeclare final package Medium = MediumSer, nPorts=1) if typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5 "Sink for service supply"; Fluid.Sources.MassFlowSource_T souSerAmbRet( redeclare final package Medium = MediumSer, m_flow=m_flow_nominal, nPorts=1) if typ == Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5 "Source for service return"; Fluid.Sources.Boundary_pT sinSerHeaSup( redeclare final package Medium = MediumSerHea_a, nPorts=1) if typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling and typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5 "Sink for service supply"; Fluid.Sources.MassFlowSource_T souSerHeaReat( redeclare final package Medium = MediumSer, m_flow=m_flow_nominal, nPorts=1) if typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.Cooling and typ <> Buildings.Experimental.DHC.Types.DistrictSystemType.CombinedGeneration5 "Source for service return"; Fluid.Sources.Boundary_pT sinHeaWat( redeclare final package Medium =MediumBui, nPorts=nPorts_aHeaWat) if have_heaWat "Sink for heating water"; Fluid.Sources.Boundary_pT sinChiWat( redeclare final package Medium = MediumBui, nPorts=nPorts_aChiWat) if have_chiWat "Sink for chilled water"; Fluid.Sources.MassFlowSource_T souHeaWat( redeclare final package Medium = MediumBui, m_flow=m_flow_nominal, nPorts=nPorts_bHeaWat) if have_heaWat "Source for heating water"; Fluid.Sources.MassFlowSource_T souChiWat( redeclare final package Medium = MediumBui, m_flow=m_flow_nominal, nPorts=nPorts_bChiWat) if have_chiWat "Source for chilled water"; equation connect(port_aSerCoo, port_bSerCoo); connect(souPCoo.y,PCoo); connect(souPFan.y,PFan); connect(souPPum.y,PPum); connect(souPHea.y,PHea); connect(port_aSerAmb, sinSerAmbSup.ports[1]); connect(souSerAmbRet.ports[1], port_bSerAmb); connect(port_aSerHea, sinSerHeaSup.ports[1]); connect(souSerHeaReat.ports[1], port_bSerHea); connect(ports_aChiWat, sinChiWat.ports); connect(ports_aHeaWat, sinHeaWat.ports); connect(souChiWat.ports, ports_bChiWat); connect(souHeaWat.ports, ports_bHeaWat); end ETS;

Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.FanCoil2PipeCooling Buildings.Experimental.DHC.Loads.BaseClasses.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.BaseClasses.Validation.BaseClasses.FanCoil2PipeCooling

Information

This is a simplified model of a two-pipe fan coil unit for cooling. 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.BaseClasses.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]
MassFractionw_aLoaCoo_nominal0.011Load side inlet humidity ratio at nominal conditions in cooling mode [1]
PressureDifferencedpLoa_nominal250Load side pressure drop [Pa]
HeatFlowRateQEnv_flow_nominal Nominal envelope heat loss (for room air temperature prediction) [W]
TemperatureDifferencedTEnv_nominal15Design temperature difference at which envelope heat loss is QEnv_flow_nominal [K]
Assumptions
BooleanallowFlowReversalfalseSet to true to allow flow reversal in building distribution system
BooleanallowFlowReversalLoafalseSet 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, final allowFlowReversalLoa=false, 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.Units.SI.Time Ti(min=Modelica.Constants.small) = 10 "Time constant of integrator block"; parameter Modelica.Units.SI.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)"; parameter Modelica.Units.SI.HeatFlowRate QEnv_flow_nominal(min=0) "Nominal envelope heat loss (for room air temperature prediction)"; parameter Modelica.Units.SI.TemperatureDifference dTEnv_nominal = 15 "Design temperature difference at which envelope heat loss is QEnv_flow_nominal"; Buildings.Controls.OBC.CDL.Reals.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.SteadyState, use_inputFilter=false, final dp_nominal=dpLoa_nominal) "Fan"; Fluid.HeatExchangers.WetCoilEffectivenessNTU hexWetNtu( 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, use_Q_flow_nominal=true, 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, final w_a2_nominal=w_aLoaCoo_nominal) "Cooling coil"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gaiMasFlo(k= mChiWat_flow_nominal) "Scale water flow rate"; Modelica.Blocks.Sources.RealExpression Q_flowCoo( final y=hexWetNtu.Q2_flow); Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter 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.BaseClasses.SimpleRoomODE TLoaODE( final dTEnv_nominal=dTEnv_nominal, TAir_start=297.15, final QEnv_flow_nominal=QEnv_flow_nominal) "Predicted room air temperature"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gaiHeaFlo(k=1/ QCoo_flow_nominal); Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gaiHeaFlo1(k=1/ QCoo_flow_nominal); Buildings.Controls.OBC.CDL.Reals.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 allowFlowReversal=allowFlowReversalLoa, final m_flow_nominal=mLoaCoo_flow_nominal, final dp_nominal=dpLoa_nominal) "Load side pressure drop"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant one(k=1) "One constant"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con1(k=have_speVar); Buildings.Controls.OBC.CDL.Reals.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, hexWetNtu.port_a2); connect(hexWetNtu.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, hexWetNtu.port_a1); connect(hexWetNtu.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.BaseClasses.Validation.BaseClasses.FanCoil2PipeHeating Buildings.Experimental.DHC.Loads.BaseClasses.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.BaseClasses.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.BaseClasses.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]
MassFractionw_aLoaCoo_nominal0.011Load side inlet humidity ratio at nominal conditions in cooling mode [1]
PressureDifferencedpLoa_nominal250Load side pressure drop [Pa]
Assumptions
BooleanallowFlowReversalfalseSet to true to allow flow reversal in building distribution system
BooleanallowFlowReversalLoafalseSet 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, final allowFlowReversalLoa=false, 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.Units.SI.Time Ti(min=Modelica.Constants.small) = 10 "Time constant of integrator block"; parameter Modelica.Units.SI.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.SteadyState, use_inputFilter=false, final dp_nominal=dpLoa_nominal) "Fan"; Buildings.Controls.OBC.CDL.Reals.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.Reals.MultiplyByParameter gaiMasFlo(k= mHeaWat_flow_nominal) "Scale water flow rate"; Modelica.Blocks.Sources.RealExpression Q_flowHea( y=hex.Q2_flow); Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter 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.BaseClasses.SimpleRoomODE TLoaODE( dTEnv_nominal=25, TAir_start=293.15, QEnv_flow_nominal=QHea_flow_nominal) "Predicted room air temperature"; Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gaiHeaFlo(k=1/ QHea_flow_nominal); Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gaiHeaFlo1(k=1/ QHea_flow_nominal); Buildings.Controls.OBC.CDL.Reals.Switch swi "Logical switch"; Buildings.Controls.OBC.CDL.Reals.Sources.Constant one( k=1) "One constant"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con1( k=have_speVar); Buildings.Controls.OBC.CDL.Reals.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 allowFlowReversal=allowFlowReversalLoa, 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.BaseClasses.Validation.BaseClasses.FanCoil2PipeHeatingValve Buildings.Experimental.DHC.Loads.BaseClasses.Validation.BaseClasses.FanCoil2PipeHeatingValve

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

Buildings.Experimental.DHC.Loads.BaseClasses.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.BaseClasses.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]
MassFractionw_aLoaCoo_nominal0.011Load side inlet humidity ratio at nominal conditions in cooling mode [1]
PressureDifferencedpLoa_nominal250Load side pressure drop [Pa]
Assumptions
BooleanallowFlowReversalfalseSet to true to allow flow reversal in building distribution system
BooleanallowFlowReversalLoafalseSet 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=false, 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.Units.SI.PressureDifference dpLoa_nominal(displayUnit="Pa")= 250 "Load side pressure drop"; parameter Modelica.Units.SI.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.Reals.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.Reals.MultiplyByParameter 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.BaseClasses.SimpleRoomODE TLoaODE( dTEnv_nominal=25, TAir_start=293.15, QEnv_flow_nominal=QHea_flow_nominal) "Predicted room air temperature"; 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.Reals.MultiplyByParameter gaiHeaFlo(k=1/ QHea_flow_nominal); Buildings.Controls.OBC.CDL.Reals.MultiplyByParameter gaiHeaFlo1(k=1/ QHea_flow_nominal); Buildings.Controls.OBC.CDL.Reals.Sources.Constant one( k=1) "One constant"; Buildings.Controls.OBC.CDL.Logical.Sources.Constant con1( k=have_speVar); Buildings.Controls.OBC.CDL.Reals.Switch swi "Logical switch"; Fluid.FixedResistances.PressureDrop resLoa( redeclare final package Medium = Medium2, final allowFlowReversal=allowFlowReversalLoa, 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;