MassFlowSource_T

Ideal flow source that produces a prescribed mass flow with prescribed temperature, mass fraction and trace substances

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

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

  • Prescribed mass flow rate.
  • Prescribed temperature.
  • Boundary composition (only for multi-substance or trace-substance flow).

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.

Parameters (9)

nPorts

Value: 0

Type: Integer

Description: Number of ports

use_m_flow_in

Value: false

Type: Boolean

Description: Get the mass flow rate from the input connector

use_T_in

Value: false

Type: Boolean

Description: Get the temperature from the input connector

use_X_in

Value: false

Type: Boolean

Description: Get the composition from the input connector

use_C_in

Value: false

Type: Boolean

Description: Get the trace substances from the input connector

m_flow

Value: 0

Type: MassFlowRate (kg/s)

Description: Fixed mass flow rate going out of the fluid port

T

Value: Medium.T_default

Type: Temperature (K)

Description: Fixed value of temperature

X

Value: Medium.X_default

Type: MassFraction[Medium.nX] (kg/kg)

Description: Fixed value of composition

C

Value: Medium.C_default

Type: ExtraProperty[Medium.nC]

Description: Fixed values of trace substances

Connectors (5)

ports

Type: FluidPort_b[nPorts]

m_flow_in

Type: RealInput

Description: Prescribed mass flow rate

T_in

Type: RealInput

Description: Prescribed fluid temperature

X_in

Type: RealInput[Medium.nX]

Description: Prescribed fluid composition

C_in

Type: RealInput[Medium.nC]

Description: Prescribed boundary trace substances

Components (1)

medium

Type: BaseProperties

Description: Medium in the source

Used in Examples (8)

TanksWithOverflow

Modelica.Fluid.Examples.Tanks

Two tanks connected with pipes at different heights

OneTank

Modelica.Fluid.Examples.AST_BatchPlant.Test

Tank with one time-varying top inlet mass flow rate and a bottom outlet into the ambient

TankWithEmptyingPipe1

Modelica.Fluid.Examples.AST_BatchPlant.Test

Demonstrates a tank with one constant top inlet mass flow rate and a bottom outlet into the ambient

NonCircularPipes

Modelica.Fluid.Examples

Comparing a circular with a non-circular pipe

HeatExchangerSimulation

Modelica.Fluid.Examples.HeatExchanger

simulation for the heat exchanger model

RoomCO2

Modelica.Fluid.Examples.TraceSubstances

Demonstrates a room volume with CO2 accumulation

RoomCO2WithControls

Modelica.Fluid.Examples.TraceSubstances

Demonstrates a room volume with CO2 controls

MeasuringTemperature

Modelica.Fluid.Examples.Explanatory

Differences between using one port with and without explicit junction model and two port sensors for fluid temperature measuring