Please enter valid positive numbers for flow rate and diameter.
Wall Shear Rate (γ̇):0 s⁻¹
Fluid Velocity (v):0 m/s
Pipe Cross-Section Area:0 m²
*Calculation assumes laminar flow of a Newtonian fluid in a circular pipe (γ̇ = 8v/D).
function calculateShearRate() {
// Get input values
var flowRateInput = document.getElementById('flowRate').value;
var flowUnit = document.getElementById('flowUnit').value;
var diameterInput = document.getElementById('pipeDiameter').value;
var diameterUnit = document.getElementById('diameterUnit').value;
var errorMsg = document.getElementById('errorMsg');
var resultsDiv = document.getElementById('results');
// Validation
if (flowRateInput === "" || diameterInput === "" || isNaN(flowRateInput) || isNaN(diameterInput)) {
errorMsg.style.display = 'block';
resultsDiv.style.display = 'none';
return;
}
var Q = parseFloat(flowRateInput);
var D = parseFloat(diameterInput);
if (Q <= 0 || D <= 0) {
errorMsg.innerText = "Values must be greater than zero.";
errorMsg.style.display = 'block';
resultsDiv.style.display = 'none';
return;
}
errorMsg.style.display = 'none';
// 1. Convert Diameter to meters (SI Unit)
var diameterMeters = 0;
if (diameterUnit === 'mm') {
diameterMeters = D / 1000;
} else if (diameterUnit === 'inch') {
diameterMeters = D * 0.0254;
} else {
diameterMeters = D; // already meters
}
// 2. Convert Flow Rate to m³/s (SI Unit)
var flowM3s = 0;
if (flowUnit === 'm3h') {
flowM3s = Q / 3600;
} else if (flowUnit === 'lmin') {
flowM3s = Q / 60000; // 1 L = 0.001 m3, / 60 sec
} else if (flowUnit === 'gpm') {
flowM3s = Q * 0.0000630901964; // 1 US GPM = 6.309e-5 m3/s
} else {
flowM3s = Q;
}
// 3. Calculate Area (A = pi * r^2 = pi * (d/2)^2)
var radius = diameterMeters / 2;
var area = Math.PI * Math.pow(radius, 2);
// 4. Calculate Velocity (v = Q / A)
var velocity = flowM3s / area;
// 5. Calculate Wall Shear Rate (Newtonian Laminar: 8v/D)
// Formula: Shear Rate = 8 * velocity / diameter
// Alternatively using Flow Rate directly: 32 * Q / (pi * D^3)
var shearRate = (8 * velocity) / diameterMeters;
// 6. Display Results
document.getElementById('shearRateResult').innerText = shearRate.toFixed(2) + " s⁻¹";
document.getElementById('velocityResult').innerText = velocity.toFixed(3) + " m/s";
// Format area for readability (scientific notation if very small)
var areaDisplay = area < 0.0001 ? area.toExponential(4) : area.toFixed(6);
document.getElementById('areaResult').innerText = areaDisplay + " m²";
resultsDiv.style.display = 'block';
}
What is Shear Rate in a Pipe?
Shear rate is a critical parameter in fluid dynamics that describes the gradient of velocity in a flowing fluid. In the context of pipe flow, it represents how fast the fluid layers are moving relative to each other as you move from the pipe wall toward the center.
For engineers and scientists, calculating the shear rate is essential for understanding fluid behavior, particularly when dealing with non-Newtonian fluids (where viscosity changes with shear rate), designing piping systems to prevent degradation of shear-sensitive materials, or ensuring proper mixing.
The Shear Rate Formula
For a Newtonian fluid undergoing laminar flow in a circular pipe, the wall shear rate ($\dot{\gamma}$) is calculated using the following relationships:
Based on Velocity:
$$ \dot{\gamma} = \frac{8v}{D} $$
Based on Volumetric Flow Rate:
$$ \dot{\gamma} = \frac{32Q}{\pi D^3} $$
1. Viscosity Measurement:
For non-Newtonian fluids (like polymers, blood, or ketchup), viscosity is not constant; it depends on the shear rate. To determine the apparent viscosity of a fluid in a specific process, you must first know the shear rate that the fluid will experience in the pipe.
2. Material Degradation:
Certain fluids contain delicate structures (e.g., long-chain polymers or biological cells). If the shear rate is too high, it can physically break these structures, degrading the product.
3. Pipe Scouring and Erosion:
Higher shear rates at the wall imply higher shear stress. This can be beneficial for cleaning (scouring) the pipe walls but can also lead to erosion-corrosion issues in metal pipes if the shear stress exceeds the material's limits.
Flow Regimes: Laminar vs. Turbulent
The calculator above utilizes the formula for laminar flow (typically Reynolds number < 2300). In laminar flow, the velocity profile is parabolic.
In turbulent flow (Reynolds number > 4000), the velocity profile becomes flatter, and the shear rate at the wall is significantly higher than what the laminar formula ($8v/D$) predicts. For turbulent flow, the shear rate calculation requires knowledge of the friction factor and fluid density, making it more complex.