modelPartialValve

Base model for valves

Extends from Modelica.Fluid.Interfaces.PartialTwoPortTransport (Partial element transporting fluid between two ports without storage of mass or energy).

Information

This is the base model for the ValveIncompressible, ValveVaporizing, and ValveCompressible 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 regularized, compared to the equations in the standard, in order to avoid numerical singularities around zero pressure drop operating conditions.

The model assumes adiabatic operation (no heat losses to the ambient); changes in kinetic energy from inlet to outlet are neglected in the energy balance.

Modelling options

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

  • CvData = Modelica.Fluid.Types.CvTypes.Av: the flow coefficient is given by the metric Av coefficient (m^2).
  • CvData = Modelica.Fluid.Types.CvTypes.Kv: the flow coefficient is given by the metric Kv coefficient (m^3/h).
  • CvData = Modelica.Fluid.Types.CvTypes.Cv: the flow coefficient is given by the US Cv coefficient (USG/min).
  • CvData = Modelica.Fluid.Types.CvTypes.OpPoint: the flow is computed from the nominal operating point specified by p_nominal, dp_nominal, m_flow_nominal, rho_nominal, opening_nominal.

The nominal pressure drop dp_nominal must always be specified; to avoid numerical singularities, the flow characteristic is modified for pressure drops less than b*dp_nominal (the default value is 1% of the nominal pressure drop). Increase this parameter if numerical problems 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. Use this option only when needed, as it increases the numerical complexity of the problem.

The valve opening characteristic valveCharacteristic, linear by default, can be replaced by any user-defined function. Quadratic and equal percentage with customizable rangeability are already provided by the library. The characteristics for constant port_a.p and port_b.p pressures with continuously changing opening are shown in the next two figures:

ValveCharacteristics1a.png
Components/ValveCharacteristics1b.png

The treatment of parameters Kv and Cv is explained in detail in the User's Guide.

With the optional parameter "filteredOpening", the opening can be filtered with a second order, criticalDamping filter so that the opening demand is delayed by parameter "riseTime". The filtered opening is then available via the output signal "opening_filtered" and is used to control the valve equations. This approach approximates the driving device of a valve. The "riseTime" parameter is used to compute the cut-off frequency of the filter by the equation: f_cut = 5/(2*pi*riseTime). It defines the time that is needed until opening_filtered reaches 99.6 % of a step input of opening. The icon of a valve changes in the following way (left image: filteredOpening=false, right image: filteredOpening=true):

FilteredValveIcon.png

If "filteredOpening = true", the input signal "opening" is limited by parameter leakageOpening, i.e., if "opening" becomes smaller as "leakageOpening", then "leakageOpening" is used instead of "opening" as input for the filter. The reason is that "opening=0" might structurally change the equations of the fluid network leading to a singularity. If a small leakage flow is introduced (which is often anyway present in reality), the singularity might be avoided.

In the next figure, "opening" and "filtered_opening" are shown in the case that filteredOpening = true, riseTime = 1 s, and leakageOpening = 0.02.

ValveFilteredOpening.png

Parameters

TypeNameDefaultDescription
SI.AreaKv2Av27.7e-6Conversion factor
SI.AreaCv2Av24.0e-6Conversion factor
Assumptions
BooleanallowFlowReversal (from PartialTwoPort)system.allowFlowReversal= true to allow flow reversal, false restricts to design direction (port_a -> port_b)
BooleancheckValvefalseReverse flow stopped
Advanced
Medium.AbsolutePressuredp_start (from PartialTwoPortTransport)0.01*system.p_startGuess value of dp = port_a.p - port_b.p
Medium.MassFlowRatem_flow_start (from PartialTwoPortTransport)system.m_flow_startGuess value of m_flow = port_a.m_flow
Medium.MassFlowRatem_flow_small (from PartialTwoPortTransport)if system.use_eps_Re then system.eps_m_flow*system.m_flow_nominal else system.m_flow_smallSmall mass flow rate for regularization of zero flow
Advanced › Diagnostics
Booleanshow_T (from PartialTwoPortTransport)true= true, if temperatures at port_a and port_b are computed
Booleanshow_V_flow (from PartialTwoPortTransport)true= true, if volume flow rate at inflowing port is computed
Flow coefficient
Modelica.Fluid.Types.CvTypesCvDataModelica.Fluid.Types.CvTypes.OpPointSelection of flow coefficient
SI.AreaAvAv (metric) flow coefficient
RealKv0Kv (metric) flow coefficient [m3/h]
RealCv0Cv (US) flow coefficient [USG/min]
Nominal operating point
SI.Pressuredp_nominalNominal pressure drop
Medium.MassFlowRatem_flow_nominalNominal mass flowrate
Medium.Densityrho_nominalMedium.density_pTX(Medium.p_default, Medium.T_default, Medium.X_default)Nominal inlet density
Realopening_nominal1Nominal opening
Filtered opening
BooleanfilteredOpeningfalse= true, if opening is filtered with a 2nd order CriticalDamping filter
SI.TimeriseTime1Rise time of the filter (time to reach 99.6 % of an opening step)
RealleakageOpening1e-3The opening signal is limited by leakageOpening (to improve the numerics)

Connectors

TypeNameDefaultDescription
Modelica.Fluid.Interfaces.FluidPort_aport_a (from PartialTwoPort)Fluid connector a (positive design flow direction is from port_a to port_b)
Modelica.Fluid.Interfaces.FluidPort_bport_b (from PartialTwoPort)Fluid connector b (positive design flow direction is from port_a to port_b)
Modelica.Blocks.Interfaces.RealInputopeningValve position in the range 0..1
Modelica.Blocks.Interfaces.RealOutputopening_filteredFiltered valve position in the range 0..1

Components

TypeNameDefaultDescription
Modelica.Fluid.Systemsystem (from PartialTwoPort)System wide properties
Medium.MassFlowRatem_flow (from PartialTwoPortTransport)Mass flow rate in design flow direction
SI.Pressuredp (from PartialTwoPortTransport)Pressure difference between port_a and port_b (= port_a.p - port_b.p)
SI.VolumeFlowRateV_flow (from PartialTwoPortTransport)m_flow/Modelica.Fluid.Utilities.regStep(m_flow, Medium.density(state_a), Medium.density(state_b), m_flow_small)Volume flow rate at inflowing port (positive when flow from port_a to port_b)
Medium.Temperatureport_a_T (from PartialTwoPortTransport)Modelica.Fluid.Utilities.regStep(port_a.m_flow, Medium.temperature(state_a), Medium.temperature(Medium.setState_phX(port_a.p, port_a.h_outflow, port_a.Xi_outflow)), m_flow_small)Temperature close to port_a, if show_T = true
Medium.Temperatureport_b_T (from PartialTwoPortTransport)Modelica.Fluid.Utilities.regStep(port_b.m_flow, Medium.temperature(state_b), Medium.temperature(Medium.setState_phX(port_b.p, port_b.h_outflow, port_b.Xi_outflow)), m_flow_small)Temperature close to port_b, if show_T = true
Modelica.Blocks.Continuous.Filterfilter

Contents

NameDescription
valveCharacteristic
MinLimiterprotectedLimit the signal above a threshold

Revisions

  • Sept. 5, 2010 by Martin Otter:
    Optional filtering of opening introduced, based on a proposal from Mike Barth (Universitaet der Bundeswehr Hamburg) + Documentation improved.
  • 2 Nov 2005 by Francesco Casella:
    Adapted from the ThermoPower library.