modelFlow1DFEM
Extends from BaseClasses.Flow1DBase (Basic interface for 1-dimensional water/steam fluid flow models).
Information
This model describes the flow of water or steam in a rigid tube. The basic modelling assumptions are:
- The fluid state is always one-phase (i.e. subcooled liquid or superheated steam).
- Uniform velocity is assumed on the cross section, leading to a 1-D distributed parameter model.
- Turbulent friction is always assumed; a small linear term is added to avoid numerical singularities at zero flowrate. The friction effects are not accurately computed in the laminar and transitional flow regimes, which however should not be an issue in most applications using water or steam as a working fluid.
- The model is based on dynamic mass, momentum, and energy balances. The dynamic momentum term can be switched off, to avoid the fast oscillations that can arise from its coupling with the mass balance (sound wave dynamics).
- The longitudinal heat diffusion term is neglected.
- The energy balance equation is written by assuming a uniform pressure distribution; the pressure drop is lumped either at the inlet or at the outlet.
- The fluid flow can exchange thermal power through the lateral surface, which is represented by the wall connector. The actual heat flux must be computed by a connected component (heat transfer computation module).
The mass, momentum, and energy balance equation are discretised with the finite element method. The state variables are one pressure, one flowrate (optional) and N specific enthalpies.
The turbulent friction factor can be either assumed as a constant, or computed by Colebrook's equation. In the former case, the friction factor can be supplied directly, or given implicitly by a specified operating point. In any case, the multiplicative correction coefficient Kfc can be used to modify the friction coefficient, e.g. to fit experimental data.
A small linear pressure drop is added to avoid numerical singularities at low or zero flowrate. The wnom parameter must be always specified: the additional linear pressure drop is such that it is equal to the turbulent pressure drop when the flowrate is equal to wnf*wnom (the default value is 1% of the nominal flowrate). Increase wnf if numerical instabilities occur in tubes with very low pressure drops.
Flow reversal is fully supported.
Modelling options
Thermal variables (enthalpy, temperature, density) are computed in N equally spaced nodes, including the inlet (node 1) and the outlet (node N); N must be greater or equal than 2.
The dynamic momentum term is included or neglected depending on the DynamicMomentum parameter.
Two parameters are available to tune the numerical method. The stabilisation coefficient alpha varies from 0.0 to 1.0; alpha=0.0 corresponds to a non-stabilised method, which gives rise to non-physical oscillations; the default value of 1.0 corresponds to a stabilised method, with well-damped oscillations. The mass lumping coefficient (ML) allows to use a hybrid finite-element/finite-volume discretisation method for the dynamic matrix; the default value ML=0.0 corresponds to a standard FEM model, ML=1.0 corresponds to a full finite-volume method, with the associated numerical diffusion effects. Intermediate values can be used.
The following options are available to specify the friction coefficient:
- FFtype = FFtypes.Kfnom: the hydraulic friction coefficient Kf is set directly to Kfnom.
- FFtype = FFtypes.OpPoint: the hydraulic friction coefficient is specified by a nominal operating point (wnom,dpnom, rhonom).
- FFtype = FFtypes.Cfnom: the friction coefficient is computed by giving the (constant) value of the Fanning friction factor Cfnom.
- FFtype = FFtypes.Colebrook: the Fanning friction factor is computed by Colebrook's equation (assuming Re > 2100, e.g. turbulent flow).
- FFtype = FFtypes.NoFriction: no friction is assumed across the pipe.
If HydraulicCapacitance = 2 (default option) then the mass buildup term depending on the pressure is lumped at the outlet, while the optional momentum buildup term depending on the flowrate is lumped at the inlet. If HydraulicCapacitance = 1 the reverse takes place.
Start values for pressure and flowrate are specified by pstart, wstart. The start values for the node enthalpies are linearly distributed from hstartin at the inlet to hstartout at the outlet.
A bank of Nt identical tubes working in parallel can be modelled by setting Nt > 1. The geometric parameters always refer to a single tube.
This models makes the temperature and external heat flow distributions visible through the wall connector. If other variables (e.g. the heat transfer coefficient) are needed by external components to compute the actual heat flow, the wall connector can be replaced by an extended version of the DHT connector.
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) | |
| ThermoPower.Choices.Flow1D.FFtypes | FFtype (from Flow1DBase) | ThermoPower.Choices.Flow1D.FFtypes.NoFriction | Friction Factor Type |
| SI.PressureDifference | dpnom (from Flow1DBase) | 0 | Nominal pressure drop (friction term only!) |
| Real | Kfnom (from Flow1DBase) | 0 | Nominal hydraulic resistance coefficient (DP = Kfnom*w^2/rho) |
| Medium.Density | rhonom (from Flow1DBase) | 0 | Nominal inlet density |
| SI.PerUnit | Cfnom (from Flow1DBase) | 0 | Nominal Fanning friction factor |
| SI.PerUnit | e (from Flow1DBase) | 0 | Relative roughness (ratio roughness/diameter) |
| 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) |
| SI.PerUnit | alpha | 1 | Numerical stabilization coefficient |
| SI.PerUnit | ML | 0 | Mass Lumping Coefficient |
| SI.PerUnit | wnf_bc | 0.01 | Fraction of the nominal total mass flow rate for boundary condition FEM regularization |
| 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) | ||
| ThermoPower.Thermal.DHTNodes | wall |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| ThermoPower.System | system (from Flow1DBase) | System wide properties | |
| SI.Power | Q (from Flow1DBase) | Total heat flow through the lateral boundary (all Nt tubes) | |
| SI.Time | Tr (from Flow1DBase) | Residence time | |
| HeatTransfer | heatTransfer | Instantiated heat transfer model | |
| Medium.ThermodynamicState[N] | fluidState | Thermodynamic state of the fluid at the nodes | |
| SI.Length | omega_hyd | Hydraulic perimeter (single tube) | |
| Real[N] | Kf | Friction coefficients | |
| Real[N] | Cf | Fanning friction factors | |
| Real | dwdt | Dynamic momentum term | |
| Medium.AbsolutePressure | p | Fluid pressure | |
| SI.Pressure | Dpfric | Pressure drop due to friction (total) | |
| SI.Pressure | Dpfric1 | Pressure drop due to friction (from inlet to capacitance) | |
| SI.Pressure | Dpfric2 | Pressure drop due to friction (from capacitance to outlet) | |
| SI.Pressure | Dpstat | Pressure drop due to static head | |
| Medium.MassFlowRate[N] | w | Mass flowrate (single tube) | |
| SI.Velocity[N] | u | Fluid velocity | |
| 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 | |
| SI.SpecificVolume[N] | v | Fluid specific volume | |
| SI.Mass | Mtot | Total mass of fluid |
Contents
| Name | Description |
|---|---|
Revisions
- 24 Mar 2005
by Francesco Casella:
FFtypes package and NoFriction option added. - 1 Mar 2005
by Francesco Casella:
Residence time added. - 16 Dec 2004
by Francesco Casella:
Standard medium definition added. - 8 Oct 2004
by Francesco Casella:
Model now based on Flow1DBase. - 24 Sep 2004
by Francesco Casella:
Removed wstart, pstart. Added pstartin, pstartout. - 23 Jul 2004
by Francesco Casella:
Adapted to Modelica.Media. - 1 Jul 2004
by Francesco Schiavo:
Mass flow-rate spatial distribution treatment added. - 15 Jan 2004
by Francesco Casella:
Computation of fluid velocity u added. Improved treatment of geometric parameters - 1 Oct 2003
by Francesco Schiavo:
First release.