CAVITATION
Calculates the Cavitation number to measure how close a flowing liquid is to vapor-pressure-driven cavitation conditions.
Excel Usage
=CAVITATION(P, Psat, rho, V)
P(float, required): Internal pressure in Pascals (Pa)Psat(float, required): Vapor pressure in Pascals (Pa)rho(float, required): Fluid density in kilograms per cubic meter (kg/m³)V(float, required): Fluid velocity in meters per second (m/s)
Returns (float): Cavitation number (float), or error message string.
Example 1: Cavitation number at moderate liquid velocity
Inputs:
| P | Psat | rho | V |
|---|---|---|---|
| 200000 | 10000 | 1000 | 10 |
Excel formula:
=CAVITATION(200000, 10000, 1000, 10)
Expected output:
3.8
Example 2: Higher velocity with slightly lower density
Inputs:
| P | Psat | rho | V |
|---|---|---|---|
| 250000 | 15000 | 950 | 20 |
Excel formula:
=CAVITATION(250000, 15000, 950, 20)
Expected output:
1.23684
Example 3: Lower pressure difference with dense liquid
Inputs:
| P | Psat | rho | V |
|---|---|---|---|
| 120000 | 10000 | 998 | 8 |
Excel formula:
=CAVITATION(120000, 10000, 998, 8)
Expected output:
3.44439
Example 4: High-pressure dense liquid flow
Inputs:
| P | Psat | rho | V |
|---|---|---|---|
| 300000 | 50000 | 1020 | 15 |
Excel formula:
=CAVITATION(300000, 50000, 1020, 15)
Expected output:
2.17865
Python Code
Show Code
from fluids.core import Cavitation as fluids_cavitation
def cavitation(P, Psat, rho, V):
"""
Calculate the Cavitation number (Ca) for a flowing fluid.
See: https://fluids.readthedocs.io/fluids.core.html#fluids.core.Cavitation
This example function is provided as-is without any representation of accuracy.
Args:
P (float): Internal pressure in Pascals (Pa)
Psat (float): Vapor pressure in Pascals (Pa)
rho (float): Fluid density in kilograms per cubic meter (kg/m³)
V (float): Fluid velocity in meters per second (m/s)
Returns:
float: Cavitation number (float), or error message string.
"""
try:
P = float(P)
Psat = float(Psat)
rho = float(rho)
V = float(V)
except (ValueError, TypeError):
return "Error: All parameters must be numeric values."
if V == 0:
return "Error: velocity (V) must be nonzero."
if rho == 0:
return "Error: density (rho) must be nonzero."
try:
result = fluids_cavitation(P, Psat, rho, V)
except Exception as e:
return f"Error: {str(e)}"
return resultOnline Calculator
Internal pressure in Pascals (Pa)
Vapor pressure in Pascals (Pa)
Fluid density in kilograms per cubic meter (kg/m³)
Fluid velocity in meters per second (m/s)