# Ball Valve (TL)

Flow control valve actuated by longitudinal motion of ball element

• Library:
• Simscape / Fluids / Thermal Liquid / Valves & Orifices / Flow Control Valves

• ## Description

The Ball Valve (TL) block models the flow control with a ball valve in a thermal liquid network. You can specify the seat geometry as either sharp-edged or conical. The ball displacement is set by a physical signal at port S.

Ball Valve Seat Types ### Opening Area With a Sharp-Edged Seat

When is set to `Sharp-edged`, the valve opening area is based on the geometrical expression:

`$A=\pi {r}_{o}\left(1-{\left(\frac{{r}_{b}}{{d}_{OB}}\right)}^{2}\right){d}_{OB}\left(h\right),$`

where:

• ro is the valve orifice radius.

• rb is the valve ball radius.

• dOB(h) is the distance between the center of the ball and the edge of the orifice. This distance is a function of the valve lift (h).

The maximum displacement, hmax, is:

`${h}_{\mathrm{max}}=\sqrt{\frac{2{r}_{b}^{2}-{r}_{o}^{2}+{r}_{o}\sqrt{{r}_{o}^{2}+4{r}_{b}^{2}}}{2}}-\sqrt{{r}_{b}^{2}-{r}_{o}^{2}}.$`

Seat Schematic ### Opening Area With a Sharp-Edged Seat

When is set to `Conical`, the valve opening area is based on the geometrical expression:

`$A=\pi {r}_{b}\mathrm{sin}\left(\theta \right)h+\frac{\pi }{2}\mathrm{sin}\left(\frac{\theta }{2}\right)\mathrm{sin}\left(\theta \right){h}^{2},$`

The maximum displacement, hmax, is:

`${h}_{\mathrm{max}}=\frac{\sqrt{{r}_{b}^{2}+\frac{{r}_{o}^{2}}{\mathrm{cos}\left(\frac{\theta }{2}\right)}}-{r}_{b}}{\mathrm{sin}\left(\frac{\theta }{2}\right)},$`

where θ is the Cone angle.

Seat Schematic ### Ball Position Smoothing

A smoothing function allows the valve opening area to change smoothly between the fully closed and fully open positions. The smoothing function does this by removing the curve discontinuities at the zero and maximum ball positions.

Opening-Area Curve Smoothing The valve smoothing function is:

`$\lambda =3{\overline{h}}_{}^{2}-2{\overline{h}}_{}^{3}$`

When the valve is nearly closed, $\overline{h}$ is:

`${\overline{h}}_{C}=\frac{h}{\Delta {h}_{smooth}}.$`

When the valve is nearly open, $\overline{h}$ is:

`${\overline{h}}_{O}=\frac{h-\left({h}_{max}-\Delta {h}_{smooth}\right)}{{h}_{max}-\left({h}_{max}-\Delta {h}_{smooth}\right)}.$`

Δhsmooth is the valve lift smoothing region:

`$\Delta {h}_{smooth}={f}_{smooth}\frac{{h}_{Max}}{2}$`

where fsmooth is the Smoothing factor, which can vary from 0 to 1.

The smoothed valve opening area is given by the piecewise conditional expression:

`${S}_{R}=\left\{\begin{array}{ll}{S}_{Leak},\hfill & h\le 0\hfill \\ {S}_{Leak}\left(1-{\lambda }_{L}\right)+\left(A+{S}_{Leak}\right){\lambda }_{L},\hfill & h<\Delta {h}_{smooth}\hfill \\ A+{S}_{Leak},\hfill & h\le {h}_{Max}-\Delta {h}_{smooth}\hfill \\ \left(A+{S}_{Leak}\right)\left(1-{\lambda }_{R}\right)+\left({S}_{Leak}+{S}_{Max}\right){\lambda }_{R},\hfill & h<{h}_{Max}\hfill \\ {S}_{Leak}+{S}_{Max},\hfill & h\ge {h}_{Max}\hfill \end{array},\text{\hspace{0.17em}}$`

where:

• SR is the smoothed valve opening area.

• SLeak is the valve Leakage area.

• SMax is the maximum valve opening area:

`${S}_{Max}=\pi {r}_{o}^{2}$`

### Momentum Balance

The pressure differential over the valve is:

`${p}_{A}-{p}_{B}=\frac{\stackrel{˙}{m}\sqrt{{\stackrel{˙}{m}}^{2}+{\stackrel{˙}{m}}_{cr}^{2}}}{2{\rho }_{Avg}{C}_{d}^{2}{S}^{2}}\left[1-{\left(\frac{{S}_{R}}{S}\right)}^{2}\right]P{R}_{Loss},$`

where:

• pA is the pressure at port A.

• pB is the pressure at port B.

• $\stackrel{˙}{m}$ is the mass flow rate.

• ρAvg is the average liquid density.

• Cd is the Discharge coefficient.

• ${\stackrel{˙}{m}}_{cr}$ is the critical mass flow rate:

`${\stackrel{˙}{m}}_{cr}={\mathrm{Re}}_{cr}{\mu }_{Avg}\sqrt{\frac{\pi }{4}{S}_{R}}.$`

where:

• Recr is the Critical Reynolds number.

• μAvg is the average fluid dynamic viscosity.

• S is the Cross-sectional area at port A and B.

• PRLoss is the pressure ratio:

`$P{R}_{Loss}=\frac{\sqrt{1-{\left({S}_{R}/S\right)}^{2}\left(1-{C}_{d}^{2}\right)}-{C}_{d}\left({S}_{R}/S\right)}{\sqrt{1-{\left({S}_{R}/S\right)}^{2}\left(1-{C}_{d}^{2}\right)}+{C}_{d}\left({S}_{R}/S\right)}.$`

### Mass Balance

The mass conservation equation in the valve is

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

where:

• ${\stackrel{˙}{m}}_{A}$ is the mass flow rate into the valve through port A.

• ${\stackrel{˙}{m}}_{B}$ is the mass flow rate into the valve through port B.

### Energy Balance

The energy conservation equation in the valve is

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

where:

• ϕA is the energy flow rate into the valve through port A.

• ϕB is the energy flow rate into the valve through port B.

## Ports

• A — Thermal liquid conserving port representing valve inlet A

• B — Thermal liquid conserving port representing valve inlet B

• S — Physical signal input port for the control member displacement

## Parameters

### Parameters Tab

Valve seat specification

Choice of valve seat geometry. Options include `Sharp-edged` and `Conical`. The default setting is `Sharp-edged`.

Cone angle

Angle formed by the sides of the conical seat. This parameter is active only when the Valve seat specification parameter is active. The default value is `120` deg.

Ball diameter

Diameter of the spherical control member. The default value is `0.01` m.

Orifice diameter

Diameter of the valve opening. The default value is `7e-3` m.

Ball displacement offset

Control member offset from the zero position. The control member displacement is the sum of the input signal S and the displacement offset specified. The default value is `0` m.

Leakage area

Area through which fluid can flow in the fully closed valve position. This area accounts for leakage between the valve inlets. The default value is `1e-12` m^2.

Smoothing factor

Portion of the opening-area curve to smooth expressed as a fraction. Smoothing eliminates discontinuities at the minimum and maximum flow valve positions. The smoothing factor must be between `0` and `1`. Enter a value of `0` for zero smoothing. Enter a value of `1` for full-curve smoothing. The default value is `0.01`.

Cross-sectional area at ports A and B

Area normal to the direction of flow at the valve inlets. This area is assumed the same for all the inlets. The default value is `0.01` m^2.

Characteristic longitudinal length

Distance traversed by the fluid between the valve inlets. The default value is `0.1` m^2.

Discharge coefficient

Ratio of the actual mass flow rate through the valve to its ideal, or theoretical, value. The discharge coefficient accounts for the effects of valve geometry. The value must be between `0` and `1`.

Critical Reynolds number

Reynolds number at which flow transitions between laminar and turbulent regimes. Flow is laminar below this number and turbulent above it. The default value is `12`.

### Variables Tab

Mass flow rate into port A

Mass flow rate into the component through port A at the start of simulation. The default value is ```1 kg/s```.

## Extended Capabilities

### C/C++ Code GenerationGenerate C and C++ code using Simulink® Coder™. 