Buildings.Experimental.DHC.Networks.BaseClasses
Package with base classes that are used by multiple models
Information
This package contains base classes that are used to construct the classes in Buildings.Experimental.DHC.Networks.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
DifferenceEnthalpyFlowRate | Sensor outputting the difference between two enthalpy flow rates |
PartialConnection1Pipe | Partial model for connecting an agent to a one-pipe distribution network |
PartialConnection2Pipe | Partial model for connecting an agent to a two-pipe distribution network |
PartialDistribution | Partial model for distribution network |
PartialDistribution1Pipe | Partial model for one-pipe distribution network |
PartialDistribution2Pipe | Partial model for two-pipe distribution network |
Buildings.Experimental.DHC.Networks.BaseClasses.DifferenceEnthalpyFlowRate
Sensor outputting the difference between two enthalpy flow rates
Information
This model outputs the difference in enthalpy flow rate between two different streams: ΔḢ = ṁ1 h1 - ṁ2 h2. Optionally the time integral of this quantity can be output. The sensor is ideal, i.e., it does not influence the fluid.
By default
-
the parameter
tau
is zero, so the specific enthalpy that is used to compute each enthalpy flow rate is computed in steady-state, - the medium is the same in both streams but the model allows for specifying two different media to represent for instance the gaseous and liquid state of the same substance.
Extends from Fluid.Interfaces.PartialFourPortInterface (Partial model transporting fluid between two ports without storing mass or energy).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium1 | PartialMedium | Medium 1 in the component | |
replaceable package Medium2 | PartialMedium | Medium 2 in the component | |
Boolean | have_integrator | false | Set to true to output the time integral |
Time | tau | 0 | Time constant at nominal flow rate [s] |
Nominal condition | |||
MassFlowRate | m1_flow_nominal | m_flow_nominal | Nominal mass flow rate [kg/s] |
MassFlowRate | m2_flow_nominal | m_flow_nominal | Nominal mass flow rate [kg/s] |
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Initialization | |||
Init | initType | Modelica.Blocks.Types.Init.I... | Type of initialization (InitialState and InitialOutput are identical) |
SpecificEnthalpy | h1_out_start | Medium1.specificEnthalpy_pTX... | Initial or guess value of measured specific enthalpy [J/kg] |
SpecificEnthalpy | h2_out_start | Medium2.specificEnthalpy_pTX... | Initial or guess value of measured specific enthalpy [J/kg] |
Assumptions | |||
Boolean | allowFlowReversal1 | allowFlowReversal | = false to simplify equations, assuming, but not enforcing, no flow reversal for medium 1 |
Boolean | allowFlowReversal2 | allowFlowReversal | = false to simplify equations, assuming, but not enforcing, no flow reversal for medium 2 |
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced | |||
MassFlowRate | m1_flow_small | m_flow_small | Small mass flow rate for regularization of zero flow [kg/s] |
MassFlowRate | m2_flow_small | m_flow_small | Small mass flow rate for regularization of zero flow [kg/s] |
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | false | = true, if actual temperature at port is computed |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium2 | Medium 2 in the component | |
FluidPort_a | port_a1 | Fluid connector a1 (positive design flow direction is from port_a1 to port_b1) |
FluidPort_b | port_b1 | Fluid connector b1 (positive design flow direction is from port_a1 to port_b1) |
FluidPort_a | port_a2 | Fluid connector a2 (positive design flow direction is from port_a2 to port_b2) |
FluidPort_b | port_b2 | Fluid connector b2 (positive design flow direction is from port_a2 to port_b2) |
output RealOutput | dH_flow | Difference in enthalpy flow rate between stream 1 and 2 [W] |
output RealOutput | E | Time integral of enthalpy flow rate difference between stream 1 and 2 [J] |
Modelica definition
Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection1Pipe
Partial model for connecting an agent to a one-pipe distribution network
Information
Partial model to be used for connecting an agent (e.g. energy transfer station) to a one-pipe distribution network.
Two instances of a replaceable partial model are used to represent the pipes:
- One representing the main distribution pipe immediately upstream the connection.
- The other one representing both the supply and return lines of the connection. When replacing that model with a pipe model computing the pressure drop, one must double the length so that both the supply and return lines are accounted for.
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium model | |
replaceable model Model_pipDis | Fluid.Interfaces.PartialTwoP... | ||
replaceable model Model_pipCon | Fluid.Interfaces.PartialTwoP... | ||
Boolean | show_entFlo | false | Set to true to output enthalpy flow rate difference |
Boolean | show_TOut | false | Set to true to output temperature at connection outlet |
MassFlowRate | mDis_flow_nominal | Nominal mass flow rate in the distribution line [kg/s] | |
MassFlowRate | mCon_flow_nominal | Nominal mass flow rate in the connection line [kg/s] | |
Assumptions | |||
Boolean | allowFlowReversal | false | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Dynamics | |||
Conservation equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Nominal condition | |||
Time | tau | 10 | Time constant at nominal flow for dynamic energy and momentum balance [s] |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium model | |
replaceable model Model_pipDis | ||
replaceable model Model_pipCon | ||
FluidPort_a | port_aDis | Distribution inlet port |
FluidPort_b | port_bDis | Distribution outlet port |
FluidPort_a | port_aCon | Connection return port |
FluidPort_b | port_bCon | Connection supply port |
output RealOutput | mCon_flow | Connection supply mass flow rate (measured) [kg/s] |
output RealOutput | dH_flow | Difference in enthalpy flow rate between connection supply and return [W] |
output RealOutput | mByp_flow | Bypass mass flow rate [kg/s] |
output RealOutput | TOut | Temperature in distribution line at connection outlet [K] |
Modelica definition
Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection2Pipe
Partial model for connecting an agent to a two-pipe distribution network
Information
Partial model to be used for connecting an agent (e.g. an energy transfer station) to a two-pipe distribution network.
Three instances of a replaceable partial model are used to represent the pipes:
- One representing the main distribution supply pipe immediately upstream the connection.
- Another one representing the main distribution return pipe immediately downstream the connection.
- The last one representing both the supply and return lines of the connection. When replacing that model with a pipe model computing the pressure drop, one must double the length so that both the supply and return lines are accounted for.
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium model | |
replaceable model Model_pipDis | Fluid.Interfaces.PartialTwoP... | ||
replaceable model Model_pipCon | Fluid.Interfaces.PartialTwoP... | ||
Boolean | show_entFlo | false | Set to true to output enthalpy flow rate difference |
Nominal condition | |||
MassFlowRate | mDis_flow_nominal | Nominal mass flow rate in the distribution line [kg/s] | |
MassFlowRate | mCon_flow_nominal | Nominal mass flow rate in the connection line [kg/s] | |
Assumptions | |||
Boolean | allowFlowReversal | false | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Dynamics | |||
Conservation equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Nominal condition | |||
Time | tau | 10 | Time constant at nominal flow for dynamic energy and momentum balance [s] |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium model | |
replaceable model Model_pipDis | ||
replaceable model Model_pipCon | ||
FluidPort_a | port_aDisSup | Distribution supply inlet port |
FluidPort_b | port_bDisSup | Distribution supply outlet port |
FluidPort_a | port_aDisRet | Distribution return inlet port |
FluidPort_b | port_bDisRet | Distribution return outlet port |
FluidPort_b | port_bCon | Connection supply port |
FluidPort_a | port_aCon | Connection return port |
output RealOutput | mCon_flow | Connection supply mass flow rate [kg/s] |
output RealOutput | dp | Pressure drop accross the connection (measured) [Pa] |
output RealOutput | dH_flow | Difference in enthalpy flow rate between connection supply and return [W] |
Modelica definition
Buildings.Experimental.DHC.Networks.BaseClasses.PartialDistribution
Partial model for distribution network
Information
Partial model to be used for modeling various distribution networks e.g. one-pipe or two-pipe hydraulic distribution.
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium model | |
Integer | nCon | Number of connections | |
Assumptions | |||
Boolean | allowFlowReversal | false | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium model | |
FluidPorts_a | ports_aCon[nCon] | Connection return ports |
FluidPorts_b | ports_bCon[nCon] | Connection supply ports |
FluidPort_a | port_aDisSup | Distribution supply inlet port |
FluidPort_b | port_bDisSup | Distribution supply outlet port |
Modelica definition
Buildings.Experimental.DHC.Networks.BaseClasses.PartialDistribution1Pipe
Partial model for one-pipe distribution network
Information
Partial model of a one-pipe distribution network.
An array of replaceable partial models is used to represent the connections along the network, including the pipe segment immediately upstream of each connection.
A replaceable partial model is used to represent the pipe segment of the return line after the last connection.
Optionally the heat flow rate transferred to each connected load can be output.
Extends from PartialDistribution (Partial model for distribution network).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium model | |
Integer | nCon | Number of connections | |
replaceable model Model_pipDis | Fluid.Interfaces.PartialTwoP... | Model for distribution pipe | |
Boolean | show_entFlo | false | Set to true to output enthalpy flow rate difference at each connection |
Boolean | show_TOut | false | Set to true to output temperature at connection outlet |
PartialConnection1Pipe | con[nCon] | con(redeclare each final pac... | Connection to agent |
Nominal condition | |||
MassFlowRate | mDis_flow_nominal | Nominal mass flow rate in the distribution line [kg/s] | |
MassFlowRate | mCon_flow_nominal[nCon] | Nominal mass flow rate in each connection line [kg/s] | |
Assumptions | |||
Boolean | allowFlowReversal | false | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Dynamics | |||
Conservation equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Nominal condition | |||
Time | tau | 10 | Time constant at nominal flow for dynamic energy and momentum balance [s] |
Connectors
Type | Name | Description |
---|---|---|
FluidPorts_a | ports_aCon[nCon] | Connection return ports |
FluidPorts_b | ports_bCon[nCon] | Connection supply ports |
FluidPort_a | port_aDisSup | Distribution supply inlet port |
FluidPort_b | port_bDisSup | Distribution supply outlet port |
replaceable model Model_pipDis | Model for distribution pipe | |
output RealOutput | dH_flow[nCon] | Difference in enthalpy flow rate between connection supply and return [W] |
output RealOutput | mCon_flow[nCon] | Connection supply mass flow rate (measured) [kg/s] |
output RealOutput | mByp_flow[nCon] | Bypass mass flow rate [kg/s] |
output RealOutput | TOut[nCon] | Temperature in distribution line at each connection outlet [K] |
Modelica definition
Buildings.Experimental.DHC.Networks.BaseClasses.PartialDistribution2Pipe
Partial model for two-pipe distribution network
Information
Partial model of a two-pipe distribution network.
An array of replaceable partial models is used to represent the connections along the network, including the pipe segment immediately upstream each connection.
A replaceable partial model is used to represent the pipe segment of the supply and return line after the last connection.
The parameter iConDpSen
is provided to specify the index of the
connection where the pressure drop is measured.
Use zero for a sensor connected to the supply pipe inlet and return pipe outlet.
Use a negative value if no sensor is needed.
Optionally the heat flow rate transferred to each connected load can be output.
Extends from PartialDistribution (Partial model for distribution network).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium model | |
Integer | nCon | Number of connections | |
replaceable model Model_pipDis | Fluid.Interfaces.PartialTwoP... | Model for distribution pipe | |
Integer | iConDpSen | nCon | Index of the connection where the pressure drop is measured |
Boolean | show_entFlo | false | Set to true to output enthalpy flow rate difference at each connection |
PartialConnection2Pipe | con[nCon] | con(redeclare each final pac... | Connection to agent |
Nominal condition | |||
MassFlowRate | mDis_flow_nominal | Nominal mass flow rate in the distribution line before the first connection [kg/s] | |
MassFlowRate | mCon_flow_nominal[nCon] | Nominal mass flow rate in each connection line [kg/s] | |
MassFlowRate | mEnd_flow_nominal | mDis_flow_nominal - sum(mCon... | Nominal mass flow rate in the end of the distribution line [kg/s] |
MassFlowRate | mDisCon_flow_nominal[nCon] | cat(1, {mDis_flow_nominal}, ... | Nominal mass flow rate in the distribution line before each connection [kg/s] |
Assumptions | |||
Boolean | allowFlowReversal | false | = true to allow flow reversal, false restricts to design direction (port_a -> port_b) |
Dynamics | |||
Conservation equations | |||
Dynamics | energyDynamics | Modelica.Fluid.Types.Dynamic... | Type of energy balance: dynamic (3 initialization options) or steady state |
Nominal condition | |||
Time | tau | 10 | Time constant at nominal flow for dynamic energy and momentum balance [s] |
Connectors
Type | Name | Description |
---|---|---|
FluidPorts_a | ports_aCon[nCon] | Connection return ports |
FluidPorts_b | ports_bCon[nCon] | Connection supply ports |
FluidPort_a | port_aDisSup | Distribution supply inlet port |
FluidPort_b | port_bDisSup | Distribution supply outlet port |
replaceable model Model_pipDis | Model for distribution pipe | |
FluidPort_b | port_bDisRet | Distribution return outlet port |
FluidPort_a | port_aDisRet | Distribution return inlet port |
output RealOutput | dp | Pressure difference at given location (measured) [Pa] |
output RealOutput | dH_flow[nCon] | Difference in enthalpy flow rate between connection supply and return [W] |
output RealOutput | mCon_flow[nCon] | Connection supply mass flow rate (measured) [kg/s] |
Modelica definition
Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection1Pipe.Model_pipDis
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Nominal condition | |||
MassFlowRate | m_flow_nominal | mDis_flow_nominal | Nominal mass flow rate [kg/s] |
Assumptions | |||
Boolean | allowFlowReversal | allowFlowReversal | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | false | = true, if actual temperature at port is computed |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium in the component | |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
Modelica definition
Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection1Pipe.Model_pipCon
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Nominal condition | |||
MassFlowRate | m_flow_nominal | mCon_flow_nominal | Nominal mass flow rate [kg/s] |
Assumptions | |||
Boolean | allowFlowReversal | allowFlowReversal | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | false | = true, if actual temperature at port is computed |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium in the component | |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
Modelica definition
Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection2Pipe.Model_pipDis
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Nominal condition | |||
MassFlowRate | m_flow_nominal | mDis_flow_nominal | Nominal mass flow rate [kg/s] |
Assumptions | |||
Boolean | allowFlowReversal | allowFlowReversal | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | false | = true, if actual temperature at port is computed |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium in the component | |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
Modelica definition
Buildings.Experimental.DHC.Networks.BaseClasses.PartialConnection2Pipe.Model_pipCon
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Nominal condition | |||
MassFlowRate | m_flow_nominal | mCon_flow_nominal | Nominal mass flow rate [kg/s] |
Assumptions | |||
Boolean | allowFlowReversal | allowFlowReversal | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | false | = true, if actual temperature at port is computed |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium in the component | |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
Modelica definition
Buildings.Experimental.DHC.Networks.BaseClasses.PartialDistribution1Pipe.Model_pipDis
Model for distribution pipe
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Assumptions | |||
Boolean | allowFlowReversal | allowFlowReversal | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | false | = true, if actual temperature at port is computed |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium in the component | |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |
Modelica definition
Buildings.Experimental.DHC.Networks.BaseClasses.PartialDistribution2Pipe.Model_pipDis
Model for distribution pipe
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Nominal condition | |||
MassFlowRate | m_flow_nominal | Nominal mass flow rate [kg/s] | |
Assumptions | |||
Boolean | allowFlowReversal | allowFlowReversal | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced | |||
MassFlowRate | m_flow_small | 1E-4*abs(m_flow_nominal) | Small mass flow rate for regularization of zero flow [kg/s] |
Diagnostics | |||
Boolean | show_T | false | = true, if actual temperature at port is computed |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium in the component | |
FluidPort_a | port_a | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b | Fluid connector b (positive design flow direction is from port_a to port_b) |