IS_CHOKED_GAS
Evaluates whether a gas valve operating point is choked (critical) using IEC 60534 inequalities.
Choking is detected when either condition is met, depending on provided factor:
x \ge F_\gamma x_T
x \ge F_\gamma x_{TP}
The function returns True for choked flow and False otherwise.
Excel Usage
=IS_CHOKED_GAS(x, Fgamma, xT, xTP)
x(float, required): Differential pressure ratio (dP/P1) [-]Fgamma(float, required): Specific heat ratio factor [-]xT(float, optional, default: null): Pressure difference ratio factor of a valve without fittings [-]xTP(float, optional, default: null): Pressure difference ratio factor of a valve with fittings [-]
Returns (bool): True if flow is choked (critical), False otherwise.
Example 1: Non-choked flow example
Inputs:
| x | Fgamma | xT |
|---|---|---|
| 0.544 | 0.929 | 0.6 |
Excel formula:
=IS_CHOKED_GAS(0.544, 0.929, 0.6)
Expected output:
false
Example 2: Choked flow example
Inputs:
| x | Fgamma | xT |
|---|---|---|
| 0.6 | 0.929 | 0.6 |
Excel formula:
=IS_CHOKED_GAS(0.6, 0.929, 0.6)
Expected output:
true
Example 3: Non-choked with fittings
Inputs:
| x | Fgamma | xTP |
|---|---|---|
| 0.544 | 0.929 | 0.625 |
Excel formula:
=IS_CHOKED_GAS(0.544, 0.929, 0.625)
Expected output:
false
Example 4: Choked with fittings
Inputs:
| x | Fgamma | xTP |
|---|---|---|
| 0.8 | 0.929 | 0.625 |
Excel formula:
=IS_CHOKED_GAS(0.8, 0.929, 0.625)
Expected output:
true
Python Code
Show Code
from fluids.control_valve import is_choked_turbulent_g as fluids_is_choked
def is_choked_gas(x, Fgamma, xT=None, xTP=None):
"""
Determines if a gas flow in a control valve is choked (critical) or not according to IEC 60534.
See: https://fluids.readthedocs.io/fluids.control_valve.html#fluids.control_valve.is_choked_turbulent_g
This example function is provided as-is without any representation of accuracy.
Args:
x (float): Differential pressure ratio (dP/P1) [-]
Fgamma (float): Specific heat ratio factor [-]
xT (float, optional): Pressure difference ratio factor of a valve without fittings [-] Default is None.
xTP (float, optional): Pressure difference ratio factor of a valve with fittings [-] Default is None.
Returns:
bool: True if flow is choked (critical), False otherwise.
"""
try:
x = float(x)
Fgamma = float(Fgamma)
if xT is not None:
xT = float(xT)
if xTP is not None:
xTP = float(xTP)
if x < 0:
return "Error: Differential pressure ratio must be non-negative."
if Fgamma <= 0:
return "Error: Fgamma must be positive."
if xT is None and xTP is None:
return "Error: Either xT or xTP must be provided."
return fluids_is_choked(x=x, Fgamma=Fgamma, xT=xT, xTP=xTP)
except Exception as e:
return f"Error: {str(e)}"Online Calculator
Differential pressure ratio (dP/P1) [-]
Specific heat ratio factor [-]
Pressure difference ratio factor of a valve without fittings [-]
Pressure difference ratio factor of a valve with fittings [-]