Buildings.DHC.Plants.BaseClasses
Package with base classes
Information
This package contains base classes that are used to construct the classes in Buildings.DHC.Plants.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
PartialPlant | Partial class for modeling a plant |
Buildings.DHC.Plants.BaseClasses.PartialPlant
Partial class for modeling a plant
Information
Partial class to be used for modeling a plant.
The connectors to the service lines are configured based on an enumeration
defining the type of district system, see
Buildings.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 | Buildings.DHC.Types.District... | 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 | Fuel energy input rate [W] |
Modelica definition
partial model PartialPlant
"Partial class for modeling a plant"
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 Buildings.DHC.Types.DistrictSystemType
typ=Buildings.DHC.Types.DistrictSystemType.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)";
final parameter Boolean have_fue=nFue>0
"Set to true if the plant has fuel use";
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 have_serAmb
"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 have_serAmb
"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 have_hea
"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 have_hea
"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 have_coo
"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 have_coo
"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(
final unit="W") if have_fue
"Fuel energy input rate";
protected
final parameter Boolean have_hea=typ <> Buildings.DHC.Types.DistrictSystemType.Cooling and
typ <> Buildings.DHC.Types.DistrictSystemType.CombinedGeneration5
"Boolean flag to enable fluid connectors for heating service line";
final parameter Boolean have_coo=typ == Buildings.DHC.Types.DistrictSystemType.CombinedGeneration1 or
typ == Buildings.DHC.Types.DistrictSystemType.CombinedGeneration2to4 or
typ == Buildings.DHC.Types.DistrictSystemType.Cooling
"Boolean flag to enable fluid connectors for cooling service line";
final parameter Boolean have_serAmb=typ == Buildings.DHC.Types.DistrictSystemType.CombinedGeneration5
"Boolean flag to enable fluid connector for ambient water service line";
end PartialPlant;