modelValveBase
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
| Type | Name | Default | Description |
|---|---|---|---|
| Boolean | fixedAv | (if CvData == ThermoPower.Choices.Valve.CvTypes.Av then true else false) | |
| Boolean | CheckValve | false | Reverse flow stopped |
| Real | b | 0.01 | Regularisation factor |
| SI.PressureDifference | dpMin | 0 | minimum dp to be used for reversal flow calculation |
| Boolean | allowFlowReversal | system.allowFlowReversal | = true to allow flow reversal, false restricts to design direction |
| SI.Volume | V | 0 | Valve Internal Volume |
| Boolean | useNoEvent | false | =true, to avoid events in case of chattering in zero-flow condition |
| Flow Coefficient | |||
| ThermoPower.Choices.Valve.CvTypes | CvData | ThermoPower.Choices.Valve.CvTypes.Av | Selection of flow coefficient |
| SI.Area | Av | Av (metric) flow coefficient | |
| Real | Kv | 0 | Kv (metric) flow coefficient |
| Real | Cv | 0 | Cv (US) flow coefficient [USG/min] |
| Valve Opening | |||
| Boolean | useThetaInput | true | Use the input connector for the valve opening |
| SI.PerUnit | theta_fix | 1 | Fixed opening value when the input connector not used |
| Nominal operating point | |||
| Medium.AbsolutePressure | pnom | Nominal inlet pressure | |
| SI.PressureDifference | dpnom | Nominal pressure drop | |
| Medium.MassFlowRate | wnom | Nominal mass flowrate | |
| Medium.Density | rhonom | 1000 | Nominal density |
| SI.PerUnit | thetanom | 1 | Nominal valve opening |
| SI.Power | Qnom | 0 | Nominal heat loss to ambient |
| Initialisation | |||
| Choices.Init.Options | initOpt | system.initOpt | Initialisation option |
| Medium.AbsolutePressure | pin_start | pnom | Inlet pressure start value |
| Medium.AbsolutePressure | pout_start | pnom - dpnom | Inlet pressure start value |
| Medium.SpecificEnthalpy | hstart | 1e5 | Specific Enthalpy Start Value |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| FlangeA | inlet | ||
| FlangeB | outlet | ||
| Modelica.Blocks.Interfaces.RealInput | theta | Valve opening in per unit |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Medium.ThermodynamicState | fluidState | ||
| ThermoPower.System | system | System wide properties | |
| Medium.MassFlowRate | w | Mass flow rate | |
| Units.LiquidDensity | rho | Inlet density | |
| Medium.Temperature | Tin | ||
| Medium.SpecificEnthalpy | h | Fluid specific enthalpy | |
| Medium.SpecificEnthalpy | hin | Enthalpy of entering fluid | |
| Medium.SpecificEnthalpy | hout | Enthalpy of outgoing fluid | |
| SI.PressureDifference | dp | Pressure drop across the valve | |
| SI.PerUnit | theta_act | Actual valve opening |
Contents
| Name | Description |
|---|---|
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.