Intro to Computational Fluids

Discretization, stability, and convergence in introductory flow simulations.

Conceptual context

Computational fluid dynamics turns a continuous flow into a finite set of cells, variables, and algebraic equations. Each cell carries approximations of uu, vv, pressure, and other properties. hh determines which flow structures can be resolved and how far unumu_num lies from urefu_ref. A coarse grid smooths gradients and boundary layers; a fine grid increases cost and may require a smaller dtdt. The central task is not producing an attractive image, but demonstrating that ϵu\epsilon _u decreases consistently under refinement without changing the physical problem.

🟢 Essential level

A fluid simulation divides the domain into small cells and computes how the fluid moves through them.

hh describes the spatial scale of those cells. Reducing it allows the grid to represent changes in uu, vv, and pressure more accurately, especially near walls and inlets. Consequently, ϵu\epsilon _u usually decreases under refinement. A finer mesh does not repair incorrect boundaries, an unreliable urefu_ref, or an unsuitable physical model. It can also create instability when dtdt is not adjusted. The correct practice is to compare several meshes while keeping ReRe, geometry, and boundary conditions fixed. A regular error trend supports convergence; an irregular curve indicates that another mechanism controls the result. Refinement is therefore a test of the numerical model, not merely a request for more detail. It must also be evaluated with a quantity defined consistently across meshes: comparing a pointwise velocity on one mesh with an averaged value on another would create a false impression of improvement.

🔵 Formal level

Basic formulas

Mass conservation in a two-dimensional incompressible flow requires the local defect divudiv_u to vanish:

Continuity for incompressible flow

∂u∂x+∂v∂y=0\frac{\partial u}{\partial x}+\frac{\partial v}{\partial y}=0

The dynamic regime is characterized by ReRe, built from ρ\rho, UU, LL, and μ\mu:

Reynolds number

Re=ρULμRe=\frac{\rho U L}{\mu}

For transient simulations, advective travel per cell is controlled through CFLCFL, which links dtdt and hh:

Advective CFL number

CFL=UΔth\mathrm{CFL}=\frac{U\Delta t}{h}

The discrepancy between unumu_num and urefu_ref is measured by:

Relative velocity error

εu=∣uνm−uref∣∣uref∣\varepsilon_u=\frac{|u_{\nu m}-u_{ref}|}{|u_{ref}|}

Real student questions

Is a finer mesh always better? Only when spatial error dominates and the model, solver, and time step are appropriate.

Why must ReRe remain fixed? Because it defines the physical regime. Changing it means comparing different flows.

What does small divudiv_u mean? The computed field approximately satisfies local mass conservation.

Can a stable simulation still be inaccurate? Yes. A suitable CFLCFL prevents some instabilities but does not guarantee spatial resolution.

What if the reference velocity is near zero? Use absolute error or a global norm because pointwise relative error becomes misleading.

Final synthesis

A trustworthy flow simulation is demonstrated, not assumed. hh should reduce ϵu\epsilon _u consistently while conservation, regime, and stability remain controlled. One mesh gives a result; several meshes provide evidence.

Formal development

This section is part of the complete theory. See the subscription options to access it.

🔴 Structural level

This section is part of the complete theory. See the subscription options to access it.

Deep physical interpretation

This section is part of the complete theory. See the subscription options to access it.

Order of magnitude

This section is part of the complete theory. See the subscription options to access it.

Personalized resolution method

This section is part of the complete theory. See the subscription options to access it.

Special cases and extended example

This section is part of the complete theory. See the subscription options to access it.

Cross-cutting connections and study paths

This section is part of the complete theory. See the subscription options to access it.