Package Modelica.​Fluid.​Sources
Define fixed or prescribed boundary conditions

Information

Package Sources contains generic sources for fluid connectors to define fixed or prescribed ambient conditions.

Extends from Modelica.​Icons.​SourcesPackage (Icon for packages containing sources).

Package Contents

NameDescription
BaseClassesBase classes used in the Sources package (only of interest to build new component models)
Boundary_phBoundary with prescribed pressure, specific enthalpy, composition and trace substances
Boundary_pTBoundary with prescribed pressure, temperature, composition and trace substances
FixedBoundaryBoundary source component
MassFlowSource_hIdeal flow source that produces a prescribed mass flow with prescribed specific enthalpy, mass fraction and trace substances
MassFlowSource_TIdeal flow source that produces a prescribed mass flow with prescribed temperature, mass fraction and trace substances

Model Modelica.​Fluid.​Sources.​FixedBoundary
Boundary source component

Information

Model FixedBoundary defines constant values for boundary conditions:

Note, that boundary temperature, density, specific enthalpy, 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

TypeNameDefaultDescription
IntegernPorts0Number of ports
Booleanuse_ptrueselect p or d
AbsolutePressurepMedium.​p_defaultBoundary pressure
Densitydif use_T then Medium.density_pTX(Medium.p_default, Medium.T_default, Medium.X_default) else Medium.density_phX(Medium.p_default, Medium.h_default, Medium.X_default)Boundary density
Booleanuse_Ttrueselect T or h
TemperatureTMedium.​T_defaultBoundary temperature
SpecificEnthalpyhMedium.​h_defaultBoundary specific enthalpy
MassFractionX[Medium.nX]Medium.​X_defaultBoundary mass fractions m_i/m
ExtraPropertyC[Medium.nC]Medium.​C_defaultBoundary trace substances

Connectors

TypeNameDescription
FluidPorts_bports[nPorts] 

Model Modelica.​Fluid.​Sources.​Boundary_pT
Boundary with prescribed pressure, temperature, composition and trace substances

Information

Defines prescribed values for boundary conditions:

If use_p_in is false (default option), the p parameter is used as boundary pressure, and the p_in input connector is disabled; if use_p_in is true, then the p parameter is ignored, and the value provided by the input connector is used instead.

The same thing goes for the temperature, composition and trace substances.

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

TypeNameDefaultDescription
IntegernPorts0Number of ports
Booleanuse_p_infalseGet the pressure from the input connector
Booleanuse_T_infalseGet the temperature from the input connector
Booleanuse_X_infalseGet the composition from the input connector
Booleanuse_C_infalseGet the trace substances from the input connector
AbsolutePressurepMedium.​p_defaultFixed value of pressure
TemperatureTMedium.​T_defaultFixed value of temperature
MassFractionX[Medium.nX]Medium.​X_defaultFixed value of composition
ExtraPropertyC[Medium.nC]Medium.​C_defaultFixed values of trace substances

Connectors

TypeNameDescription
FluidPorts_bports[nPorts] 
input RealInputp_inPrescribed boundary pressure
input RealInputT_inPrescribed boundary temperature
input RealInputX_in[Medium.nX]Prescribed boundary composition
input RealInputC_in[Medium.nC]Prescribed boundary trace substances

Model Modelica.​Fluid.​Sources.​Boundary_ph
Boundary with prescribed pressure, specific enthalpy, composition and trace substances

Information

Defines prescribed values for boundary conditions:

If use_p_in is false (default option), the p parameter is used as boundary pressure, and the p_in input connector is disabled; if use_p_in is true, then the p parameter is ignored, and the value provided by the input connector is used instead.

The same thing goes for the specific enthalpy and composition

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

TypeNameDefaultDescription
IntegernPorts0Number of ports
Booleanuse_p_infalseGet the pressure from the input connector
Booleanuse_h_infalseGet the specific enthalpy from the input connector
Booleanuse_X_infalseGet the composition from the input connector
Booleanuse_C_infalseGet the trace substances from the input connector
AbsolutePressurepMedium.​p_defaultFixed value of pressure
SpecificEnthalpyhMedium.​h_defaultFixed value of specific enthalpy
MassFractionX[Medium.nX]Medium.​X_defaultFixed value of composition
ExtraPropertyC[Medium.nC]Medium.​C_defaultFixed values of trace substances

Connectors

TypeNameDescription
FluidPorts_bports[nPorts] 
input RealInputp_inPrescribed boundary pressure
input RealInputh_inPrescribed boundary specific enthalpy
input RealInputX_in[Medium.nX]Prescribed boundary composition
input RealInputC_in[Medium.nC]Prescribed boundary trace substances

Model Modelica.​Fluid.​Sources.​MassFlowSource_T
Ideal flow source that produces a prescribed mass flow with prescribed temperature, mass fraction and trace substances

Information

Models an ideal flow source, with prescribed values of flow rate, temperature, composition and trace substances:

If use_m_flow_in is false (default option), the m_flow parameter is used as boundary pressure, and the m_flow_in input connector is disabled; if use_m_flow_in is true, then the m_flow parameter is ignored, and the value provided by the input connector is used instead.

The same thing goes for the temperature and composition

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 flow rate, do not have an effect.

Extends from Modelica.​Fluid.​Sources.​BaseClasses.​PartialFlowSource (Partial component source with one fluid connector).

Parameters

TypeNameDefaultDescription
IntegernPorts0Number of ports
Booleanuse_m_flow_infalseGet the mass flow rate from the input connector
Booleanuse_T_infalseGet the temperature from the input connector
Booleanuse_X_infalseGet the composition from the input connector
Booleanuse_C_infalseGet the trace substances from the input connector
MassFlowRatem_flow0Fixed mass flow rate going out of the fluid port
TemperatureTMedium.​T_defaultFixed value of temperature
MassFractionX[Medium.nX]Medium.​X_defaultFixed value of composition
ExtraPropertyC[Medium.nC]Medium.​C_defaultFixed values of trace substances

Connectors

TypeNameDescription
FluidPort_bports[nPorts] 
input RealInputm_flow_inPrescribed mass flow rate
input RealInputT_inPrescribed fluid temperature
input RealInputX_in[Medium.nX]Prescribed fluid composition
input RealInputC_in[Medium.nC]Prescribed boundary trace substances

Model Modelica.​Fluid.​Sources.​MassFlowSource_h
Ideal flow source that produces a prescribed mass flow with prescribed specific enthalpy, mass fraction and trace substances

Information

Models an ideal flow source, with prescribed values of flow rate, temperature and composition:

If use_m_flow_in is false (default option), the m_flow parameter is used as boundary pressure, and the m_flow_in input connector is disabled; if use_m_flow_in is true, then the m_flow parameter is ignored, and the value provided by the input connector is used instead.

The same thing goes for the temperature and composition

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 flow rate, do not have an effect.

Extends from Modelica.​Fluid.​Sources.​BaseClasses.​PartialFlowSource (Partial component source with one fluid connector).

Parameters

TypeNameDefaultDescription
IntegernPorts0Number of ports
Booleanuse_m_flow_infalseGet the mass flow rate from the input connector
Booleanuse_h_infalseGet the specific enthalpy from the input connector
Booleanuse_X_infalseGet the composition from the input connector
Booleanuse_C_infalseGet the trace substances from the input connector
MassFlowRatem_flow0Fixed mass flow rate going out of the fluid port
SpecificEnthalpyhMedium.​h_defaultFixed value of specific enthalpy
MassFractionX[Medium.nX]Medium.​X_defaultFixed value of composition
ExtraPropertyC[Medium.nC]Medium.​C_defaultFixed values of trace substances

Connectors

TypeNameDescription
FluidPort_bports[nPorts] 
input RealInputm_flow_inPrescribed mass flow rate
input RealInputh_inPrescribed fluid specific enthalpy
input RealInputX_in[Medium.nX]Prescribed fluid composition
input RealInputC_in[Medium.nC]Prescribed boundary trace substances