function calculateCvRate() {
// Retrieve values from inputs
var flowRate = document.getElementById('flow_rate').value;
var sg = document.getElementById('specific_gravity').value;
var p1 = document.getElementById('inlet_pressure').value;
var p2 = document.getElementById('outlet_pressure').value;
var errorDiv = document.getElementById('cv_error_msg');
var resultDiv = document.getElementById('cv_result_container');
var cvDisplay = document.getElementById('cv_final_val');
var dropDisplay = document.getElementById('pressure_drop_val');
// Reset display
errorDiv.style.display = 'none';
resultDiv.style.display = 'none';
errorDiv.innerHTML = ";
// Parsing numbers
var Q = parseFloat(flowRate);
var G = parseFloat(sg);
var press1 = parseFloat(p1);
var press2 = parseFloat(p2);
// Validation Logic
if (isNaN(Q) || isNaN(G) || isNaN(press1) || isNaN(press2)) {
errorDiv.innerHTML = "Please enter valid numeric values for all fields.";
errorDiv.style.display = 'block';
return;
}
if (Q <= 0) {
errorDiv.innerHTML = "Flow Rate must be greater than zero.";
errorDiv.style.display = 'block';
return;
}
if (G <= 0) {
errorDiv.innerHTML = "Specific Gravity must be greater than zero.";
errorDiv.style.display = 'block';
return;
}
if (press1 <= press2) {
errorDiv.innerHTML = "Inlet Pressure (P1) must be greater than Outlet Pressure (P2) to generate flow.";
errorDiv.style.display = 'block';
return;
}
// Physics Calculation: Cv = Q * sqrt(SG / dP)
// dP = P1 – P2
var dP = press1 – press2;
var rootTerm = Math.sqrt(G / dP);
var cvValue = Q * rootTerm;
// Display logic
cvDisplay.innerHTML = cvValue.toFixed(2);
dropDisplay.innerHTML = dP.toFixed(2) + " PSI";
resultDiv.style.display = 'block';
}
Understanding the Cv Rate (Flow Coefficient)
The Cv Rate, commonly known simply as the valve flow coefficient ($C_v$), is a critical engineering metric used to size valves appropriately for a specific fluid system. It represents the flow capacity of a valve.
Technically defined, a $C_v$ of 1 is the ability of a valve to pass 1 US gallon of water per minute (GPM) at a temperature of 60°F with a pressure drop of 1 PSI across the valve. The higher the Cv value, the more fluid the valve can pass with a given pressure drop.
The Cv Calculation Formula
For non-compressible fluids (liquids) like water, the formula used by this calculator is:
Cv = Q × √(SG / ΔP)
Where:
Q = Flow Rate in Gallons Per Minute (GPM).
SG = Specific Gravity of the fluid (Water = 1.0).
ΔP = Pressure Drop across the valve in PSI ($P_{inlet} – P_{outlet}$).
Why is Calculating Cv Important?
Proper valve sizing is essential for process efficiency and safety. If a valve is selected with a Cv that is too small, it will restrict flow, causing a high pressure drop (choked flow) and potentially causing the pump to work too hard. Conversely, a valve with a Cv that is too large (oversized) will result in poor control precision, as small movements in the valve stem will cause large changes in flow rate.
Common Specific Gravity (SG) Values
Specific Gravity is the ratio of the density of a substance to the density of a reference substance (usually water). Use these values in the calculator if you are not pumping pure water:
Fluid
Approximate Specific Gravity
Water (60°F)
1.00
Gasoline
0.70 – 0.75
Diesel Fuel
0.82 – 0.95
Hydraulic Oil
0.80 – 0.90
Seawater
1.025
How to Use This Calculator
Enter Flow Rate: Input the volume of liquid you need to move per minute (GPM).
Enter Specific Gravity: If using water, leave as 1.0. For oils or fuels, adjust accordingly.
Enter Pressures: Input the pressure before the valve (Inlet) and the desired pressure after the valve (Outlet). The calculator determines the differential pressure automatically.
Calculate: Click the button to see the required flow coefficient. You can then look up this value in valve manufacturer catalogs to select the correct hardware.