⏳
Loading cheatsheet...
Fluid properties, hydrostatics, Bernoulli equation, pipe flow and dimensional analysis.
| Fluid | ρ (kg/m³) | μ (Pa·s) | ν (m²/s) | K (GPa) |
|---|---|---|---|---|
| Water | 998 | 1.002×10⁻³ | 1.004×10⁻⁶ | 2.15 |
| Air (1 atm) | 1.204 | 1.825×10⁻⁵ | 1.516×10⁻⁵ | — |
| Mercury | 13,546 | 1.526×10⁻³ | 1.127×10⁻⁷ | 25.0 |
| SAE 30 Oil | 891 | 0.29 | 3.25×10⁻⁴ | 1.5 |
| Glycerin | 1,261 | 1.412 | 1.12×10⁻³ | 4.35 |
| Seawater | 1,025 | 1.08×10⁻³ | 1.05×10⁻⁶ | 2.34 |
| Ethanol | 789 | 1.20×10⁻³ | 1.52×10⁻⁶ | 1.06 |
| Gasoline | 680 | 2.92×10⁻⁴ | 4.29×10⁻⁷ | 1.3 |
─── Newton's Law of Viscosity ───
τ = μ × (du/dy)
τ = Shear stress (Pa or N/m²)
μ = Dynamic viscosity (Pa·s)
du/dy = Velocity gradient (rate of shear deformation)
Newtonian fluids: μ = constant (independent of shear rate)
Examples: Water, air, oil, gasoline, mercury
Non-Newtonian fluids: μ varies with shear rate
• Shear-thinning (pseudoplastic): μ decreases with du/dy
Examples: Paint, blood, ketchup
• Shear-thickening (dilatant): μ increases with du/dy
Examples: Quick-sand, cornstarch suspension
• Bingham plastic: τ = τ_y + μ_p × (du/dy)
Examples: Toothpaste, mayonnaise, drilling mud
• Thixotropic: μ decreases with time under constant shear
• Rheopectic: μ increases with time under constant shear
No-slip condition: Fluid velocity = 0 at a solid boundary
(Valid for Newtonian fluids at macroscopic scale)─── Surface Tension Effects ───
Capillary rise (wetting liquid, θ < 90°):
h = 2σ cos θ / (ρ g r)
σ = surface tension (N/m)
θ = contact angle between liquid and tube wall
r = tube radius (m)
For water-glass: σ ≈ 0.073 N/m, θ ≈ 0°
Capillary rise: h = 2(0.073)/(998 × 9.81 × r)
For r = 1 mm: h ≈ 14.9 mm
Capillary depression (non-wetting, θ > 90°):
Mercury-glass: σ ≈ 0.48 N/m, θ ≈ 140°
h = 2(0.48)cos(140°)/(13546 × 9.81 × r) → negative (depression)
Pressure inside a droplet (excess pressure):
ΔP = 2σ / R (droplet/bubble in liquid)
ΔP = 4σ / R (soap bubble, two surfaces)─── Compressibility ───
Bulk modulus: K = −V (dP/dV) [Pa]
For liquids (approximately constant K):
ΔV/V = −ΔP/K
Water: K ≈ 2.15 GPa
Mercury: K ≈ 25 GPa
Oil: K ≈ 1.5 GPa
Speed of sound in a fluid:
c = √(K/ρ) [for liquids]
c = √(γRT) [ideal gas]
c = √(γP/ρ) [ideal gas]
Water: c ≈ 1480 m/s
Air at 20°C: c ≈ 343 m/s
Helium: c ≈ 1007 m/s
Liquids are generally treated as INCOMPRESSIBLE
(except in water hammer, hydraulic transients)
Gases are COMPRESSIBLE (especially at high Mach).─── Pressure at a Point in a Static Fluid ───
P = P₀ + ρgh
P₀ = Pressure at the free surface (usually P_atm)
ρ = Fluid density (kg/m³)
g = 9.81 m/s²
h = Depth below free surface (m)
Pascal's Law:
Pressure applied to a confined fluid is transmitted
equally and undiminished in ALL directions.
Hydraulic press (Pascal's law application):
F₁/A₁ = F₂/A₂ = P (same pressure)
F₂ = F₁ × (A₂/A₁)
Mechanical advantage = A₂/A₁
Gauge pressure: P_gauge = P − P_atm (can be negative)
Absolute pressure: P_abs = P_gauge + P_atm
Vacuum: P_gauge < 0 (absolute pressure below atmospheric)
Standard atmospheric pressure:
P_atm = 101.325 kPa = 1 atm = 760 mm Hg
= 10.33 m water = 1.01325 bar─── Simple Manometer ───
P_A = P_B + ρ_manometer × g × h
h = difference in manometer levels (m)
U-tube differential manometer:
P₁ − P₂ = g × h × (ρ_m − ρ_f)
ρ_m = manometer fluid density
ρ_f = flowing fluid density
h = manometer reading difference
Inverted U-tube:
P₁ − P₂ = g × h × (ρ_f − ρ_m)
Used when ρ_m < ρ_f (lighter manometer fluid)
Inclined manometer (improved sensitivity):
h_vertical = L × sin(θ)
Where L = reading along tube, θ = inclination angle
Sensitivity = 1/sin(θ) → greater for small angles─── Force on a Submerged Plane Surface ───
Total hydrostatic force:
F = ρg × h̄ × A = P̄ × A
h̄ = depth of centroid of area from free surface
A = area of the surface
Center of pressure (where resultant force acts):
h* = h̄ + I_G / (A × h̄)
I_G = Second moment of area about centroidal axis
(parallel to the surface)
h* is always BELOW h̄ (pressure increases with depth)
For vertical rectangular surface (b × D):
I_G = bD³/12
h̄ = D/2 (centroid at half depth)
Force on curved surface:
F_H = ρg × h̄ × A_v (horizontal component)
F_V = ρg × V_below (vertical component = weight of liquid above)
F = √(F_H² + F_V²)
tan(θ) = F_V / F_Himport math
# Hydrostatic force on a vertical rectangular gate
b = 2.0 # m (width)
D = 3.0 # m (depth of gate, water surface at top)
rho = 998 # kg/m³
g = 9.81 # m/s²
# Centroid depth
h_bar = D / 2 # 1.5 m
# Force
F = rho * g * h_bar * (b * D)
# F = 998 × 9.81 × 1.5 × 6 = 88,083 N = 88.08 kN
# Center of pressure
I_G = b * D**3 / 12 # 4.5 m⁴
h_star = h_bar + I_G / (b * D * h_bar)
# h* = 1.5 + 4.5 / (6 × 1.5) = 1.5 + 0.5 = 2.0 m
print(f"Force = {F/1e3:.2f} kN, CP depth = {h_star:.2f} m")─── Archimedes' Principle ───
Buoyant force = Weight of fluid displaced
F_B = ρ_fluid × g × V_displaced
Conditions for stability of floating bodies:
Metacentric height (GM):
GM = BM − BG = I/V_submerged − BG
BM = I / V_sub (distance from center of buoyancy
to metacenter)
I = Second moment of waterplane area
V_sub = Volume submerged
BG = Distance between center of gravity
and center of buoyancy
Stable: GM > 0 (M above G)
Neutral: GM = 0
Unstable: GM < 0 (M below G)
Metacentric height for common sections:
Rectangular: BM = b²/(12d) (b=width, d=draft)
Circular: BM = r²/(4d) (r=radius, d=draft)
Recommended: GM > 0.2 m for ships| Classification | Criteria | Types | Examples |
|---|---|---|---|
| By viscosity effect | Reynolds number | Viscous (real) / Inviscid (ideal) | Pipe flow (viscous) vs flow far from body (inviscid) |
| By compressibility | Mach number | Incompressible / Compressible | Water (incompressible) vs air at high speed |
| By time | Dependence on time | Steady / Unsteady | Constant pump (steady) vs surge (unsteady) |
| By space | Dependence on position | Uniform / Non-uniform | Constant pipe section (uniform) vs nozzle (non-uniform) |
| By rotationality | Vorticity ω | Irrotational (ω=0) / Rotational | Free vortex (irrotational), forced vortex (rotational) |
| By randomness | Orderly vs chaotic | Laminar / Turbulent | Re < 2300 (laminar), Re > 4000 (turbulent) |
─── Continuity Equation (Conservation of Mass) ───
General form (control volume):
∂ρ/∂t + ∇·(ρV) = 0
For incompressible, steady flow:
A₁V₁ = A₂V₂ = Q = constant
Q = Volume flow rate (m³/s)
A = Cross-sectional area (m²)
V = Average velocity (m/s)
Mass flow rate:
ṁ = ρ × A × V = ρ × Q [kg/s]
For compressible flow:
ρ₁A₁V₁ = ρ₂A₂V₂
Differential form (2D Cartesian):
∂u/∂x + ∂v/∂y = 0 (incompressible)
u = x-velocity component
v = y-velocity component─── Stream Function (ψ) ───
u = ∂ψ/∂y, v = −∂ψ/∂x
• ψ = constant along a streamline
• Difference between two streamlines = flow rate
• Automatically satisfies continuity for 2D
incompressible flow
• Exists for both rotational and irrotational flow
─── Velocity Potential (φ) ───
u = −∂φ/∂x, v = −∂φ/∂y
• φ = constant along equipotential lines
• Streamlines ⊥ equipotential lines
• Exists ONLY for irrotational flow
• Automatically satisfies irrotationality
Laplace equation: ∇²φ = 0 (irrotational + incompressible)
Cauchy-Riemann equations:
∂φ/∂x = ∂ψ/∂y and ∂φ/∂y = −∂ψ/∂ximport math
# Reynolds number
# Re = ρVD/μ = VD/ν
# Example: Water flow in pipe
V = 2.0 # m/s (velocity)
D = 0.05 # m (50 mm pipe)
rho = 998 # kg/m³ (water)
mu = 1.002e-3 # Pa·s (water at 20°C)
nu = mu / rho # kinematic viscosity
Re = rho * V * D / mu
# Re = 998 × 2.0 × 0.05 / 0.001002 = 99,600
if Re < 2300:
regime = "Laminar"
elif Re < 4000:
regime = "Transitional"
else:
regime = "Turbulent"
print(f"Re = {Re:.0f} → {regime}")
# Critical velocities
Re_crit = 2300
V_lam = Re_crit * nu / D # max laminar velocity
# V_lam = 2300 × 1.004e-6 / 0.05 = 0.0462 m/s| Flow Parameter | Laminar (Re < 2300) | Turbulent (Re > 4000) |
|---|---|---|
| Velocity profile | Parabolic (u = umax[1−(r/R)²]) | Flatter (logarithmic/power law) |
| u_avg / u_max | 0.5 | ≈ 0.8 (varies with Re) |
| Head loss | h_f ∝ V (linear) | h_f ∝ V^(1.75–2.0) |
| Mixing | Minimal cross-sectional mixing | Intense mixing |
| Entry length | L_e ≈ 0.05 × Re × D | L_e ≈ 4.4 × Re^(1/6) × D |
| Friction factor | f = 64/Re (exact) | f depends on Re and ε/D (Moody) |
─── Euler's Equation (along a streamline) ───
For inviscid, incompressible flow:
∂V/∂t + V(∂V/∂s) = −(1/ρ)(∂P/∂s) − g(∂z/∂s)
Along a streamline (s-direction):
dp/ρ + V·dV + g·dz = 0
Integrating (Euler → Bernoulli):
P/ρ + V²/2 + gz = constant
Or per unit weight (total head):
P/(ρg) + V²/(2g) + z = H = constant
P/(ρg) = Pressure head [m]
V²/(2g) = Velocity head [m]
z = Datum head / Potential head [m]─── Bernoulli's Equation ───
For steady, incompressible, inviscid flow along a streamline:
P₁/ρg + V₁²/(2g) + z₁ = P₂/ρg + V₂²/(2g) + z₂
OR (pressure form):
P₁ + ½ρV₁² + ρgz₁ = P₂ + ½ρV₂² + ρgz₂
Assumptions:
1. Steady flow
2. Incompressible fluid
3. Inviscid (frictionless)
4. Flow along a streamline
5. No energy addition/removal (no pump/turbine between points)
With pump/turbine:
P₁/ρg + V₁²/2g + z₁ + h_pump = P₂/ρg + V₂²/2g + z₂ + h_turbine + h_loss
h_pump = head added by pump [m]
h_turbine = head extracted by turbine [m]
h_loss = head lost to friction [m]─── Venturimeter (Flow rate measurement) ───
Q_theoretical = (A₁A₂/√(A₁²−A₂²)) × √(2gh)
where h = (P₁−P₂)/(ρg) = manometer reading
Q_actual = C_d × Q_theoretical
C_d = coefficient of discharge ≈ 0.95–0.99
─── Orifice Meter ───
Q = C_d × A₀ × √(2ΔP/ρ)
C_d ≈ 0.60–0.65 (orifice plate)
A₀ = area of orifice opening
─── Pitot Tube (velocity measurement) ───
V = √(2(P_stagnation − P_static)/ρ) = √(2gh)
Measures velocity at a point.
Stagnation point: V = 0, P = P + ½ρV²import math
# Venturimeter: water flows through a pipe
D1 = 0.10 # m (pipe diameter)
D2 = 0.06 # m (throat diameter)
h = 0.15 # m (manometer reading, water)
Cd = 0.98 # discharge coefficient
rho = 998 # kg/m³
g = 9.81
# Areas
A1 = math.pi * D1**2 / 4 # 0.00785 m²
A2 = math.pi * D2**2 / 4 # 0.00283 m²
# Theoretical flow rate
Q_th = (A1 * A2 / math.sqrt(A1**2 - A2**2)) * math.sqrt(2*g*h)
# Q_th = 0.00785×0.00283/√(6.16e-5 − 8.0e-6) × √(2.943)
# = 2.21e-5 / 0.00732 × 1.7155 = 5.186 L/s
# Actual flow rate
Q_act = Cd * Q_th
V1 = Q_act / A1
print(f"Q = {Q_act*1e3:.3f} L/s")
print(f"V_pipe = {V1:.2f} m/s")
print(f"V_throat = {Q_act/A2:.2f} m/s") h_L to the downstream side: P₁/ρg + V₁²/2g + z₁ = P₂/ρg + V₂²/2g + z₂ + h_L. For minor losses: h_L = K × V²/2g where K is the loss coefficient (elbow, valve, etc.).─── Darcy-Weisbach Equation ───
h_f = f × (L/D) × (V²/2g)
h_f = Head loss due to friction [m]
f = Darcy friction factor (dimensionless)
L = Pipe length [m]
D = Pipe diameter [m]
V = Average flow velocity [m/s]
g = 9.81 m/s²
Power lost to friction:
P_loss = ρ × g × Q × h_f [Watts]
= ρ × g × A × V × f × (L/D) × V²/2g
= f × ρ × A × V³ × L / (2D)─── Laminar Flow (Re < 2300) ───
f = 64 / Re (exact, no roughness dependence)
─── Turbulent Flow (Re > 4000) ───
Colebrook-White equation (implicit):
1/√f = −2 log₁₀[(ε/D)/3.7 + 2.51/(Re√f)]
ε = pipe roughness (m)
ε/D = relative roughness
Moody approximation (explicit, Haaland):
1/√f ≈ −1.8 log₁₀[(ε/D/3.7)¹·¹¹ + 6.9/Re]
Fully rough zone (very high Re):
1/√f = −2 log₁₀[(ε/D)/3.7]
(f depends only on relative roughness)
Common roughness values (ε):
┌─────────────────────┬──────────┐
│ Pipe material │ ε (mm) │
├─────────────────────┼──────────┤
│ Drawn copper/brass │ 0.0015 │
│ PVC, Plastic │ 0.0015 │
│ Commercial steel │ 0.045 │
│ Galvanized iron │ 0.15 │
│ Cast iron │ 0.26 │
│ Riveted steel │ 0.9–9.0 │
│ Concrete │ 0.3–3.0 │
└─────────────────────┴──────────┘| Fitting / Loss | K (loss coefficient) | Formula |
|---|---|---|
| Sudden enlargement | K = (1−A₁/A₂)² | h_L = K × V₁²/2g |
| Sudden contraction | K ≈ 0.5(1−A₂/A₁) | h_L = K × V₂²/2g |
| Gradual expansion (diffuser) | K = 0.2–0.8 | Depends on angle (best < 8°) |
| 90° elbow (standard) | K ≈ 0.9 | h_L = K × V²/2g |
| 45° elbow | K ≈ 0.4 | h_L = K × V²/2g |
| Globe valve (fully open) | K ≈ 10 | High loss, flow control |
| Gate valve (fully open) | K ≈ 0.2 | Low loss |
| Swing check valve | K ≈ 2.5 | One-way flow |
| Tee (branch flow) | K ≈ 1.8 | h_L = K × V_branch²/2g |
| Pipe entrance (sharp) | K ≈ 0.5 | h_L = K × V²/2g |
| Pipe exit | K ≈ 1.0 | All KE lost |
import math
# Pipe flow problem — total head loss
L = 100 # m (pipe length)
D = 0.05 # m (50 mm diameter)
Q = 5e-3 # m³/s (5 L/s)
rho = 998
g = 9.81
eps = 0.045e-3 # m (commercial steel)
A = math.pi * D**2 / 4
V = Q / A # 2.546 m/s
Re = rho * V * D / 1.002e-3 # Re ≈ 127,000
# Turbulent: use Haaland equation for initial f estimate
eps_D = eps / D
f_est = 1 / (-1.8 * math.log10((eps_D/3.7)**1.11 + 6.9/Re))**2
# f ≈ 0.0217
# Major loss (Darcy-Weisbach)
h_major = f_est * (L/D) * V**2 / (2*g)
# Minor losses: 2 elbows (K=0.9 each) + 1 gate valve (K=0.2)
K_total = 2*0.9 + 0.2 + 0.5 + 1.0 # elbows + gate + entrance + exit
h_minor = K_total * V**2 / (2*g)
h_total = h_major + h_minor
P_loss = rho * g * Q * h_total
print(f"Re = {Re:.0f}, f = {f_est:.4f}")
print(f"h_major = {h_major:.2f} m, h_minor = {h_minor:.2f} m")
print(f"h_total = {h_total:.2f} m")
print(f"Power loss = {P_loss:.1f} W")| Turbine | Type | Head Range | Flow | Specific Speed (Ns) | Application |
|---|---|---|---|---|---|
| Pelton | Impulse | H > 300 m (high head) | Low Q | 10–70 | Mountain hydropower |
| Francis | Reaction | H = 30–300 m (medium) | Medium Q | 60–300 | Most common, dams |
| Kaplan | Reaction (axial) | H < 30 m (low head) | High Q | 300–1000 | Run-of-river, tidal |
| Propeller | Reaction (axial) | H < 30 m | High Q | 300–1000 | Fixed blades (lower efficiency) |
| Bulb turbine | Reaction | H < 10 m | Very high Q | — | Low-head river/tidal |
─── Pelton Wheel (Impulse Turbine) ───
Jet velocity: V₁ = C_v × √(2gH)
C_v = velocity coefficient ≈ 0.98
Bucket velocity (optimum): u = V₁/2 = √(gH)/2
Velocity at bucket outlet: V₂ = V₁ − u
(water leaves bucket with reversed relative velocity)
Power: P = ρ × Q × (V₁ − u) × u × (1 + k cos β)
k = friction factor for bucket ≈ 0.85–0.95
β = bucket angle at outlet (typically 165°–170°)
Maximum efficiency occurs at: u/V₁ = 0.5 (or cos(α/2))
η_max ≈ (1 + k cos β)/2 × C_v²
For β = 165°, k = 0.9: η_max ≈ 0.967 × C_v² ≈ 93%
Specific speed: Ns = N√P / H^(5/4)
For Pelton: Ns = 10–70 (typically designed with Ns < 30)
Number of jets: n = D/(2.5 × d) + 1
D = runner pitch diameter, d = jet diameter─── Francis Turbine (Reaction Turbine) ───
Euler turbine equation:
P = ρ × Q × (u₁V_w1 − u₂V_w2)
u₁, u₂ = tangential velocity at inlet/outlet
V_w1, V_w2 = whirl component of velocity
For Francis turbine:
V_w2 = 0 (designed for zero whirl at exit)
→ P = ρQ × u₁V_w1
Degree of reaction: R = (P_static_change) / P_total
Francis: R ≈ 0.5–0.8 (significant pressure drop through runner)
Flow: Radial inward, exits axially
Guide vanes (wicket gates): Control flow & angle
Efficiency: η_max ≈ 90–95%
Hydraulic η ≈ 93%
Mechanical η ≈ 98%
Overall η = η_h × η_m × η_v
Draft tube: Converts KE to pressure energy
Recovered head = V₂²/(2g) × (1 − (A₂/A₁)²)─── Kaplan Turbine (Axial Flow Reaction) ───
• Adjustable runner blades (pitch control)
• Adjustable guide vanes
• Axial flow — water flows parallel to shaft
• High specific speed: Ns = 300–1000
• Best for low head, high flow
• Efficiency: 88–93%
─── Cavitation ───
Cavitation occurs when local pressure drops below
vapor pressure → bubbles form → collapse violently.
Thoma's cavitation parameter:
σ = (P_atm − P_v − H_s) / H
P_v = vapor pressure at water temperature
H_s = suction head (positive if below tailwater)
H = net head on turbine
Critical sigma (σ_c): Minimum sigma to avoid cavitation
From model tests or empirical charts.
To prevent cavitation: σ > σ_c
→ H_s < (P_atm − P_v)/ρg − σ_c × H
OR set runner deeper below tailwater.
Effects of cavitation:
• Pitting and erosion of blades
• Vibration and noise
• Loss of efficiency
• eventual failureimport math
# Francis turbine: calculate power and specific speed
H = 150 # m (net head)
Q = 10 # m³/s (flow rate)
N = 600 # RPM
rho = 998 # kg/m³
g = 9.81
eta = 0.92 # overall efficiency
# Power output
P = rho * g * Q * H * eta / 1e6 # MW
# P = 998 × 9.81 × 10 × 150 × 0.92 / 1e6 = 13.53 MW
# Specific speed (metric: P in kW)
P_kW = P * 1000
Ns = N * math.sqrt(P_kW) / H**(5/4)
# Ns = 600 × √13530 / 150^1.25
# = 600 × 116.3 / 498.7 = 139.8
print(f"Power = {P:.2f} MW")
print(f"Specific speed Ns = {Ns:.1f}")
# Ns = 139.8 → Francis turbine (in range 60-300) ✓| Pump Type | Mechanism | Head Range | Flow | Application |
|---|---|---|---|---|
| Centrifugal | Rotating impeller throws fluid outward by centrifugal force | Low–Medium | High | Water supply, HVAC, irrigation |
| Reciprocating | Piston/cylinder displaces fluid | Very High | Low | High-pressure cleaning, oil drilling |
| Gear pump | Meshing gears trap and move fluid | Medium | Low–Medium | Hydraulics, lubrication, fuel |
| Vane pump | Sliding vanes in eccentric rotor | Medium | Medium | Hydraulics, fuel, vacuum |
| Axial flow | Propeller pushes fluid along axis | Very Low | Very High | Drainage, flood control |
| Submersible | Sealed motor + pump, submerged | Medium | Medium–High | Deep wells, sewage |
| Jet pump | Venturi creates suction + ejects | Low–Medium | Low–Medium | Shallow wells, domestic water |
─── Centrifugal Pump Characteristics ───
Manometric (pump) head:
H_m = (P₂−P₁)/(ρg) + (V₂²−V₁²)/(2g) + (z₂−z₁)
Theoretical head (Euler):
H_th = u₂V_w2/g (for zero inlet whirl: V_w1 = 0)
u₂ = πD₂N/60 (tip speed)
V_w2 = whirl component at impeller exit
Affinity Laws (speed change, N₁ → N₂):
Q₂/Q₁ = N₂/N₁
H₂/H₁ = (N₂/N₁)²
P₂/P₁ = (N₂/N₁)³
System curve:
H_system = H_static + K × Q²
H_static = elevation + pressure difference
Operating point: Where pump curve intersects system curve
NPSH (Net Positive Suction Head):
NPSH_available = P_atm/(ρg) − P_v/(ρg) − h_s − h_f_suction
To avoid cavitation: NPSH_available > NPSH_requiredimport math
# Centrifugal pump calculation
Q = 0.05 # m³/s (50 L/s)
H = 30 # m (head)
rho = 998 # kg/m³
g = 9.81
eta = 0.75 # pump efficiency (75%)
# Hydraulic power (fluid power)
P_hydraulic = rho * g * Q * H # Watts
# P_h = 998 × 9.81 × 0.05 × 30 = 14,688 W = 14.69 kW
# Shaft power (motor power needed)
P_shaft = P_hydraulic / eta
# P_shaft = 14688 / 0.75 = 19,584 W = 19.58 kW
# Motor selection (add 15-20% safety factor)
P_motor = P_shaft * 1.20
# P_motor = 23.5 kW → use 22 kW or 30 kW motor
# Specific speed of pump
N = 1450 # RPM
Ns = N * math.sqrt(Q) / H**(3/4)
# Ns = 1450 × √0.05 / 30^0.75
print(f"P_hydraulic = {P_hydraulic/1e3:.2f} kW")
print(f"P_shaft = {P_shaft/1e3:.2f} kW")
print(f"P_motor = {P_motor/1e3:.1f} kW")
print(f"Ns = {Ns:.1f}")─── Pumps in Series ───
Same flow Q, heads add up.
H_total = H₁ + H₂
Q = Q₁ = Q₂
Use when: High head needed, moderate flow.
The system curve is steep (high resistance).
─── Pumps in Parallel ───
Same head H, flows add up.
Q_total = Q₁ + Q₂
H = H₁ = H₂
Use when: Large flow needed, moderate head.
The system curve is flat (low resistance).
Note: Pumps must have similar characteristics
for effective series/parallel operation.─── Speed of Sound ───
c = √(γRT) = √(γP/ρ)
c_air at 20°C = √(1.4 × 287 × 293) = 343.2 m/s
c_air at 0°C = √(1.4 × 287 × 273) = 331.3 m/s
c_helium = √(1.66 × 2077 × 293) = 1007 m/s
─── Mach Number ───
Ma = V/c
Ma < 0.3 → Incompressible (ρ ≈ constant)
0.3 < Ma < 0.8 → Subsonic (compressible effects begin)
0.8 < Ma < 1.2 → Transonic (mixed sub/supersonic regions)
1.0 < Ma < 5 → Supersonic
Ma > 5 → Hypersonic
Stagnation properties (isentropic flow):
T₀ = T + V²/(2cp) = T(1 + (γ−1)/2 × Ma²)
P₀ = P(1 + (γ−1)/2 × Ma²)^(γ/(γ−1))
ρ₀ = ρ(1 + (γ−1)/2 × Ma²)^(1/(γ−1))─── Isentropic Flow Through Nozzles ───
Critical (throat) conditions at Ma = 1:
T* = T₀ × 2/(γ+1) = T₀ × 0.833 (air)
P* = P₀ × (2/(γ+1))^(γ/(γ−1)) = P₀ × 0.528 (air)
ρ* = ρ₀ × (2/(γ+1))^(1/(γ−1)) = ρ₀ × 0.634 (air)
Area-Mach relation:
A/A* = (1/Ma)[(2/(γ+1))(1 + (γ−1)/2 × Ma²)]
^((γ+1)/(2(γ−1)))
Converging nozzle:
• P_back > P*: Subsonic throughout (no choking)
• P_back = P*: Choked flow (Ma=1 at exit)
• P_back < P*: Choked; expansion waves outside nozzle
Converging-DIVERGING (C-D) nozzle (de Laval):
• P_exit > P*: Subsonic throughout
• P_exit = P*: Choked at throat, subsonic in diverging
• P_exit < P*: Isentropic supersonic in diverging section
(shock-free, design condition)─── Normal Shock Relations (air, γ=1.4) ───
Upstream (1) → Shock → Downstream (2)
Mach number:
Ma₂² = (1 + (γ−1)/2 × Ma₁²) / (γ×Ma₁² − (γ−1)/2)
Pressure ratio:
P₂/P₁ = 1 + 2γ/(γ+1) × (Ma₁² − 1)
Temperature ratio:
T₂/T₁ = [1 + 2γ/(γ+1)(Ma₁²−1)] × [2+(γ−1)Ma₁²] / [(γ+1)Ma₁²]
Density ratio:
ρ₂/ρ₁ = V₁/V₂ = (γ+1)Ma₁² / [2+(γ−1)Ma₁²]
Stagnation pressure ratio (entropy increase):
P₀₂/P₀₁ = [(γ+1)Ma₁²/(2+(γ−1)Ma₁²)]^(γ/(γ−1))
× [(2γMa₁²−(γ−1))/(γ+1)]^(-1/(γ−1))
Key: Normal shock is IRREVERSIBLE (entropy increases).
Ma₁ > 1, Ma₂ < 1 always.
Stagnation temperature T₀ is constant across shock.import math
# Isentropic flow — converging-diverging nozzle
T0 = 500 # K (stagnation temperature)
P0 = 500 # kPa (stagnation pressure)
gamma = 1.4
R = 287 # J/(kg·K)
# Critical conditions (Ma=1 at throat)
T_star = T0 * 2 / (gamma + 1)
P_star = P0 * (2/(gamma+1))**(gamma/(gamma-1))
rho_star_ratio = (2/(gamma+1))**(1/(gamma-1))
# Sound speed at throat
c_star = math.sqrt(gamma * R * T_star)
# c* = √(1.4 × 287 × 416.7) = 409.3 m/s
# If fully expanded to Ma = 2.0 in diverging section
Ma = 2.0
T_exit = T0 / (1 + (gamma-1)/2 * Ma**2)
P_exit = P0 * (1 + (gamma-1)/2 * Ma**2)**(-gamma/(gamma-1))
V_exit = Ma * math.sqrt(gamma * R * T_exit)
print(f"Throat: T* = {T_star:.1f} K, P* = {P_star:.1f} kPa")
print(f"Exit (Ma=2): T = {T_exit:.1f} K, P = {P_exit:.1f} kPa")
print(f"Exit velocity = {V_exit:.1f} m/s")
# Normal shock at Ma=2.0
Ma2_sq = (1 + (gamma-1)/2 * Ma**2) / (gamma * Ma**2 - (gamma-1)/2)
Ma2 = math.sqrt(Ma2_sq) # Ma2 = 0.577
P2_P1 = 1 + 2*gamma/(gamma+1) * (Ma**2 - 1) # = 4.5
print(f"After shock: Ma = {Ma2:.3f}, P₂/P₁ = {P2_P1:.2f}")| Regime | Mach Number | Flow Behavior | Key Equations |
|---|---|---|---|
| Incompressible | Ma < 0.3 | Constant density, Bernoulli applies | P + ½ρV² = const |
| Subsonic | 0.3 < Ma < 1 | Disturbances propagate in all directions | Isentropic relations, A/V variation |
| Sonic (choking) | Ma = 1 | Flow velocity = sound speed at throat | A = A* (minimum area), mass flow limit |
| Supersonic | Ma > 1 | Disturbances confined within Mach cone | Mach angle: μ = arcsin(1/Ma) |
| Hypersonic | Ma > 5 | Extreme heating, real gas effects, dissociation | Modified relations needed |
ṁ_max = A* × P₀ × √(γ/(RT₀)) × (2/(γ+1))^((γ+1)/(2(γ−1))). This is critical for safety valves, rocket nozzles, and jet engines.