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 |
PartialPropertySource | Partial model for overriding fluid properties that flow through the component |
PartialSource | Partial component source with one fluid connector |
PartialSource_T | Boundary with prescribed temperature |
PartialSource_Xi_C | Partial component source with parameter definitions for Xi and C |
PartialSource_h | Boundary with prescribed enthalpy |
PartialSource_m_flow | Partial source with prescribed flow rate |
PartialSource_p | Partial source with prescribed pressure |
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 Modelica.Fluid.Sources.BaseClasses.PartialSource (Partial component source with one fluid connector).
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | PartialMedium | Medium model within the source | |
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 |
Connectors
Type | Name | Description |
---|---|---|
FluidPorts_b | ports[nPorts] | |
input RealInput | C_in[Medium.nC] | Prescribed boundary trace substances |
Bus | weaBus | Bus with weather data |
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.
Parameters
Type | Name | Default | Description |
---|---|---|---|
replaceable package Medium | Modelica.Media.Interfaces.Pa... | Medium model within the source | |
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 model within the source | |
FluidPorts_b | ports[nPorts] |
Modelica definition
Buildings.Fluid.Sources.BaseClasses.PartialSource_T
Boundary with prescribed temperature
Information
Partial model that defines
ports.h_outflow
using an optional input for
the temperature.
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 model within the source | |
Conditional inputs | |||
Boolean | use_T_in | false | Get the temperature from the input connector |
Fixed inputs | |||
Temperature | T | Medium.T_default | Fixed value of temperature [K] |
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 |
---|---|---|
FluidPorts_b | ports[nPorts] | |
input RealInput | T_in | Prescribed boundary temperature [K] |
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 model within the source | |
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] | |
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 |
Modelica definition
Buildings.Fluid.Sources.BaseClasses.PartialSource_h
Boundary with prescribed enthalpy
Information
Partial model that defines
ports.h_outflow
using an optional input for
the specific enthalpy.
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 model within the source | |
Conditional inputs | |||
Boolean | use_h_in | false | Get the specific enthalpy from the input connector |
Fixed inputs | |||
SpecificEnthalpy | h | Medium.h_default | Fixed value of specific enthalpy [J/kg] |
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 |
---|---|---|
FluidPorts_b | ports[nPorts] | |
input RealInput | h_in | Prescribed boundary specific enthalpy [J/kg] |
Modelica definition
Buildings.Fluid.Sources.BaseClasses.PartialSource_m_flow
Partial source with prescribed flow rate
Information
Partial model that defines the sum of
ports.m_flow
using an optional input for
the total mass flow rate.
All port pressures are assumed equal.
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 model within the source | |
Conditional inputs | |||
Boolean | use_m_flow_in | false | Get the mass flow rate from the input connector |
Fixed inputs | |||
MassFlowRate | m_flow | 0 | Fixed mass flow rate going out of the fluid port [kg/s] |
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 |
---|---|---|
FluidPorts_b | ports[nPorts] | |
input RealInput | m_flow_in | Prescribed mass flow rate [kg/s] |
Modelica definition
Buildings.Fluid.Sources.BaseClasses.PartialSource_p
Partial source with prescribed pressure
Information
Partial model that defines
ports.p
using an optional input for
the pressure.
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 model within the source | |
Conditional inputs | |||
Boolean | use_p_in | false | Get the pressure from the input connector |
Fixed inputs | |||
AbsolutePressure | p | Medium.p_default | Fixed value of pressure [Pa] |
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 |
---|---|---|
FluidPorts_b | ports[nPorts] | |
input RealInput | p_in | Prescribed boundary pressure [Pa] |