Fluids
Overview
Fluid mechanics is the branch of physics and engineering concerned with the behavior of fluids (liquids and gases) at rest and in motion. It provides the theoretical foundation for understanding and predicting fluid flow, pressure distribution, drag forces, and heat transfer in countless engineering applications—from pipelines and HVAC systems to aircraft design and chemical processing.
At its core, fluid mechanics combines conservation principles (mass, momentum, and energy) with empirical correlations to solve practical problems. These problems span multiple scales: from predicting atmospheric density at 80 km altitude, to sizing industrial control valves, to calculating pressure drop in miles of natural gas pipeline.
Atmospheric modeling tools implement the US Standard Atmosphere 1976 and the NRLMSISE-00 model to compute temperature, pressure, and density as functions of altitude. These are essential for aerospace applications, satellite drag calculations, and meteorological studies.
Compressible flow calculations handle gas flows where density changes significantly, using equations derived from thermodynamics and the ideal gas law. The tools include isentropic relations, stagnation properties, critical flow conditions, and empirical pipeline formulas (Panhandle A/B, Weymouth, Fritzsche) widely used in the natural gas industry for long-distance transmission.
Control valve sizing and analysis follows the IEC 60534 international standard for liquid and gas service. The tools compute flow coefficients (Cv, Kv, Av), predict choked flow conditions, evaluate cavitation risk, and estimate valve noise levels—critical for safe and efficient process control in chemical plants and refineries.
Dimensionless numbers characterize fluid behavior and enable scaling between different systems. Key numbers include Reynolds (inertial vs. viscous forces), Froude (inertial vs. gravitational forces), Bond (gravitational vs. surface tension forces), and many others used in heat transfer, two-phase flow, and boundary layer analysis.
Drag analysis provides correlations for the drag coefficient of spheres across the full Reynolds number range, from Stokes flow (Re < 1) to the drag crisis regime (Re > 10⁵). Multiple empirical correlations (Morrison, Clift, Haider-Levenspiel, etc.) offer varying accuracy and complexity for settling calculations, particle tracking, and multiphase flow modeling.
Pipe friction and fittings implement the Darcy-Weisbach equation and the Colebrook equation (solved exactly or via fast approximations) to calculate pressure drop in pipes. Additional tools compute loss coefficients (K-factors) for bends, expansions, contractions, valves, and other fittings based on industry-standard correlations from Crane TP-410 and other references.
All implementations leverage the fluids library, a comprehensive open-source Python package developed by Caleb Bell that provides validated, unit-tested functions for fluid mechanics calculations. The library wraps algorithms from authoritative sources including ASHRAE handbooks, ISO standards, and peer-reviewed literature.