modelFlow1DFV2ph

1-dimensional fluid flow model for water/steam (finite volumes, 2-phase)

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 either one-phase, or a two-phase mixture.
  • In case of two-phase flow, the same velocity is assumed for both phases (homogeneous model).
  • 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 volume method. The state variables are one pressure, one flowrate (optional) and N-1 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.

The model assumes that the mass flow rate is always from the inlet to the outlet. Small reverse flow is allowed (e.g. when closing a valve at the outlet), but the model will not account for it explicitly.

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 than or equal to 2.

The dynamic momentum term is included or neglected depending on the DynamicMomentum parameter.

The density is computed assuming a linear distribution of the specific enthalpy between the nodes; this requires the availability of the time derivative of the inlet enthalpy. If this is not available, it is possible to set avoidInletEnthalpyDerivative to true, which will cause the mean density of the first volume to be approximated as its outlet density, thus avoiding the need of the inlet enthalpy derivative.

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 storage term depending on the pressure is lumped at the outlet, while the optional momentum storage 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

TypeNameDefaultDescription
Realpi (from Flow1DBase)Modelica.Constants.pi
IntegerN (from Flow1DBase)2Number of nodes for thermal variables
IntegerNw (from Flow1DBase)N - 1Number of volumes on the wall interface
IntegerNt (from Flow1DBase)1Number of tubes in parallel
SI.DistanceL (from Flow1DBase)Tube length
SI.PositionH (from Flow1DBase)0Elevation of outlet over inlet
SI.AreaA (from Flow1DBase)Cross-sectional area (single tube)
SI.Lengthomega (from Flow1DBase)Perimeter of heat transfer surface (single tube)
SI.LengthDhyd (from Flow1DBase)omega/piHydraulic Diameter (single tube)
Medium.MassFlowRatewnom (from Flow1DBase)Nominal mass flowrate (total)
ThermoPower.Choices.Flow1D.FFtypesFFtype (from Flow1DBase)ThermoPower.Choices.Flow1D.FFtypes.NoFrictionFriction Factor Type
SI.PressureDifferencedpnom (from Flow1DBase)0Nominal pressure drop (friction term only!)
RealKfnom (from Flow1DBase)0Nominal hydraulic resistance coefficient (DP = Kfnom*w^2/rho)
Medium.Densityrhonom (from Flow1DBase)0Nominal inlet density
SI.PerUnitCfnom (from Flow1DBase)0Nominal Fanning friction factor
SI.PerUnite (from Flow1DBase)0Relative roughness (ratio roughness/diameter)
SI.PerUnitKfc (from Flow1DBase)1Friction factor correction coefficient
BooleanDynamicMomentum (from Flow1DBase)falseInertial phenomena accounted for
ThermoPower.Choices.Flow1D.HCtypesHydraulicCapacitance (from Flow1DBase)ThermoPower.Choices.Flow1D.HCtypes.DownstreamLocation of the hydraulic capacitance
BooleanavoidInletEnthalpyDerivative (from Flow1DBase)trueAvoid inlet enthalpy derivative
BooleanallowFlowReversal (from Flow1DBase)system.allowFlowReversal= true to allow flow reversal, false restricts to design direction
SI.PerUnitwnf (from Flow1DBase)0.02Fraction of nominal flow rate at which linear friction equals turbulent friction
SI.Accelerationg (from Flow1DBase)Modelica.Constants.g_n
SI.PerUnitdzdx (from Flow1DBase)H/LSlope
SI.Lengthl (from Flow1DBase)L/(N - 1)Length of a single volume
SI.VolumeV (from Flow1DBase)Nt*A*LTotal volume (all Nt tubes)
SI.Pressurepzero10Small deltap for calculations
Medium.AbsolutePressurepcMedium.fluidConstants[1].criticalPressure
SI.SpecificEnthalpyhzero1e-3Small value for deltah
SI.PerUnitwnm1e-3Maximum fraction of the nominal flow rate allowed as reverse flow
BooleanfixedMassFlowSimplifiedfalseFix flow rate = wnom for simplified homotopy model
Initialisation
Choices.FluidPhase.FluidPhasesFluidPhaseStart (from Flow1DBase)Choices.FluidPhase.FluidPhases.LiquidFluid phase (only for initialization!)
Medium.AbsolutePressurepstart (from Flow1DBase)1e5Pressure start value
Medium.SpecificEnthalpyhstartin (from Flow1DBase)if FluidPhaseStart == Choices.FluidPhase.FluidPhases.Liquid then 1e5 else if FluidPhaseStart == Choices.FluidPhase.FluidPhases.Steam then 3e6 else 1e6Inlet enthalpy start value
Medium.SpecificEnthalpyhstartout (from Flow1DBase)if FluidPhaseStart == Choices.FluidPhase.FluidPhases.Liquid then 1e5 else if FluidPhaseStart == Choices.FluidPhase.FluidPhases.Steam then 3e6 else 1e6Outlet enthalpy start value
Medium.SpecificEnthalpy[N]hstart (from Flow1DBase)linspace(hstartin, hstartout, N)Start value of enthalpy vector (initialized by default)
Choices.Init.OptionsinitOpt (from Flow1DBase)system.initOptInitialisation option
BooleannoInitialPressure (from Flow1DBase)falseRemove initial equation on pressure

Connectors

TypeNameDefaultDescription
FlangeAinfl (from Flow1DBase)
FlangeBoutfl (from Flow1DBase)
ThermoPower.Thermal.DHTVolumeswall

Components

TypeNameDefaultDescription
ThermoPower.Systemsystem (from Flow1DBase)System wide properties
SI.PowerQ (from Flow1DBase)Total heat flow through the lateral boundary (all Nt tubes)
SI.TimeTr (from Flow1DBase)Residence time
HeatTransferheatTransferInstantiated heat transfer model
Medium.ThermodynamicState[N]fluidStateThermodynamic state of the fluid at the nodes
Medium.SaturationPropertiessatProperties of saturated fluid
SI.Lengthomega_hydWet perimeter (single tube)
SI.PressureDpfricPressure drop due to friction
SI.PressureDpstatPressure drop due to static head
Real[N - 1]KfFriction coefficient
Real[N - 1]KflLinear friction coefficient
Real[N - 1]CfFanning friction factor
RealdwdtDynamic momentum term
Medium.AbsolutePressurepFluid pressure for property calculations
SI.Pressure[N - 1]dpfPressure drop due to friction between two nodes
Medium.MassFlowRatewMass flowrate (single tube)
Medium.MassFlowRate[N - 1]wbarAverage mass flow rates (single tube)
SI.Power[N - 1]Q_singleheatTransfer.Qvol/NtHeat flows entering the volumes from the lateral boundary (single tube)
SI.Velocity[N]uFluid velocity
Medium.Temperature[N]TFluid temperature
Medium.TemperatureTsSaturated water temperature
Medium.SpecificEnthalpy[N]hFluid specific enthalpy
Medium.SpecificEnthalpy[N - 1]htildeEnthalpy state variables
Medium.SpecificEnthalpyhlSaturated liquid temperature
Medium.SpecificEnthalpyhvSaturated vapour temperature
SI.PerUnit[N]xSteam quality
Medium.Density[N]rhoFluid density
Units.LiquidDensityrholSaturated liquid density
Units.GasDensityrhovSaturated vapour density
SI.MassMFluid mass
SI.MassMtotFluid mass (total)

Contents

NameDescription
HeatTransfer

Revisions