# Ball Valve (G)

Ball valve in a gas network

Since R2023b

Libraries:
Simscape / Fluids / Gas / Valves & Orifices / Flow Control Valves

## Description

The Ball Valve (G) block models flow through a ball valve in a gas network. A rotating ball with a central hole, or bore, controls the flow of the valve. When the bore aligns with the valve inlet and outlet the valve is open. The physical signal at port S controls the ball rotation.

### Valve Parameterizations

The block behavior depends on the Valve parametrization parameter:

• `Cv flow coefficient` — The flow coefficient Cv determines the block parameterization. The flow coefficient measures the ease with which a gas flows when driven by a certain pressure differential.

• `Kv flow coefficient` — The flow coefficient Kv, where ${K}_{v}=0.865{C}_{v}$, determines the block parameterization. The flow coefficient measures the ease with which a gas flows when driven by a certain pressure differential.

• `Sonic conductance` — The sonic conductance of the resistive element at steady state determines the block parameterization. The sonic conductance measures the ease with which a gas flows when choked, which is a condition in which the flow velocity is at the local speed of sound. Choking occurs when the ratio between downstream and upstream pressures reaches a critical value known as the critical pressure ratio.

• `Orifice area` — The size of the flow restriction determines the block parametrization.

### Opening Area

The block calculates the ball valve opening during simulation from the input at port S. The opening area calculations depend on the Opening Characteristic parameter.

Area of Overlapping Circles

If you set Opening Characteristic to ```Area of overlapping circles```, the block calculates the opening area of the valve by assuming that the valve port and the ball bore are overlapping circles. The open area saturates when the input signal from port S goes outside the range of 0 rad to π/2 rad.

The block calculates the opening area as

`$\begin{array}{l}{A}_{open}=\mathrm{sin}\left(\phi \right){R}_{bore}^{2}\left[{\mathrm{cos}}^{-1}\left({\lambda }_{bore}\right)-{\lambda }_{bore}\sqrt{1-{\lambda }_{bore}}\right]+{R}_{port}^{2}\left[{\mathrm{cos}}^{-1}\left({\lambda }_{port}\right)-{\lambda }_{port}\sqrt{1-{\lambda }_{port}}\right]\\ {\lambda }_{bore}=\frac{{R}_{bore}^{2}-{R}_{port}^{2}+{l}^{2}}{2{R}_{bore}l}\\ {\lambda }_{port}=\frac{{R}_{port}^{2}-{R}_{bore}^{2}+{l}^{2}}{2{R}_{port}l}\end{array}$`

where:

• Rport and Rbore are the radii of the valve port and the ball bore, respectively.

• l is the displacement of the bore center from the valve port center.

• φ is the rotation of the ball valve given by the physical signal S. The valve is fully shut at 0 rad and fully open at π/2 rad.

Tabulated area

If you set Opening Characteristic to ```Tabulated data```, the block interpolates the valve opening from the Area vector, Cv flow coefficient vector, Kv flow coefficient vector, or Sonic conductance vector parameters. The elements in these vectors correspond one-to-one to the elements in the Ball rotation vector parameter. The block interpolates between the data points with linear interpolation and uses nearest extrapolation for points beyond the table boundaries.

### Momentum Balance

The block equations depend on the Valve parametrization parameter. When you set Valve parametrization to `Cv flow coefficient`, the mass flow rate, $\stackrel{˙}{m}$, is

`$\stackrel{˙}{m}={C}_{v}\frac{{S}_{open}}{{S}_{Max}}{N}_{6}Y\sqrt{\left({p}_{in}-{p}_{out}\right){\rho }_{in}},$`

where:

• Cv is the value of the Maximum Cv flow coefficient parameter.

• Sopen is the valve opening area.

• SMax is the maximum valve area when the valve is fully open.

• N6 is a constant equal to 27.3 for mass flow rate in kg/hr, pressure in bar, and density in kg/m3.

• Y is the expansion factor.

• pin is the inlet pressure.

• pout is the outlet pressure.

• ρin is the inlet density.

The expansion factor is

`$Y=1-\frac{{p}_{in}-{p}_{out}}{3{p}_{in}{F}_{\gamma }{x}_{T}},$`

where:

• Fγ is the ratio of the isentropic exponent to 1.4.

• xT is the value of the xT pressure differential ratio factor at choked flow parameter.

The block smoothly transitions to a linearized form of the equation when the pressure ratio, ${p}_{out}/{p}_{in}$, rises above the value of the Laminar flow pressure ratio parameter, Blam,

`$\stackrel{˙}{m}={C}_{v}\frac{{S}_{open}}{{S}_{Max}}{N}_{6}{Y}_{lam}\sqrt{\frac{{\rho }_{avg}}{{p}_{avg}\left(1-{B}_{lam}\right)}}\left({p}_{in}-{p}_{out}\right),$`

where:

`${Y}_{lam}=1-\frac{1-{B}_{lam}}{3{F}_{\gamma }{x}_{T}}.$`

When the pressure ratio, ${p}_{out}/{p}_{in}$, falls below $1-{F}_{\gamma }{x}_{T}$, the orifice becomes choked and the block switches to the equation

`$\stackrel{˙}{m}=\frac{2}{3}{C}_{v}\frac{{S}_{open}}{{S}_{Max}}{N}_{6}\sqrt{{F}_{\gamma }{x}_{T}{p}_{in}{\rho }_{in}}.$`

When you set Valve parametrization to ```Kv flow coefficient```, the block uses these same equations, but replaces Cv with Kv by using the relation ${K}_{v}=0.865{C}_{v}$. For more information on the mass flow equations when the Valve parametrization parameter is ```Kv flow coefficient``` or `Cv flow coefficient`, [2][3].

When you set Valve parametrization to ```Sonic conductance```, the mass flow rate, $\stackrel{˙}{m}$, is

`$\stackrel{˙}{m}=C\frac{{S}_{open}}{{S}_{Max}}{\rho }_{ref}{p}_{in}\sqrt{\frac{{T}_{ref}}{{T}_{in}}}{\left[1-{\left(\frac{\frac{{p}_{out}}{{p}_{in}}-{B}_{crit}}{1-{B}_{crit}}\right)}^{2}\right]}^{m},$`

where:

• C is the value of the Maximum sonic conductance parameter.

• Bcrit is the critical pressure ratio.

• m is the value of the Subsonic index parameter.

• Tref is the value of the ISO reference temperature parameter.

• ρref is the value of the ISO reference density parameter.

• Tin is the inlet temperature.

The block smoothly transitions to a linearized form of the equation when the pressure ratio, ${p}_{out}/{p}_{in}$, rises above the value of the Laminar flow pressure ratio parameter Blam,

`$\stackrel{˙}{m}=C\frac{{S}_{open}}{{S}_{Max}}{\rho }_{ref}\sqrt{\frac{{T}_{ref}}{{T}_{avg}}}{\left[1-{\left(\frac{{B}_{lam}-{B}_{crit}}{1-{B}_{crit}}\right)}^{2}\right]}^{m}\left(\frac{{p}_{in}-{p}_{out}}{1-{B}_{lam}}\right).$`

When the pressure ratio, ${p}_{out}/{p}_{in}$, falls below the critical pressure ratio, Bcrit, the orifice becomes choked and the block switches to the equation

`$\stackrel{˙}{m}=C\frac{{S}_{open}}{{S}_{Max}}{\rho }_{ref}{p}_{in}\sqrt{\frac{{T}_{ref}}{{T}_{in}}}.$`

For more information on the mass flow equations when the Valve parametrization parameter is ```Sonic conductance```, see [1].

When you set Valve parametrization to `Orifice area based on geometry`, the mass flow rate, $\stackrel{˙}{m}$, is

`$\stackrel{˙}{m}={C}_{d}{S}_{open}\sqrt{\frac{2\gamma }{\gamma -1}{p}_{in}{\rho }_{in}{\left(\frac{{p}_{out}}{{p}_{in}}\right)}^{\frac{2}{\gamma }}\left[\frac{1-{\left(\frac{{p}_{out}}{{p}_{in}}\right)}^{\frac{\gamma -1}{\gamma }}}{1-{\left(\frac{{S}_{open}}{S}\right)}^{2}{\left(\frac{{p}_{out}}{{p}_{in}}\right)}^{\frac{2}{\gamma }}}\right]},$`

where:

• Sopen is the valve opening area.

• S is the value of the Cross-sectional area at ports A and B parameter.

• Cd is the value of the Discharge coefficient parameter.

• γ is the isentropic exponent.

The block smoothly transitions to a linearized form of the equation when the pressure ratio, ${p}_{out}/{p}_{in}$, rises above the value of the Laminar flow pressure ratio parameter, Blam,

`$\stackrel{˙}{m}={C}_{d}{S}_{open}\sqrt{\frac{2\gamma }{\gamma -1}{p}_{avg}^{\frac{2-\gamma }{\gamma }}{\rho }_{avg}{B}_{lam}^{\frac{2}{\gamma }}\left[\frac{1-\text{\hspace{0.17em}}{B}_{lam}^{\frac{\gamma -1}{\gamma }}}{1-{\left(\frac{{S}_{open}}{S}\right)}^{2}{B}_{lam}^{\frac{2}{\gamma }}}\right]}\left(\frac{{p}_{in}^{\frac{\gamma -1}{\gamma }}-{p}_{out}^{\frac{\gamma -1}{\gamma }}}{1-{B}_{lam}^{\frac{\gamma -1}{\gamma }}}\right).$`

When the pressure ratio, ${p}_{out}/{p}_{in}$, falls below${\left(\frac{2}{\gamma +1}\right)}^{\frac{\gamma }{\gamma -1}}$ , the orifice becomes choked and the block switches to the equation

`$\stackrel{˙}{m}={C}_{d}{S}_{open}\sqrt{\frac{2\gamma }{\gamma +1}{p}_{in}{\rho }_{in}\frac{1}{{\left(\frac{\gamma +1}{2}\right)}^{\frac{2}{\gamma -1}}-{\left(\frac{{S}_{open}}{S}\right)}^{2}}}.$`

For more information on the mass flow equations when the Valve parametrization parameter is ```Orifice area based on geometry```, see [4].

### Mass Balance

The block assumes the volume and mass of fluid inside the valve is very small and ignores these values. As a result, no amount of fluid can accumulate in the valve. By the principle of conservation of mass, the mass flow rate into the valve through one port equals that out of the valve through the other port

`${\stackrel{˙}{m}}_{A}+{\stackrel{˙}{m}}_{B}=0,$`

where $\stackrel{˙}{m}$ is defined as the mass flow rate into the valve through the port indicated by the A or B subscript.

### Energy Balance

The resistive element of the block is an adiabatic component. No heat exchange can occur between the fluid and the wall that surrounds it. No work is done on or by the fluid as it traverses from inlet to outlet. Energy can flow only by advection, through ports A and B. By the principle of conservation of energy, the sum of the port energy flows is always equal to zero

`${\varphi }_{\text{A}}+{\varphi }_{\text{B}}=0,$`

where ϕ is the energy flow rate into the valve through ports A or B.

### Assumptions and Limitations

• The `Sonic conductance` setting of the Valve parameterization parameter is for pneumatic applications. If you use this setting for gases other than air, you may need to scale the sonic conductance by the square root of the specific gravity.

• The equation for the ```Orifice area based on geometry``` parameterization is less accurate for gases that are far from ideal.

• This block does not model supersonic flow.

## Ports

### Input

expand all

Physical signal port associated with the position of the valve, in rad. A value of 0 represents a fully shut valve and a value of π/2 represents a fully open valve.

### Conserving

expand all

Gas conserving port associated with the pump inlet.

Gas conserving port associated with the pump outlet.

## Parameters

expand all

Method to calculate the mass flow rate:

• `Cv flow coefficient` — The flow coefficient Cv determines the block parameterization.

• `Kv flow coefficient` — The flow coefficient Kv, where ${K}_{v}=0.865{C}_{v}$, determines the block parameterization.

• `Sonic conductance` — The sonic conductance of the resistive element at steady state determines the block parameterization.

• `Orifice area` — The size of the flow restriction determines the block parametrization.

Option to parameterize the block by using the method of area of overlapping circles or by using tabulated data.

Correction factor that accounts for discharge losses in theoretical flows.

#### Dependencies

To enable this parameter, set Valve parameterization to ```Orifice area based on geometry```.

Flow area for a given ball rotation. Each element corresponds one-to-one with the elements in the Ball rotation vector parameter. The first element corresponds to the valve leakage and must be nonzero.

#### Dependencies

To enable this parameter, set Valve parameterization to ```Orifice area based on geometry``` and Opening characteristic to ```Tabulated data```.

Value of the Cv flow coefficient when the restriction area available for flow is at a maximum. This parameter measures the ease with which the gas traverses the resistive element when driven by a pressure differential.

#### Dependencies

To enable this parameter, set Valve parameterization to ```Cv flow coefficient``` and Opening characteristic to ```Area of overlapping circles```.

Vector of Cv flow coefficients. Each coefficient corresponds to an element in the Ball rotation vector parameter. This parameter measures the ease with which the gas traverses the resistive element when driven by a pressure differential. The size of the vector must be the same as the Ball rotation vector parameter.

#### Dependencies

To enable this parameter, set Valve parameterization to ```Cv flow coefficient``` and Opening characteristic to ```Tabulated data```.

Ball rotation for a given flow coefficient or area. The elements in this vector must correspond one-to-one with the elements in either the Cv flow coefficient vector, Kv flow coefficient vector, Sonic conductance vector, or Area vector parameters. The elements in this vector must increase monotonically from left to right.

#### Dependencies

To enable this parameter, set Opening characteristic to ```Tabulated data```.

Value of the Kv flow coefficient when the restriction area available for the flow is at a maximum. This parameter measures the ease with which the gas traverses the resistive element when driven by a pressure differential.

#### Dependencies

To enable this parameter, set Valve parameterization to ```Kv flow coefficient``` and Opening characteristic to ```Area of overlapping circles```.

Vector of Kv flow coefficients. Each coefficient corresponds to an element in the Ball rotation vector parameter. This parameter measures the ease with which the gas traverses the resistive element when driven by a pressure differential. The size of the vector must be the same as the Ball rotation vector parameter.

#### Dependencies

To enable this parameter, set Valve parameterization to ```Kv flow coefficient``` and Opening characteristic to ```Tabulated data```.

Ratio between the inlet pressure, pin, and the outlet pressure, pout, defined as $\left({p}_{in}-{p}_{out}\right)/{p}_{in}$ where choking first occurs. If you do not have this value, look it up in table 2 in ISA-75.01.01 [3]. Otherwise, the default value of 0.7 is reasonable for many valves.

#### Dependencies

To enable this parameter, set Orifice parameterization to ```Cv flow coefficient``` or ```Kv flow coefficient```.

Value of the sonic conductance when the cross-sectional area available for flow is at a maximum.

#### Dependencies

To enable this parameter, set Orifice parameterization to ```Sonic conductance``` and Opening characteristic to ```Area of overlapping circles```.

Pressure ratio at which flow first begins to choke and the flow velocity reaches its maximum, given by the local speed of sound. The pressure ratio is the outlet pressure divided by inlet pressure.

#### Dependencies

To enable this parameter, set Orifice parameterization to `Sonic conductance` and Opening characteristic to ```Area of overlapping circles```.

Vector of sonic conductances inside the resistive element. Each conductance corresponds to an element in the Ball rotation vector parameter. The size of the vector must be the same as the Ball rotation vector parameter.

#### Dependencies

To enable this parameter, set Orifice parameterization to ```Sonic conductance``` and Opening characteristic to ```Tabulated data```.

Vector of critical pressure ratios at which the flow first chokes. Each critical pressure ratio corresponds to an element in the Ball rotation vector parameter. The critical pressure ratio is the fraction of downstream-to-upstream pressures at which the flow velocity reaches the local speed of sound. The size of the vector must be the same as the Ball rotation vector parameter.

#### Dependencies

To enable this parameter, set Orifice parameterization to ```Sonic conductance``` and Opening characteristic to ```Tabulated data```.

Empirical value used to calculate the mass flow rate in the subsonic flow regime.

#### Dependencies

To enable this parameter, set Orifice parameterization to ```Sonic conductance```.

Temperature at standard reference atmosphere, defined as 293.15 K in ISO 8778.

#### Dependencies

To enable this parameter, set Orifice parameterization to ```Sonic conductance```.

Density at standard reference atmosphere, defined as 1.185 kg/m3 in ISO 8778.

#### Dependencies

To enable this parameter, set Orifice parameterization to ```Sonic conductance```.

Cross-sectional area of the valve ports. The valve ports are the paths in the valve body where the flow meets the ball bore.

Cross-sectional area of the bore in the valve ball.

#### Dependencies

To enable this parameter, set Valve parameterization to ```Orifice area based on geometry``` and Opening characteristic to ```Area of overlapping circles```.

Ratio of the flow rate of the orifice when it is closed to when it is open.

#### Dependencies

To enable this parameter, set Valve parameterization to ```Orifice area based on geometry``` and Opening characteristic to ```Area of overlapping circles```.

Pressure ratio at which flow transitions between laminar and turbulent flow regimes. The pressure ratio is the outlet pressure divided by inlet pressure. Typical values range from `0.995` to `0.999`.

## References

[1] ISO 6358-3, "Pneumatic fluid power – Determination of flow-rate characteristics of components using compressible fluids – Part 3: Method for calculating steady-state flow rate characteristics of systems", 2014.

[2] IEC 60534-2-3, “Industrial-process control valves – Part 2-3: Flow capacity – Test procedures”, 2015.

[3] ANSI/ISA-75.01.01, “Industrial-Process Control Valves – Part 2-1: Flow capacity – Sizing equations for fluid flow underinstalled conditions”, 2012.

[4] P. Beater, Pneumatic Drives, Springer-Verlag Berlin Heidelberg, 2007.

## Version History

Introduced in R2023b

expand all