CONTROL_VALVE_NOISE_G_2011
Overview
The CONTROL_VALVE_NOISE_G_2011 function calculates the sound made by a gas flowing through a control valve according to the standard IEC 60534-8-3 (2011). This standard provides a method for predicting aerodynamic noise generated by compressible flow through control valves, which is critical for industrial applications where noise levels need to be controlled for environmental and worker safety reasons.
The function models noise generation using key parameters including mass flow rate, upstream and downstream pressures, gas properties, and valve characteristics. The resulting A-weighted sound pressure level represents the noise at a reference distance of 1 meter from the valve.
This method is based on the IEC 60534-8-3 standard which defines the following fundamental relationship for gas noise prediction:
Where is the A-weighted sound pressure level at 1 meter from the valve, is the volumetric flow rate, is the upstream pressure, and various other factors account for valve characteristics, piping geometry, and gas properties.
fluids.control_valve.control_valve_noise_g_2011 Documentation
The Excel wrapper function simplifies the interface while maintaining access to the most commonly used parameters from the underlying method. It includes comprehensive input validation and error handling to ensure reliable operation within Excel.
This example function is provided as-is without any representation of accuracy.
Usage
In Excel, use the function as: =CONTROL_VALVE_NOISE_G_2011(m, p_in, p_out, t_in, rho, gamma, mw, kv, d, di, t_pipe, fd, fl, [flp], [fp], [rho_pipe], [c_pipe], [p_air], [rho_air], [c_air], [an], [stp], [t_out], [beta])
m(float, required): Mass flow rate of gas through the control valve [kg/s]p_in(float, required): Inlet pressure of the gas before valves and reducers [Pa]p_out(float, required): Outlet pressure of the gas after valves and reducers [Pa]t_in(float, required): Inlet gas temperature [K]rho(float, required): Density of the gas at the inlet [kg/m³]gamma(float, required): Specific heat capacity ratio [-]mw(float, required): Molecular weight of the gas [g/mol]kv(float, required): Metric Kv valve flow coefficient [m³/hr]d(float, required): Diameter of the valve [m]di(float, required): Internal diameter of the pipe before and after the valve [m]t_pipe(float, required): Wall thickness of the pipe after the valve [m]fd(float, required): Valve style modifier [-]fl(float, required): Liquid pressure recovery factor [-]flp(float, optional): Liquid pressure recovery factor with piping geometry factor [-]; default: Nonefp(float, optional): Piping geometry factor [-]; default: Nonerho_pipe(float, optional): Density of the pipe wall material [kg/m³]; default: 7800.0c_pipe(float, optional): Speed of sound in the pipe wall material [m/s]; default: 5000.0p_air(float, optional): Standard atmospheric pressure [Pa]; default: 101325.0rho_air(float, optional): Density of air at standard conditions [kg/m³]; default: 1.2c_air(float, optional): Speed of sound in air [m/s]; default: 343.0an(float, optional): Constant for gas noise calculation; default: -3.8stp(float, optional): Strouhal number for gas noise calculation; default: 0.2t_out(float, optional): Outlet gas temperature [K]; default: Nonebeta(float, optional): Correction factor for gas properties; default: 0.93
The function returns a float representing the A-weighted sound pressure level at 1 meter from the valve in decibels (dB). If invalid inputs are provided, the function returns an error message as a string.
Examples
Example 1: Basic gas valve noise calculation
| m | p_in | p_out | t_in | rho | gamma | mw | kv | d | di | t_pipe | fd | fl | flp | fp |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2.22 | 1E6 | 720000 | 450 | 5.3 | 1.22 | 19.8 | 77.85 | 0.1 | 0.2031 | 0.008 | 0.296 | 0.792 | 0.792 | 0.98 |
Result: 91.700
Example 2: Lower pressure drop
| m | p_in | p_out | t_in | rho | gamma | mw | kv | d | di | t_pipe | fd | fl |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1.5 | 800000 | 700000 | 300 | 3.0 | 1.3 | 20.0 | 50.0 | 0.08 | 0.15 | 0.006 | 0.3 | 0.8 |
Result: 80.100
Example 3: Higher flow, higher pressure
| m | p_in | p_out | t_in | rho | gamma | mw | kv | d | di | t_pipe | fd | fl | flp | fp |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 3.0 | 1200000 | 600000 | 500 | 6.0 | 1.25 | 18.0 | 100.0 | 0.12 | 0.25 | 0.01 | 0.25 | 0.75 | 0.8 | 0.95 |
Result: 99.200
Example 4: Low flow, low pressure
| m | p_in | p_out | t_in | rho | gamma | mw | kv | d | di | t_pipe | fd | fl |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0.5 | 500000 | 400000 | 293 | 1.2 | 1.4 | 28.96 | 20.0 | 0.05 | 0.1 | 0.004 | 0.4 | 0.85 |
Result: 73.500
Python Code
from typing import Optional, Union
import math
from fluids.control_valve import control_valve_noise_g_2011 as fluids_control_valve_noise_g_2011
def control_valve_noise_g_2011(
m: float, p_in: float, p_out: float, t_in: float, rho: float, gamma: float,
mw: float, kv: float, d: float, di: float, t_pipe: float, fd: float,
fl: float, flp: Optional[float] = None, fp: Optional[float] = None,
rho_pipe: float = 7800.0, c_pipe: float = 5000.0, p_air: float = 101325.0,
rho_air: float = 1.2, c_air: float = 343.0, an: float = -3.8,
stp: float = 0.2, t_out: Optional[float] = None, beta: float = 0.93
) -> Union[float, str]:
"""
Calculates the sound made by a gas flowing through a control valve according to the standard IEC 60534-8-3 (2011) using fluids.control_valve.control_valve_noise_g_2011. See https://fluids.readthedocs.io/fluids.control_valve.html#fluids.control_valve.control_valve_noise_g_2011 for details.
Args:
m: Mass flow rate of gas through the control valve [kg/s]
p_in: Inlet pressure of the gas before valves and reducers [Pa]
p_out: Outlet pressure of the gas after valves and reducers [Pa]
t_in: Inlet gas temperature [K]
rho: Density of the gas at the inlet [kg/m^3]
gamma: Specific heat capacity ratio [-]
mw: Molecular weight of the gas [g/mol]
kv: Metric Kv valve flow coefficient [m^3/hr]
d: Diameter of the valve [m]
di: Internal diameter of the pipe before and after the valve [m]
t_pipe: Wall thickness of the pipe after the valve [m]
fd: Valve style modifier [-]
fl: Liquid pressure recovery factor [-]
flp: Liquid pressure recovery factor with piping geometry factor [-] (optional)
fp: Piping geometry factor [-] (optional)
rho_pipe: Density of the pipe wall material [kg/m^3] (default: 7800.0)
c_pipe: Speed of sound in the pipe wall material [m/s] (default: 5000.0)
p_air: Standard atmospheric pressure [Pa] (default: 101325.0)
rho_air: Density of air at standard conditions [kg/m^3] (default: 1.2)
c_air: Speed of sound in air [m/s] (default: 343.0)
an: Constant for gas noise calculation (default: -3.8)
stp: Strouhal number for gas noise calculation (default: 0.2)
t_out: Outlet gas temperature [K] (optional, default: None)
beta: Correction factor for gas properties (default: 0.93)
Returns:
float: LpAe1m - A-weighted sound pressure level [dB], or an error message (str) if input is invalid.
This example function is provided as-is without any representation of accuracy.
"""
def _error(message: str) -> str:
return message
# Validate required inputs
required_params = [m, p_in, p_out, t_in, rho, gamma, mw, kv, d, di, t_pipe, fd, fl]
if not all(isinstance(x, (int, float)) for x in required_params):
return _error("Invalid input: All required parameters must be numeric.")
if any(not math.isfinite(x) for x in required_params):
return _error("Invalid input: All required parameters must be finite numbers.")
if m < 0:
return _error("Invalid input: Mass flow rate (m) must be non-negative.")
if p_in <= 0 or p_out <= 0:
return _error("Invalid input: Pressures must be positive.")
if t_in <= 0:
return _error("Invalid input: Inlet temperature (t_in) must be positive.")
if rho <= 0:
return _error("Invalid input: Gas density (rho) must be positive.")
if gamma <= 0:
return _error("Invalid input: Specific heat capacity ratio (gamma) must be positive.")
if mw <= 0:
return _error("Invalid input: Molecular weight (mw) must be positive.")
if kv <= 0:
return _error("Invalid input: Valve flow coefficient (kv) must be positive.")
if d <= 0:
return _error("Invalid input: Valve diameter (d) must be positive.")
if di <= 0:
return _error("Invalid input: Pipe internal diameter (di) must be positive.")
if t_pipe <= 0:
return _error("Invalid input: Pipe wall thickness (t_pipe) must be positive.")
if fd <= 0:
return _error("Invalid input: Valve style modifier (fd) must be positive.")
if fl <= 0:
return _error("Invalid input: Liquid pressure recovery factor (fl) must be positive.")
# Validate optional numeric inputs
other_numeric_params = [rho_pipe, c_pipe, p_air, rho_air, c_air, an, stp, beta]
if not all(isinstance(x, (int, float)) for x in other_numeric_params):
return _error("Invalid input: All numeric parameters must be numeric.")
if any(not math.isfinite(x) for x in other_numeric_params):
return _error("Invalid input: All numeric parameters must be finite numbers.")
if rho_pipe <= 0 or c_pipe <= 0 or p_air <= 0 or rho_air <= 0 or c_air <= 0:
return _error("Invalid input: Material property values must be positive.")
if t_out is not None and (not isinstance(t_out, (int, float)) or t_out <= 0 or not math.isfinite(t_out)):
return _error("Invalid input: Outlet temperature (t_out) must be a positive finite number if provided.")
try:
# Prepare the function call with all parameters
kwargs = {
'm': m, 'P1': p_in, 'P2': p_out, 'T1': t_in, 'rho': rho, 'gamma': gamma, 'MW': mw,
'Kv': kv, 'd': d, 'Di': di, 't_pipe': t_pipe, 'Fd': fd, 'FL': fl,
'rho_pipe': rho_pipe, 'c_pipe': c_pipe, 'P_air': p_air,
'rho_air': rho_air, 'c_air': c_air, 'An': an, 'Stp': stp, 'beta': beta
}
# Add optional parameters if they are provided
if flp is not None:
kwargs['FLP'] = flp
if fp is not None:
kwargs['FP'] = fp
if t_out is not None:
kwargs['T2'] = t_out
result = fluids_control_valve_noise_g_2011(**kwargs)
if not math.isfinite(result):
return _error("Invalid result: Function returned non-finite value.")
return result
except Exception as e:
return _error(f"Error calling control_valve_noise_g_2011: {str(e)}")