function calculateValveFlow() {
var cvInput = document.getElementById('flow_cv');
var p1Input = document.getElementById('pressure_inlet');
var p2Input = document.getElementById('pressure_outlet');
var sgInput = document.getElementById('specific_gravity');
var resultDiv = document.getElementById('calc-result');
var errorDiv = document.getElementById('calc-error');
// Reset display
resultDiv.style.display = 'none';
errorDiv.style.display = 'none';
errorDiv.innerHTML = ";
// Get values
var cv = parseFloat(cvInput.value);
var p1 = parseFloat(p1Input.value);
var p2 = parseFloat(p2Input.value);
var sg = parseFloat(sgInput.value);
// Validation
if (isNaN(cv) || isNaN(p1) || isNaN(p2) || isNaN(sg)) {
errorDiv.innerHTML = "Please enter valid numeric values for all fields.";
errorDiv.style.display = 'block';
return;
}
if (cv < 0) {
errorDiv.innerHTML = "Cv value cannot be negative.";
errorDiv.style.display = 'block';
return;
}
if (sg = p1) {
errorDiv.innerHTML = "Outlet pressure cannot be greater than or equal to Inlet pressure for flow calculation.";
errorDiv.style.display = 'block';
return;
}
// Calculation: Q = Cv * sqrt( (P1 – P2) / SG )
var deltaP = p1 – p2;
var flowRate = cv * Math.sqrt(deltaP / sg);
// Display Results
document.getElementById('res-dp').innerHTML = deltaP.toFixed(2) + " PSI";
document.getElementById('res-sg').innerHTML = sg.toFixed(2);
document.getElementById('res-flow').innerHTML = flowRate.toFixed(2) + " GPM";
resultDiv.style.display = 'block';
}
Understanding Valve Flow Rate and Cv
Accurately calculating the flow rate through a valve is essential for process engineering, plumbing system design, and fluid dynamics. This calculator uses the standard flow equation for non-compressible liquids to determine the volumetric flow rate in Gallons Per Minute (GPM) based on the valve's characteristics and system pressures.
The Flow Coefficient (Cv)
The most critical factor in this calculation is the Valve Flow Coefficient, denoted as Cv. This is an imperial unit defined as the number of gallons of water per minute (GPM) that will flow through a valve with a pressure drop of 1 PSI at 60°F.
A higher Cv indicates a valve with a larger capacity, while a lower Cv suggests a more restrictive valve. Manufacturers provide Cv values for their valves at various open percentages (e.g., 100% open, 50% open).
The Calculation Formula
For liquids like water, the relationship between flow rate, pressure drop, and specific gravity is expressed by the following equation:
Q = Cv × √(ΔP / SG)
Where:
Q = Flow Rate in Gallons Per Minute (GPM)
Cv = Valve Flow Coefficient
ΔP = Pressure Drop across the valve (Inlet Pressure – Outlet Pressure) in PSI
SG = Specific Gravity of the fluid (Water = 1.0)
How to Use This Calculator
Enter the Cv: Find this value in the valve manufacturer's datasheet.
Enter Pressures: Input the upstream (Inlet) and downstream (Outlet) pressures in PSI. The calculator will automatically determine the pressure drop (ΔP). Note that flow only occurs if the inlet pressure is higher than the outlet pressure.
Specific Gravity: If you are pumping water, leave this at 1.0. For other fluids, enter the correct SG (e.g., Gasoline is approx 0.74, Brine is approx 1.2).
Factors Influencing Valve Flow
Several variables can impact the actual flow rate in a real-world scenario. While the Cv formula is accurate for general sizing, engineers must also consider:
Viscosity: The standard Cv formula assumes a fluid viscosity similar to water. Highly viscous fluids (like heavy oil or honey) require viscosity correction factors.
Choked Flow: If the pressure drop is extremely high, the liquid may vaporize (cavitation) or flash, limiting the maximum flow rate regardless of further pressure drops.
Piping Geometry: Reducers or expanders attached immediately to the valve can alter the effective flow coefficient.
Why is Valve Sizing Important?
Undersizing a valve (choosing a Cv that is too low) causes excessive pressure drop, forcing pumps to work harder and wasting energy. It can also lead to cavitation, which damages valve trim.
Oversizing a valve (choosing a Cv that is too high) creates poor control. The valve may need to operate very close to the closed position to control flow, leading to "hunting" (instability) and premature wear on the valve seat.