modelFlow1DFEMnm
1-dimensional fluid flow model for p-h fluid (finite elements)
Extends from BaseClasses.Flow1DBase (Basic interface for 1-dimensional p-h fluid fluid flow models).
Information
This model describes the flow of water or steam in a rigid tube.
It implements the same model of the Flow1DFEM but written without the use of matrices, thus increasing the efficiency in terms of translation time in case of a large number of nodes.
The only difference to the model Flow1DFEM is that this implementation is pure FEM only, so it is no possible to switch to pure Finite Volume or mixed FEM/Finite Volume configurations.
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | pi (from Flow1DBase) | Modelica.Constants.pi | |
| Integer | N (from Flow1DBase) | 2 | Number of nodes for thermal variables |
| Integer | Nw (from Flow1DBase) | N - 1 | Number of volumes on the wall interface |
| Integer | Nt (from Flow1DBase) | 1 | Number of tubes in parallel |
| SI.Distance | L (from Flow1DBase) | Tube length | |
| SI.Position | H (from Flow1DBase) | 0 | Elevation of outlet over inlet |
| SI.Area | A (from Flow1DBase) | Cross-sectional area (single tube) | |
| SI.Length | omega (from Flow1DBase) | Perimeter of heat transfer surface (single tube) | |
| SI.Length | Dhyd (from Flow1DBase) | omega/pi | Hydraulic Diameter (single tube) |
| Medium.MassFlowRate | wnom (from Flow1DBase) | Nominal mass flowrate (total) | |
| SI.PressureDifference | dpnom (from Flow1DBase) | 0 | Nominal pressure drop (friction term only!) |
| SI.PerUnit | Kfc (from Flow1DBase) | 1 | Friction factor correction coefficient |
| Boolean | DynamicMomentum (from Flow1DBase) | false | Inertial phenomena accounted for |
| ThermoPower.Choices.Flow1D.HCtypes | HydraulicCapacitance (from Flow1DBase) | ThermoPower.Choices.Flow1D.HCtypes.Downstream | Location of the hydraulic capacitance |
| Boolean | avoidInletEnthalpyDerivative (from Flow1DBase) | true | Avoid inlet enthalpy derivative |
| Boolean | allowFlowReversal (from Flow1DBase) | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction |
| SI.PerUnit | wnf (from Flow1DBase) | 0.02 | Fraction of nominal flow rate at which linear friction equals turbulent friction |
| SI.Acceleration | g (from Flow1DBase) | Modelica.Constants.g_n | |
| SI.PerUnit | dzdx (from Flow1DBase) | H/L | Slope |
| SI.Length | l (from Flow1DBase) | L/(N - 1) | Length of a single volume |
| SI.Volume | V (from Flow1DBase) | Nt*A*L | Total volume (all Nt tubes) |
| Modelica.Units.SI.PerUnit | alpha | 1 | Numerical stabilization coefficient |
| Modelica.Units.SI.PerUnit | wnf_bc | 0.01 | Fraction of the nominal total mass flow rate for boundary condition FEM regularization |
| Modelica.Units.SI.PerUnit | wnf_alpha | 0.01 | Fraction of the nominal total mass flow rate for stabilization parameter regularization |
| Boolean | regularizeBoundaryConditions | false | Regularize boundary condition matrices |
| Boolean | idealGasDensityDistribution | false | Assume ideal-gas-type density distributions for mass balances |
| Boolean | evenN | (div(N, 2)*2 == N) | The number of nodes is even |
| Initialisation | |||
| Choices.FluidPhase.FluidPhases | FluidPhaseStart (from Flow1DBase) | Choices.FluidPhase.FluidPhases.Liquid | Fluid phase (only for initialization!) |
| Medium.AbsolutePressure | pstart (from Flow1DBase) | 1e5 | Pressure start value |
| Medium.SpecificEnthalpy | hstartin (from Flow1DBase) | if FluidPhaseStart == Choices.FluidPhase.FluidPhases.Liquid then 1e5 else if FluidPhaseStart == Choices.FluidPhase.FluidPhases.Steam then 3e6 else 1e6 | Inlet enthalpy start value |
| Medium.SpecificEnthalpy | hstartout (from Flow1DBase) | if FluidPhaseStart == Choices.FluidPhase.FluidPhases.Liquid then 1e5 else if FluidPhaseStart == Choices.FluidPhase.FluidPhases.Steam then 3e6 else 1e6 | Outlet enthalpy start value |
| Medium.SpecificEnthalpy[N] | hstart (from Flow1DBase) | linspace(hstartin, hstartout, N) | Start value of enthalpy vector (initialized by default) |
| Choices.Init.Options | initOpt (from Flow1DBase) | system.initOpt | Initialisation option |
| Boolean | noInitialPressure (from Flow1DBase) | false | Remove initial equation on pressure |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| FlangeA | infl (from Flow1DBase) | ||
| FlangeB | outfl (from Flow1DBase) | ||
| Thermal.DHTNodes | wall |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| ThermoPower.System | system (from Flow1DBase) | System wide properties | |
| SI.Time | Tr (from Flow1DBase) | Residence time | |
| HeatTransfer | heatTransfer | Instantiated heat transfer model | |
| Friction | friction | Instantiated friction model | |
| Medium.ThermodynamicState[N] | fluidState | Thermodynamic state of the fluid at the nodes | |
| Real | dwdt | Dynamic momentum term | |
| Medium.AbsolutePressure | p | Fluid pressure | |
| Modelica.Units.SI.Pressure | Dpfric | Pressure drop due to friction (total) | |
| Modelica.Units.SI.Pressure | Dpfric1 | Pressure drop due to friction (from inlet to capacitance) | |
| Modelica.Units.SI.Pressure | Dpfric2 | Pressure drop due to friction (from capacitance to outlet) | |
| Modelica.Units.SI.Pressure | Dpstat | Pressure drop due to static head | |
| Medium.MassFlowRate[N] | w | Mass flowrate (single tube) | |
| Modelica.Units.SI.Velocity[N] | u | Fluid velocity | |
| Modelica.Units.SI.HeatFlux[N] | phi | Heat flux entering the fluid | |
| Medium.Temperature[N] | T | Fluid temperature | |
| Medium.SpecificEnthalpy[N] | h | Fluid specific enthalpy | |
| Medium.Density[N] | rho | Fluid density | |
| Modelica.Units.SI.SpecificVolume[N] | v | Fluid specific volume | |
| Modelica.Units.SI.Mass | Mtot | Total mass of fluid | |
| Modelica.Units.SI.Power | Q | Total heat flow through lateral boundary |
Contents
| Name | Description |
|---|---|
| Friction |
Revisions
- 5 Jan 2026 by Andrea Giorgio Bartolini:
First release.