modelValveBase

Base model for valves

Extends from Icons.FluidPh.Valve.

Information

This is the base model for the ValveLiq, ValveLiqChoked, and ValveVap valve models. The model is based on the IEC 534 / ISA S.75 standards for valve sizing.

The model optionally supports reverse flow conditions (assuming symmetrical behaviour) or check valve operation, and has been suitably modified to avoid numerical singularities at zero pressure drop.

An optional heat loss to the ambient can be included, proportional to the mass flow rate; Qnom specifies the heat loss at nominal flow rate.

Modelling options

The following options are available to specify the valve flow coefficient in fully open conditions:

  • CvData = ThermoPower.FluidPh.ValveBase.CvTypes.Av: the flow coefficient is given by the metric Av coefficient (m^2).
  • CvData = ThermoPower.FluidPh.ValveBase.CvTypes.Kv: the flow coefficient is given by the metric Kv coefficient (m^3/h).
  • CvData = ThermoPower.FluidPh.ValveBase.CvTypes.Cv: the flow coefficient is given by the US Cv coefficient (USG/min).
  • CvData = ThermoPower.FluidPh.ValveBase.CvTypes.OpPoint: the flow coefficient is specified by the nominal operating point: pnom, dpnom, wnom, rhonom, thetanom (in forward flow).

The nominal pressure drop dpnom must always be specified; to avoid numerical singularities, the flow characteristic is modified for pressure drops less than b*dpnom (the default value is 1% of the nominal pressure drop). Increase this parameter if numerical instabilities occur in valves with very low pressure drops.

If CheckValve is true, then the flow is stopped when the outlet pressure is higher than the inlet pressure; otherwise, reverse flow takes place.

The default flow characteristic FlowChar is linear; it can be replaced by functions taken from Functions.ValveCharacteristics, or by any suitable user-defined function extending Functions.ValveCharacteristics.baseFun.

It is possible to take into account the heat capacity of the fluid inside the valve by specifying its volume V at nominal conditions; this is necessary to avoid singularities in the computation of the enthalpy in case of zero flow rate. If zero flow rate conditions are always avoided, this dynamic effect can be neglected by leaving the default value V = 0, thus avoiding a fast state variable in the model.

Parameters

TypeNameDefaultDescription
BooleanfixedAv(if CvData == ThermoPower.Choices.Valve.CvTypes.Av then true else false)
BooleanCheckValvefalseReverse flow stopped
Realb0.01Regularisation factor
SI.PressureDifferencedpMin0minimum dp to be used for reversal flow calculation
BooleanallowFlowReversalsystem.allowFlowReversal= true to allow flow reversal, false restricts to design direction
SI.VolumeV0Valve Internal Volume
BooleanuseNoEventfalse=true, to avoid events in case of chattering in zero-flow condition
Flow Coefficient
ThermoPower.Choices.Valve.CvTypesCvDataThermoPower.Choices.Valve.CvTypes.AvSelection of flow coefficient
SI.AreaAvAv (metric) flow coefficient
RealKv0Kv (metric) flow coefficient
RealCv0Cv (US) flow coefficient [USG/min]
Valve Opening
BooleanuseThetaInputtrueUse the input connector for the valve opening
SI.PerUnittheta_fix1Fixed opening value when the input connector not used
Nominal operating point
Medium.AbsolutePressurepnomNominal inlet pressure
SI.PressureDifferencedpnomNominal pressure drop
Medium.MassFlowRatewnomNominal mass flowrate
Medium.Densityrhonom1000Nominal density
SI.PerUnitthetanom1Nominal valve opening
SI.PowerQnom0Nominal heat loss to ambient
Initialisation
Choices.Init.OptionsinitOptsystem.initOptInitialisation option
Medium.AbsolutePressurepin_startpnomInlet pressure start value
Medium.AbsolutePressurepout_startpnom - dpnomInlet pressure start value
Medium.SpecificEnthalpyhstart1e5Specific Enthalpy Start Value

Connectors

TypeNameDefaultDescription
FlangeAinlet
FlangeBoutlet
Modelica.Blocks.Interfaces.RealInputthetaValve opening in per unit

Components

TypeNameDefaultDescription
Medium.ThermodynamicStatefluidState
ThermoPower.SystemsystemSystem wide properties
Medium.MassFlowRatewMass flow rate
Units.LiquidDensityrhoInlet density
Medium.TemperatureTin
Medium.SpecificEnthalpyhFluid specific enthalpy
Medium.SpecificEnthalpyhinEnthalpy of entering fluid
Medium.SpecificEnthalpyhoutEnthalpy of outgoing fluid
SI.PressureDifferencedpPressure drop across the valve
SI.PerUnittheta_actActual valve opening

Contents

NameDescription
Medium
FlowChar
sqrtRprotected

Revisions

  • 23 Feb 2026 by Andrea Bartolini:
    Added internal h-state in order to avoid singularities in zero-flow conditions.
  • 17 Jul 2012 by Francesco Casella:
    Added heat loss to ambient (defaults to zero).
  • 5 Nov 2005 by Francesco Casella:
    Moved replaceable characteristics to Function.ValveCharacteristics package.
  • 29 Sep 2005 by Francesco Casella:
    Re-introduced valve sizing by an operating point.
  • 6 Apr 2005 by Francesco Casella:
    Enumeration-type choice of CvData.
  • 16 Dec 2004 by Francesco Casella:
    Standard medium definition added.
  • 18 Nov 2004 by Francesco Casella:
    Avnom removed; Av can now be set directly. Kvnom and Cvnom renamed to Kv and Cv.
    CvData=3 no longer uses dpnom, wnom and rhonom, and requires an additional initial equation to set the flow coefficient based on the initial working conditions.
  • 1 Jul 2004 by Francesco Casella:
    Valve models restructured using inheritance.
    Adapted to Modelica.Media.
  • 1 Oct 2003 by Francesco Casella:
    First release.