Buildings.Fluid.Sources.BaseClasses
Package with base classes for Buildings.Fluid.Sources
Information
This package contains base classes that are used to construct the models in Buildings.Fluid.Sources.
Extends from Modelica.Icons.BasesPackage (Icon for packages containing base classes).
Package Content
Name | Description |
---|---|
Outside | Boundary that takes weather data, and optionally trace substances, as an input |
PartialAirSource | Partial component air source with one fluid connector |
PartialPropertySource | Partial model for overriding fluid properties that flow through the component |
PartialSource | Partial component source with one fluid connector |
PartialSource_Xi_C | Partial component source with parameter definitions for Xi and C |
Buildings.Fluid.Sources.BaseClasses.Outside
Boundary that takes weather data, and optionally trace substances, as an input
Information
This is the base class for models that describes boundary conditions for pressure, enthalpy, and species concentration that can be obtained from weather data, and that may be modified based on the wind pressure.
If the parameter use_C_in
is false
(default option),
the C
parameter
is used as the trace substance for flow that leaves the component, and the
C_in
input connector is disabled; if use_C_in
is true
,
then the C
parameter is ignored, and the value provided by the input connector is used instead.
Note that boundary temperature, mass fractions and trace substances have only an effect if the mass flow is from the boundary into the port. If mass is flowing from the port into the boundary, the boundary definitions, with exception of boundary pressure, do not have an effect.
Extends from Buildings.Fluid.Sources.BaseClasses.PartialAirSource (Partial component air source with one fluid connector).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Boolean | use_C_in | false | Get the trace substances from the input connector |
ExtraProperty | C[Medium.nC] | fill(0, Medium.nC) | Fixed values of trace substances |
Advanced | |||
Boolean | verifyInputs | true | Set to true to stop the simulation with an error if the medium temperature is outside its allowable range |
Connectors
Type | Name | Description |
---|---|---|
FluidPorts_b | ports[nPorts] | Fluid ports |
input RealInput | C_in[Medium.nC] | Prescribed boundary trace substances |
Bus | weaBus | Bus with weather data |
Modelica definition
Buildings.Fluid.Sources.BaseClasses.PartialAirSource
Partial component air source with one fluid connector
Information
Partial model for a moist air source that either prescribes
pressure or mass flow rate.
Models that extend this partial model need to prescribe the outflowing
specific enthalpy, composition and trace substances.
This partial model only declares the ports
and ensures that the pressures at all ports are equal.
Implementation
If the parameter verifyInputs
is set to true
,
then a protected instance of medium base properties is enabled.
This instance verifies that the
medium temperature is within the bounds T_min
and T_max
,
where T_min
and T_max
are constants of the Medium
.
If the temperature is outside these bounds, the simulation will stop with an error.
Usage
This partial model provides medium selection for moist air. For a model that only provides for water, moist air and glycol as a selection, use Buildings.Fluid.Sources.BaseClasses.PartialSource.
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium in the component | |
Advanced | |||
Boolean | verifyInputs | false | Set to true to stop the simulation with an error if the medium temperature is outside its allowable range |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium in the component | |
FluidPorts_b | ports[nPorts] | Fluid ports |
Modelica definition
Buildings.Fluid.Sources.BaseClasses.PartialPropertySource
Partial model for overriding fluid properties that flow through the component
Information
Model that changes the properties, but not the mass flow rate, of the fluid that passes through it.
Typical use and important parameters
If allowFlowReversal=true
, then the properties are changed for both flow directions,
i.e., from port_a
to port_b
and
from port_b
to port_a
.
Dynamics
This model has no dynamics.
Extends from Buildings.Fluid.Interfaces.PartialTwoPort (Partial component with two ports).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Inputs | |||
Boolean | use_Xi_in | false | Set to true to get the composition from the input connector |
Boolean | use_C_in | false | Set to true to get the trace substances from the input connector |
Assumptions | |||
Boolean | allowFlowReversal | true | = false to simplify equations, assuming, but not enforcing, no flow reversal |
Connectors
Type | Name | Description |
---|---|---|
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) |
input RealInput | Xi_in[Medium.nXi] | Prescribed values for composition |
input RealInput | C_in[Medium.nC] | Prescribed values for trace substances |
Modelica definition
Buildings.Fluid.Sources.BaseClasses.PartialSource
Partial component source with one fluid connector
Information
Partial model for a fluid source that either prescribes
pressure or mass flow rate.
Models that extend this partial model need to prescribe the outflowing
specific enthalpy, composition and trace substances.
This partial model only declares the ports
and ensures that the pressures at all ports are equal.
Implementation
If the parameter verifyInputs
is set to true
,
then a protected instance of medium base properties is enabled.
This instance verifies that the
medium temperature is within the bounds T_min
and T_max
,
where T_min
and T_max
are constants of the Medium
.
If the temperature is outside these bounds, the simulation will stop with an error.
Usage
This partial model provides medium selection for water, moist air and glycol. For a model that only provides moist air as a selection, use Buildings.Fluid.Sources.BaseClasses.PartialAirSource.
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium in the component | |
Advanced | |||
Boolean | verifyInputs | false | Set to true to stop the simulation with an error if the medium temperature is outside its allowable range |
Connectors
Type | Name | Description |
---|---|---|
replaceable package Medium | Medium in the component | |
FluidPorts_b | ports[nPorts] | Fluid ports |
Modelica definition
Buildings.Fluid.Sources.BaseClasses.PartialSource_Xi_C
Partial component source with parameter definitions for Xi and C
Information
Partial model that defines outflowing properties
ports.Xi_outflow
and ports.C_outflow
using an optional input for both.
Otherwise the parameter value is used.
Extends from Buildings.Fluid.Sources.BaseClasses.PartialSource (Partial component source with one fluid connector).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium in the component | |
Conditional inputs | |||
Boolean | use_Xi_in | false | Get the composition (independent fractions) from the input connector |
Boolean | use_C_in | false | Get the trace substances from the input connector |
Fixed inputs | |||
MassFraction | X[Medium.nX] | Medium.X_default | Fixed value of composition [kg/kg] |
ExtraProperty | C[Medium.nC] | fill(0, Medium.nC) | Fixed values of trace substances |
Advanced | |||
Boolean | verifyInputs | false | Set to true to stop the simulation with an error if the medium temperature is outside its allowable range |
Boolean | use_X_in | false | Get the composition (all fractions) from the input connector |
Connectors
Type | Name | Description |
---|---|---|
FluidPorts_b | ports[nPorts] | Fluid ports |
input RealInput | X_in[Medium.nX] | Prescribed boundary composition [kg/kg] |
input RealInput | Xi_in[Medium.nXi] | Prescribed boundary composition [kg/kg] |
input RealInput | C_in[Medium.nC] | Prescribed boundary trace substances |