modelTwoWayTable

Two way valve with table-specified flow characteristics

Extends from BaseClasses.PartialTwoWayValveKv.

Information

Two way valve with opening characteristic that is configured through a table.

The mass flow rate for the fully open valve is determined based on the value of the parameter CvData. For the different valve positions y ∈ [0, 1], this nominal flow rate is scaled by the values of the parameter flowCharacteristics. The parameter flowCharacteristics declares a table of the form

y 0 ... 1
φ l ... 1

where l = Kv(y=0)/Kv(y=1) > 0 is the valve leakage. The first row is the valve opening, and the second row is the mass flow rate, relative to the mass flow rate of the fully open valve, under the assumption of a constant pressure difference across the valve. A suggested value for the valve leakage is l=0.0001. If l = 0, then this model will replace it with l = 10-8 for numerical reasons. For example, if a valve has Kv=0.5 [m3/h/bar1/2] and a linear opening characteristics and a valve leakage of l=0.0001, then one would set

 CvData=IDEAS.Fluid.Types.CvTypes.Kv
 Kv = 0.5
 flowCharacteristics(y={0,1}, phi={0.0001,1})
 

Note, however, that IDEAS.Fluid.Actuators.Valves.TwoWayLinear provides a more efficient implementation for this simple case.

The parameter flowCharacteristics must meet the following requirements, otherwise the model stops with an error:

  • Their arrays y and phi must be strictly increasing.
  • The first value must satisfy y[1]=0, and phi[1] must be equal to the leakage flow rate, which must be bigger than zero. Otherwise, a default value of 1E-8 is used.
  • The last values must satisfy y[end]=1 and phi[end]=1.

This model is based on the partial valve model IDEAS.Fluid.Actuators.BaseClasses.PartialTwoWayValve. Check this model for more information, such as the regularization near the origin.

For an example that specifies an opening characteristics, see IDEAS.Fluid.Actuators.Valves.Examples.TwoWayValveTable.

Parameters

TypeNameDefaultDescription
Data.GenericflowCharacteristicsTable with flow characteristics

Revisions

  • June 10, 2021, by Michael Wetter:
    Changed implementation of the filter and changed the parameter order to a constant as most users need not change this value.
    This is for #1498.
  • August 7, 2020, by Ettore Zanetti:
    changed the computation of phi using max(0.1*l, . ) to avoid phi=0. See issue 1376.
  • November 9, 2019, by Filip Jorissen:
    Guarded the computation of phi using max(0, . ) to avoid negative phi. See issue 1223.
  • January 26, 2016, by Michael Wetter:
    Removed equality comparison for Real in the assert statements as this is not allowed in Modelica.
  • August 12, 2014, by Michael Wetter:
    Removed the end keyword when accessing array elements, as this language construct caused an error in OpenModelica.
  • April 4, 2014, by Michael Wetter:
    Moved the assignment of the flow function phi to the model instantiation because in its base class, the keyword input has been added to the variable phi.
  • March 26, 2014 by Michael Wetter:
    First implementation.