Buildings.Experimental.DHC.CentralPlants.BaseClasses
Package with base classes
Information
This package contains base classes that are used to construct the classes in Buildings.Experimental.DHC.CentralPlants.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
PartialPlant | Partial class for modeling a central plant |
Buildings.Experimental.DHC.CentralPlants.BaseClasses.PartialPlant
Partial class for modeling a central plant
Information
Partial class to be used for modeling a central plant.
The connectors to the service lines are configured based on an enumeration
defining the type of district system, see
Buildings.Experimental.DHC.Types.DistrictSystemType.
In case of a heating service line, the model allows for using two
different media at the supply port port_bSerHea
and at the return
port_aSerHea
to represent a steam supply and condensate
return.
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Buildings.Media.Water | Service side medium | |
replaceable package MediumHea_b | Buildings.Media.Water | Service side medium at heating supply | |
Generic | fue[nFue] | Fuel type | |
Configuration | |||
DistrictSystemType | typ | TypDisSys.CombinedGeneration... | Type of district system |
Boolean | have_fan | false | Set to true if fan power is computed |
Boolean | have_pum | false | Set to true if pump power is computed |
Boolean | have_eleHea | false | Set to true if the plant has electric heating system |
Integer | nFue | 0 | Number of fuel types (0 means no combustion system) |
Boolean | have_eleCoo | false | Set to true if the plant has electric cooling system |
Boolean | have_weaBus | false | Set to true to use a weather bus |
Assumptions | |||
Boolean | allowFlowReversal | false | Set to true to allow flow reversal in service lines |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Service side medium | |
replaceable package MediumHea_b | Service side medium at heating supply | |
FluidPort_a | port_aSerAmb | Fluid connector for ambient water service supply line |
FluidPort_b | port_bSerAmb | Fluid connector for ambient water service return line |
FluidPort_a | port_aSerHea | Fluid connector for heating service supply line |
FluidPort_b | port_bSerHea | Fluid connector for heating service return line |
FluidPort_a | port_aSerCoo | Fluid connector for cooling service supply line |
FluidPort_b | port_bSerCoo | Fluid connector for cooling service return line |
Bus | weaBus | Weather data bus |
output RealOutput | PHea | Power drawn by heating system [W] |
output RealOutput | PCoo | Power drawn by cooling system [W] |
output RealOutput | PFan | Power drawn by fan motors [W] |
output RealOutput | PPum | Power drawn by pump motors [W] |
output RealOutput | QFue_flow[nFue] | Fuel energy input rate [W] |
Modelica definition
partial model PartialPlant
"Partial class for modeling a central plant"
import TypDisSys=Buildings.Experimental.DHC.Types.DistrictSystemType
"District system type enumeration";
replaceable package Medium=Buildings.Media.Water
constrainedby Modelica.Media.Interfaces.PartialMedium
"Service side medium";
replaceable package MediumHea_b=Buildings.Media.Water
constrainedby Modelica.Media.Interfaces.PartialMedium
"Service side medium at heating supply";
parameter TypDisSys typ=TypDisSys.CombinedGeneration2to4
"Type of district system";
parameter Boolean have_fan=false
"Set to true if fan power is computed";
parameter Boolean have_pum=false
"Set to true if pump power is computed";
parameter Boolean have_eleHea=false
"Set to true if the plant has electric heating system";
parameter Integer nFue=0
"Number of fuel types (0 means no combustion system)";
parameter Boolean have_eleCoo=false
"Set to true if the plant has electric cooling system";
parameter Boolean have_weaBus=false
"Set to true to use a weather bus";
parameter Boolean allowFlowReversal=false
"Set to true to allow flow reversal in service lines";
parameter Buildings.Fluid.Data.Fuels.Generic fue[nFue]
"Fuel type";
// IO CONNECTORS
Modelica.Fluid.Interfaces.FluidPort_a port_aSerAmb(
redeclare package Medium = Medium,
m_flow(min=if allowFlowReversal then -Modelica.Constants.inf else 0),
h_outflow(start=Medium.h_default, nominal=Medium.h_default))
if typ == TypDisSys.CombinedGeneration5
"Fluid connector for ambient water service supply line";
Modelica.Fluid.Interfaces.FluidPort_b port_bSerAmb(
redeclare package Medium = Medium,
m_flow(max=if allowFlowReversal then +Modelica.Constants.inf else 0),
h_outflow(start=Medium.h_default, nominal=Medium.h_default))
if typ == TypDisSys.CombinedGeneration5
"Fluid connector for ambient water service return line";
Modelica.Fluid.Interfaces.FluidPort_a port_aSerHea(
redeclare package Medium = Medium,
m_flow(min=if allowFlowReversal then -Modelica.Constants.inf else 0),
h_outflow(start=Medium.h_default, nominal=Medium.h_default))
if typ <> TypDisSys.Cooling and
typ <> TypDisSys.CombinedGeneration5
"Fluid connector for heating service supply line";
Modelica.Fluid.Interfaces.FluidPort_b port_bSerHea(
redeclare package Medium = MediumHea_b,
m_flow(max=if allowFlowReversal then +Modelica.Constants.inf else 0),
h_outflow(start=MediumHea_b.h_default, nominal=MediumHea_b.h_default))
if typ <> TypDisSys.Cooling and
typ <> TypDisSys.CombinedGeneration5
"Fluid connector for heating service return line";
Modelica.Fluid.Interfaces.FluidPort_a port_aSerCoo(
redeclare package Medium = Medium,
m_flow(min=if allowFlowReversal then -Modelica.Constants.inf else 0),
h_outflow(start=Medium.h_default, nominal=Medium.h_default))
if typ == TypDisSys.CombinedGeneration1 or
typ == TypDisSys.CombinedGeneration2to4 or
typ == TypDisSys.Cooling
"Fluid connector for cooling service supply line";
Modelica.Fluid.Interfaces.FluidPort_b port_bSerCoo(
redeclare package Medium = Medium,
m_flow(max=if allowFlowReversal then +Modelica.Constants.inf else 0),
h_outflow(start=Medium.h_default, nominal=Medium.h_default))
if typ == TypDisSys.CombinedGeneration1 or
typ == TypDisSys.CombinedGeneration2to4 or
typ == TypDisSys.Cooling
"Fluid connector for cooling service return line";
Buildings.BoundaryConditions.WeatherData.Bus weaBus if have_weaBus
"Weather data bus";
Buildings.Controls.OBC.CDL.Interfaces.RealOutput PHea(
final unit="W") if have_eleHea
"Power drawn by heating system";
Buildings.Controls.OBC.CDL.Interfaces.RealOutput PCoo(
final unit="W") if have_eleCoo
"Power drawn by cooling system";
Buildings.Controls.OBC.CDL.Interfaces.RealOutput PFan(
final unit="W") if have_fan
"Power drawn by fan motors";
Buildings.Controls.OBC.CDL.Interfaces.RealOutput PPum(
final unit="W") if have_pum
"Power drawn by pump motors";
Buildings.Controls.OBC.CDL.Interfaces.RealOutput QFue_flow[nFue](
each final unit="W") if nFue>0
"Fuel energy input rate";
end PartialPlant;