modelFlowSource
Single or two phases flow source. Mainly necessary to generate pressure, enthalpy, and composition values at a connection
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
| Type | Name | Default | Description |
|---|---|---|---|
| FreeFluids.Types.SourceOption | sourceOption | FreeFluids.Types.SourceOption.useP_T | how to generate port pressure and enthalpy |
| Boolean | isElevSource | true | use specified gravitational height |
| Boolean | isGsource | false | use specified mass flow |
| Local values | |||
| Modelica.Units.SI.Height | Elevation | 0 | |
| Modelica.Units.SI.MassFlowRate | G | 0 | |
| Modelica.Units.SI.AbsolutePressure | P | 1e5 | |
| Modelica.Units.SI.Temperature | T | 298.15 | |
| Modelica.Units.SI.SpecificEnthalpy | H | if 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.Density | D | 100 | |
| Medium.MassFraction[Medium.nX] | X | Medium.X_default | |
| External values | |||
| Boolean | externalG | false | |
| Boolean | externalT | false | |
| Boolean | externalP | false | |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| FreeFluids.Interfaces.FluidPortB | PortB | ||
| Modelica.Blocks.Interfaces.RealInput | Gext | ||
| Modelica.Blocks.Interfaces.RealInput | Text | ||
| Modelica.Blocks.Interfaces.RealInput | Pext |
Contents
| Name | Description |
|---|---|