Skip to main content

Module fluids

Module fluids 

Source

Functions§

apparent_weight
Apparent weight in fluid: W_app = W - F_b = mg - ρ_fluid * V * g
archimedes_number
Archimedes number: Ar = g × d³ × ρf × (ρp - ρf) / μ²
bernoulli_pressure
Bernoulli’s equation: P1 + 0.5ρv1^2 + ρgh1 = P2 + 0.5ρv2^2 + ρgh2 Returns P2 given all other quantities.
bond_number
Bond number: Bo = Δρ × g × L² / σ (gravity vs surface tension)
buoyancy_velocity
Characteristic buoyancy velocity: v = √(gβΔTL)
buoyant_force
Buoyant force (Archimedes’ principle): F_b = ρ_fluid * V_displaced * g
capillary_rise
Capillary rise: h = 2 * γ * cos(θ) / (ρ * g * r)
circulation
Circulation (uniform vorticity): Γ = ω × A
continuity_velocity
Continuity equation: A1 * v1 = A2 * v2 → v2 = A1 * v1 / A2
darcy_friction_factor_laminar
Darcy friction factor for laminar pipe flow: f = 64/Re
darcy_weisbach_head_loss
Darcy-Weisbach head loss: h_L = f × (L/D) × v²/(2g)
drag_force
Drag force: F_d = 0.5 * C_d * ρ * A * v^2
dynamic_pressure
Dynamic pressure: q = ½ρv²
flow_rate
Volume flow rate: Q = A * v
fraction_submerged
Fraction of object submerged (floating): f = ρ_object / ρ_fluid
froude_number
Froude number: Fr = v / √(gL) (inertia vs gravity in free surface flow)
hydraulic_diameter
Hydraulic diameter: D_h = 4A/P
hydrostatic_pressure
Hydrostatic pressure: P = ρ * g * h
isentropic_pressure_ratio
Isentropic pressure ratio: P/P₀ = (1 + (γ-1)/2 × M²)^(-γ/(γ-1))
isentropic_temperature_ratio
Isentropic temperature ratio: T/T₀ = (1 + (γ-1)/2 × M²)^(-1)
kinematic_viscosity
Kinematic viscosity: ν = μ/ρ
kutta_joukowski_lift
Kutta-Joukowski lift per unit span: L = ρ × V × Γ
mach_number
Mach number: M = v / a
marangoni_number
Marangoni number: Ma = -(dσ/dT) × L × ΔT / (μ × α)
mass_flow_rate
Mass flow rate: ṁ = ρ * A * v
natural_convection_nu_horizontal_hot
Natural convection Nusselt number for hot horizontal plate facing up: Nu = 0.54 × Ra^(1/4), valid for 10⁴ ≤ Ra ≤ 10⁷
natural_convection_nu_vertical
Churchill-Chu correlation for natural convection on a vertical plate (air, Pr≈0.71): Nu = (0.825 + 0.387 × Ra^(1/6) / 1.1936)²
pascal_force
Pascal’s principle: F2 = F1 * (A2 / A1)
peclet_number
Peclet number: Pe = vL/α (advection vs diffusion)
poiseuille_flow_rate
Poiseuille’s law (volume flow rate through a pipe): Q = π * r^4 * ΔP / (8 * μ * L)
pressure
Pressure: P = F / A
pressure_gradient_pipe
Pressure gradient in a pipe (Poiseuille inverse): dP = 8μLQ/(πr⁴)
reynolds_number
Reynolds number: Re = ρ * v * L / μ
stagnation_pressure
Stagnation pressure: P₀ = P + q
stokes_drag
Stokes’ drag (low Reynolds number): F = 6π * μ * r * v
surface_tension_force
Surface tension force along a line: F = γ * L
terminal_velocity
Terminal velocity: v_t = sqrt(2 * m * g / (ρ * A * C_d))
thermal_conductivity_gas
Sutherland’s law for thermal conductivity (same form as viscosity)
thermal_expansion_coefficient_ideal_gas
Thermal expansion coefficient for ideal gas: β = 1/T
torricelli_velocity
Torricelli’s theorem: v = sqrt(2 * g * h)
total_pressure
Total pressure at depth: P = P_atm + ρ * g * h
venturi_velocity
Venturi effect velocity from pressure difference: v2 = sqrt(2 * (P1 - P2) / (ρ * (1 - (A2/A1)^2)))
viscosity_sutherland
Sutherland’s law for viscosity: μ = μ₀ × (T/T₀)^(3/2) × (T₀ + S)/(T + S)
vorticity_2d
Vorticity in 2D: ω = ∂v_y/∂x - ∂v_x/∂y
weber_number
Weber number: We = ρv²L / σ (inertia vs surface tension)