modelFlowSource

Single or two phases flow source. Mainly necessary to generate pressure, enthalpy, and composition values at a connection
Diagram of FlowSource

Information

The main function of the FlowSource is to provide pressure, specific enthalpy and composition to a connection. In plus, elevation and flow can be added also to the connection. In the 'General' tab you can select if you want to use, or not, the connection as a flow and/or elevation source.

In the sourceOption parameter, you can select between several calculation methods for pressure and specific enthalpy. Later, in the 'External values' tab you can select, for some variables only, if you want to use the values supplied through the Real input connectors, or the values entered manually at the 'Local values' tab. And in the 'Local values' tab you enter the values to use.

Parameters

TypeNameDefaultDescription
FreeFluids.Types.SourceOptionsourceOptionFreeFluids.Types.SourceOption.useP_Thow to generate port pressure and enthalpy
BooleanisElevSourcetrueuse specified gravitational height
BooleanisGsourcefalseuse specified mass flow
Local values
Modelica.Units.SI.HeightElevation0
Modelica.Units.SI.MassFlowRateG0
Modelica.Units.SI.AbsolutePressureP1e5
Modelica.Units.SI.TemperatureT298.15
Modelica.Units.SI.SpecificEnthalpyHif sourceOption == FreeFluids.Types.SourceOption.useP_T then Medium.specificEnthalpy(Medium.setState_pTX(P, T, X)) elseif sourceOption == FreeFluids.Types.SourceOption.useD_T then Medium.specificEnthalpy(Medium.setState_dTX(D, T, X)) elseif sourceOption == FreeFluids.Types.SourceOption.useSatGasP then Medium.dewEnthalpy(Medium.setSat_p(P)) elseif sourceOption == FreeFluids.Types.SourceOption.useSatGasT then Medium.dewEnthalpy(Medium.setSat_T(T)) else Medium.h_default
Modelica.Units.SI.DensityD100
Medium.MassFraction[Medium.nX]XMedium.X_default
External values
BooleanexternalGfalse
BooleanexternalTfalse
BooleanexternalPfalse

Connectors

TypeNameDefaultDescription
FreeFluids.Interfaces.FluidPortBPortB
Modelica.Blocks.Interfaces.RealInputGext
Modelica.Blocks.Interfaces.RealInputText
Modelica.Blocks.Interfaces.RealInputPext

Contents

NameDescription
Medium