Buildings.Fluid.Geothermal.ZonedBorefields.Interfaces
Package with interface for bore field models
Information
This package contains basic classes that are used to build component models that change the state of the fluid. The classes are not directly usable, but can be extended when building a new model.
Extends from Modelica.Icons.InterfacesPackage (Icon for packages containing interfaces).
Package Content
Name | Description |
---|---|
![]() |
Partial component with vectors of ports |
![]() |
Partial model with two vectors of ports and declaration of quantities for bore field models |
![]() |
Parameters for flow resistance for models with two N ports |
Buildings.Fluid.Geothermal.ZonedBorefields.Interfaces.PartialTwoNPorts
Partial component with vectors of ports
Information
This partial model defines an interface for components with multiple pairs of
inlet and outlet ports, here implemented as two vectors of ports.
The treatment of the design flow direction and of flow reversal are predefined
based on the parameter allowFlowReversal
.
The component may transport fluid and may have internal storage for a given
fluid Medium
.
The definitions of flow reversal and the Medium
apply to all ports.
Implementation
This model is similar to
Modelica.Fluid.Interfaces.PartialTwoPort
but it does not use the outer system
declaration.
This declaration is omitted as in building energy simulation,
many models use multiple media, an in practice,
users have not used this global definition to assign parameters.
The ports are vectorized, to allow multiple pairs of inlet and outlet ports.
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium in the component | |
Integer | nPorts | Number of fluid ports on each side | |
Assumptions | |||
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium in the component | |
FluidPort_a | port_a[nPorts] | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b[nPorts] | Fluid connector b (positive design flow direction is from port_a to port_b) |
Modelica definition
Buildings.Fluid.Geothermal.ZonedBorefields.Interfaces.PartialTwoNPortsInterface
Partial model with two vectors of ports and declaration of quantities for bore field models
Information
This component defines the interface for models with multiple pairs of inlet and outlet ports, here implemented as two vectors of ports. It is similar to Modelica.Fluid.Interfaces.PartialTwoPortTransport, but it does not include the species balance
port_b[i].Xi_outflow = inStream(port_a[i].Xi_outflow);
Thus, it can be used as a base class for a heat and mass transfer component
The partial model extends
Buildings.Fluid.Geothermal.ZonedBorefields.Interfaces.PartialTwoNPorts
and adds quantities that are used by many models such as
m_flow_nominal
, m_flow
and dp
.
Extends from Buildings.Fluid.Geothermal.ZonedBorefields.Interfaces.PartialTwoNPorts (Partial component with vectors of ports).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Integer | nPorts | Number of fluid ports on each side | |
Nominal condition | |||
MassFlowRate | m_flow_nominal[nPorts] | Nominal mass flow rate [kg/s] | |
Assumptions | |||
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Advanced | |||
MassFlowRate | m_flow_small[nPorts] | 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 |
---|---|---|
FluidPort_a | port_a[nPorts] | Fluid connector a (positive design flow direction is from port_a to port_b) |
FluidPort_b | port_b[nPorts] | Fluid connector b (positive design flow direction is from port_a to port_b) |
Modelica definition
Buildings.Fluid.Geothermal.ZonedBorefields.Interfaces.TwoNPortsFlowResistanceParameters
Parameters for flow resistance for models with two N ports
Information
This class contains parameters that are used to compute the pressure drop in models that have one fluid stream. Note that the nominal mass flow rate is not declared here because the model PartialTwoNPortsInterface already declares it.
Extends from Modelica.Icons.Record (Icon for records).
Contents
Type | Name | Default | Description |
---|---|---|---|
Integer | nPorts | Number of fluid ports on each side | |
Nominal condition | |||
PressureDifference | dp_nominal[nPorts] | Pressure difference [Pa] | |
Flow resistance | |||
Boolean | computeFlowResistance[nPorts] | fill(true, nPorts) | =true, compute flow resistance. Set to false to assume no friction |
Boolean | from_dp[nPorts] | fill(false, nPorts) | = true, use m_flow = f(dp) else dp = f(m_flow) |
Boolean | linearizeFlowResistance[nPorts] | fill(false, nPorts) | = true, use linear relation between m_flow and dp for any flow rate |
Real | deltaM[nPorts] | fill(0.1, nPorts) | Fraction of nominal flow rate where flow transitions to laminar |