Computational Fluid Dynamics: Simulating Flow with Numerical Methods
The Governing Equations
All of CFD rests on the Navier-Stokes equations, a set of partial differential equations that express conservation of mass, momentum, and energy for a fluid. The continuity equation ensures that mass is neither created nor destroyed. The momentum equations (one for each spatial direction) balance the forces on a fluid element: pressure gradients, viscous stresses, gravity, and any external forces. The energy equation tracks the total energy of the fluid, including kinetic energy, internal energy, and the work done by pressure and viscous forces.
For incompressible flows (liquids and low-speed gas flows), the equations simplify because density is constant. The continuity equation becomes a divergence-free condition on the velocity field, and the momentum equations decouple from the energy equation. Compressible flows (high-speed aerodynamics, combustion, shock waves) require the full set of equations with density as an additional unknown.
Despite their compact mathematical form, the Navier-Stokes equations are extraordinarily difficult to solve. Their nonlinearity (velocity appears in the convective terms multiplied by itself) creates the rich and chaotic behavior that characterizes turbulent flows. Whether smooth solutions always exist for the three-dimensional Navier-Stokes equations is one of the seven Millennium Prize Problems in mathematics, carrying a million-dollar reward.
Discretization Methods for CFD
The finite volume method (FVM) is the most widely used discretization approach in CFD. It divides the computational domain into control volumes (cells) and enforces conservation laws within each cell. The integral form of the conservation equations is applied to each cell, ensuring that fluxes entering a cell through one face leave through another. This property guarantees that mass, momentum, and energy are conserved exactly at the discrete level, even on coarse meshes. OpenFOAM, ANSYS Fluent, and most production CFD codes use the finite volume method.
The finite difference method approximates derivatives directly on structured grids. It is simpler to implement than the finite volume method but is limited to regular grid geometries. Finite differences are used in many research codes for direct numerical simulation and large eddy simulation on simple geometries like channels, pipes, and periodic boxes.
The finite element method is less common in CFD than in structural mechanics but is used for flows in complex geometries, particularly when coupled with structural deformation (fluid-structure interaction). Stabilized finite element formulations like the streamline-upwind Petrov-Galerkin (SUPG) method are needed because the standard Galerkin method produces spurious oscillations for convection-dominated flows.
Spectral methods achieve very high accuracy for flows on simple geometries with smooth solutions. Pseudospectral methods using Fourier or Chebyshev bases are the gold standard for direct numerical simulation of turbulence in academic research, where their exponential convergence rate provides unmatched accuracy for a given number of degrees of freedom.
Turbulence Modeling
Turbulence is the single greatest challenge in CFD. Turbulent flows contain eddies spanning a wide range of sizes, from the largest structures comparable to the flow domain down to the smallest dissipative scales determined by the fluid viscosity. The ratio between these scales grows as the Reynolds number to the three-fourths power. For a commercial aircraft, this ratio is about a million, meaning that a direct simulation resolving all scales would require a grid with approximately 10 to the 18th points, far beyond current computing capacity.
Direct numerical simulation (DNS) resolves all scales of turbulence without modeling. It is the most accurate approach but is limited to moderate Reynolds numbers and simple geometries. DNS serves as a reference for validating turbulence models and for fundamental research into turbulence physics. As of 2026, the largest DNS computations have reached Reynolds numbers approaching those of some engineering flows, but routine engineering DNS remains decades away.
Reynolds-averaged Navier-Stokes (RANS) models solve equations for the time-averaged flow and model the effect of turbulent fluctuations using turbulence models. The k-epsilon model, the k-omega SST model, and the Spalart-Allmaras model are the most common. RANS is computationally cheap and is the standard approach for most industrial CFD, but its accuracy depends heavily on how well the chosen turbulence model represents the physics of the specific flow being simulated.
Large eddy simulation (LES) resolves the large, energy-containing turbulent eddies and models only the smallest scales. This approach captures much of the turbulence physics that RANS models miss, particularly in flows with separation, unsteadiness, and complex geometry. LES requires finer grids than RANS but much coarser grids than DNS. It is increasingly used for engineering applications as computing power grows, particularly for combustion, aeroacoustics, and wind engineering.
Meshing for CFD
The quality of the computational mesh directly affects the accuracy, convergence, and cost of a CFD simulation. Near solid walls, where velocity gradients are steep, the mesh must be extremely fine to resolve the boundary layer. The first cell height at the wall is often measured in micrometers for high-Reynolds-number flows. Away from walls and in the freestream, cells can be much larger.
Structured meshes use regular arrays of cells (quadrilaterals in 2D, hexahedra in 3D) arranged in a block structure. They provide superior accuracy per cell and efficient memory access patterns but are difficult to generate for complex geometries. Multi-block structured meshes divide the domain into topologically simple blocks, each containing a structured grid, connected at block interfaces.
Unstructured meshes use irregular arrangements of cells (triangles or tetrahedra) and can automatically conform to arbitrary geometries. They are easier to generate but generally require more cells for the same accuracy. Polyhedral cells, with an arbitrary number of faces, offer a compromise between the accuracy of hexahedra and the geometric flexibility of tetrahedra. Many modern CFD codes support polyhedral meshes.
Applications of CFD
Aerospace engineering was the first major application of CFD and remains one of its most important. CFD predicts the lift, drag, and stability of aircraft at various flight conditions. It is used to design wing profiles, optimize engine nacelle placement, analyze control surface effectiveness, and predict sonic boom signatures. Wind tunnel testing still complements CFD, but computational analysis now dominates the early design phases.
Automotive engineering uses CFD for external aerodynamics (drag reduction, crosswind stability), internal flow (engine intake and exhaust), thermal management (cooling system design, cabin comfort), and increasingly for electric vehicle battery thermal management. Underbody aerodynamics, wheel aerodynamics, and side mirror flow are all routine CFD analyses in modern car design.
Weather and climate prediction uses CFD at the largest scale. Numerical weather prediction models solve the equations of atmospheric flow on global grids, using parameterizations for sub-grid processes like cloud formation and radiation. Climate models extend this to century-scale simulations that project the effects of greenhouse gas emissions, land use changes, and other forcing factors on Earth climate system.
Biomedical engineering applies CFD to blood flow in arteries and heart chambers, airflow in lungs, drug delivery in the circulatory system, and the design of medical devices like heart valves, stents, and ventilators. Patient-specific simulations, using geometries reconstructed from medical imaging, are beginning to inform clinical decisions for conditions like aneurysm risk assessment.
CFD solves the equations of fluid motion computationally to predict flow behavior that cannot be measured experimentally, and the central challenge remains turbulence, which forces a trade-off between physical fidelity and computational cost.