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.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.SIunits.HeatFlowRate QChiWat_flow_nominal "Design heat flow rate for chilled water production (<0)"; parameter Modelica.SIunits.HeatFlowRate QHeaWat_flow_nominal "Design heat flow rate for heating water production (>0)"; parameter Modelica.SIunits.MassFlowRate m_flow_nominal "Nominal mass flow rate"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant souPHea( k=1); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant souPCoo( k=1); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant souPFan( k=1); Buildings.Controls.OBC.CDL.Continuous.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.Continuous.Sources.Constant one(k=1) "One"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar( p=0, k=-1) if have_heaWat "Opposite"; Buildings.Controls.OBC.CDL.Continuous.AddParameter addPar1( p=0, 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, addPar.u); connect(loaCoo.Q_flow, addPar1.u); connect(addPar.y, mulQHea_flow.u); connect(addPar1.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.SIunits.MassFlowRate m_flow_nominal "Nominal mass flow rate"; Buildings.Controls.OBC.CDL.Continuous.Sources.Constant souPHea( k=1); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant souPCoo( k=1); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant souPFan( k=1); Buildings.Controls.OBC.CDL.Continuous.Sources.Constant souPPum( k=1); Fluid.Sources.Boundary_pT sinSerAmbSup( redeclare final package Medium = MediumSer, nPorts=1) if typ == 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 == DHC.Types.DistrictSystemType.CombinedGeneration5 "Source for service return"; Fluid.Sources.Boundary_pT sinSerHeaSup( redeclare final package Medium = MediumSerHea_a, nPorts=1) if typ <> DHC.Types.DistrictSystemType.Cooling and typ <> 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 <> DHC.Types.DistrictSystemType.Cooling and typ <> 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;