Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

0. Conservation laws, dimensionless groups and time-step limits

School of Engineering, Nazarbayev University

Why can liquid sodium flowing through a fast-reactor coolant duct be turbulent in momentum (Re>3×104\mathrm{Re} > 3\times 10^4) while behaving almost like a solid thermal conductor in energy transport (PeT≈151\mathrm{Pe}_T \approx 151), whereas room-temperature glycerol moving slowly through the same pipe (Re≈13.3\mathrm{Re} \approx 13.3) forms very thin thermal boundary layers (PeT>105\mathrm{Pe}_T > 10^5)? And why does halving a computational mesh spacing Δx→Δx/2\Delta x \to \Delta x/2 cut the maximum explicit convective time step by 2×2\times (ΔtCFL∝Δx\Delta t_{\mathrm{CFL}} \propto \Delta x), yet reduces the explicit diffusive time step by 4×4\times (Δtdiff∝Δx2\Delta t_{\mathrm{diff}} \propto \Delta x^2)? In this opening lecture, we connect integral and differential continuum conservation laws to physical fluid properties in constants.FLUIDS_DB and establish the dimensionless groups (Re, Pe, CFL, and mesh Fourier number rr) that govern every solver in engcfd.

Learning objectives

  1. Formulate integral finite-volume vs. differential divergence conservation laws and verify thermophysical trends across all 10 Newtonian fluids in constants.FLUIDS_DB.

  2. Compute momentum reynolds_number (Re\mathrm{Re}) and scalar/thermal peclet_number (PeT=Re⋅Pr\mathrm{Pe}_T = \mathrm{Re}\cdot\mathrm{Pr}), contrasting liquid metals (Pr≪1\mathrm{Pr} \ll 1), gases (Pr≈0.7\mathrm{Pr} \approx 0.7), water (Pr≈6\mathrm{Pr} \approx 6), and viscous polyols (Pr>5000\mathrm{Pr} > 5000).

  3. Quantify explicit time-step ceilings across mesh refinement by comparing convective courant_number (Δt∝Δx\Delta t \propto \Delta x) against diffusive fourier_mesh_number (Δt∝Δx2\Delta t \propto \Delta x^2).

  4. Identify the exact cell-Péclet crossover grid size Δx∗=2Γ/∣u∣\Delta x^* = 2\Gamma / |u| where explicit time-stepping transitions from advection-limited to diffusion-limited.

Time: about 60 min

1. Physical Principles: Integral Conservation Laws & FLUIDS_DB

1.1 Integral vs. Differential Conservation Laws

Every finite-volume CFD solver begins not with partial derivatives, but with an integral balance over a fixed control volume Ω\Omega bounded by closed surface ∂Ω\partial\Omega with outward unit normal n\mathbf{n}. For any conserved intensive density ϕ(x,t)\phi(\mathbf{x}, t) (mass ρ\rho, momentum ρu\rho\mathbf{u}, or enthalpy ρcpT\rho c_p T) subject to total flux F(ϕ)=uϕ−Γ∇ϕ\mathbf{F}(\phi) = \mathbf{u}\phi - \Gamma\nabla\phi and volumetric source SϕS_\phi:

ddt∫Ωϕ dV+∮∂Ω(uϕ−Γ∇ϕ)⋅n dS=∫ΩSϕ dV(1.1)\frac{\mathrm{d}}{\mathrm{d}t}\int_{\Omega}\phi\,\mathrm{d}V + \oint_{\partial\Omega}\left(\mathbf{u}\phi - \Gamma\nabla\phi\right)\cdot\mathbf{n}\,\mathrm{d}S = \int_{\Omega} S_\phi\,\mathrm{d}V \tag{1.1}

Only when ϕ\phi and F\mathbf{F} are continuously differentiable (C1\mathcal{C}^1) can Gauss’s divergence theorem convert the surface integral into a volume integral to yield the differential divergence form:

∂ϕ∂t+∇⋅(uϕ−Γ∇ϕ)=Sϕ(1.2)\frac{\partial \phi}{\partial t} + \nabla\cdot\left(\mathbf{u}\phi - \Gamma\nabla\phi\right) = S_\phi \tag{1.2}

Across shock waves (Lectures 8 to 10) or discontinuous composite-material interfaces (Lecture 2), classical derivatives blow up while Equation (1.1) remains exact.

1.2 Momentum vs. Thermal Diffusivity Across Six Orders of Prandtl Number

In a Newtonian fluid of density ρ [kg/m3]\rho\ [\mathrm{kg/m^3}], dynamic viscosity μ [Pa⋅s]\mu\ [\mathrm{Pa\cdot s}], thermal conductivity k [W/(m⋅K)]k\ [\mathrm{W/(m\cdot K)}], and isobaric heat capacity cp [J/(kg⋅K)]c_p\ [\mathrm{J/(kg\cdot K)}], momentum and thermal energy diffuse with kinematic diffusivities ν\nu and α [m2/s]\alpha\ [\mathrm{m^2/s}]:

ν=μρ,α=kρcp,Pr=να=μcpk(1.3)\nu = \frac{\mu}{\rho}, \qquad \alpha = \frac{k}{\rho c_p}, \qquad \mathrm{Pr} = \frac{\nu}{\alpha} = \frac{\mu c_p}{k} \tag{1.3}

We audit the gas constant, the gravitational acceleration and all 10 benchmark fluids curated in constants.FLUIDS_DB.


Demonstration 1: Ideal-Gas Air Check & Complete 10-Fluid Prandtl check of FLUIDS_DB
===================================================================================
Ideal-gas dry air at 1 atm, 298.15 K: rho = 1.1839 kg/m^3 vs FLUIDS_DB = 1.1840 kg/m^3

Fluid                | rho [kg/m^3] |  nu [m^2/s] | alpha [m^2/s] |     Pr [-]
------------------------------------------------------------------------------
liquid_sodium_673K   |      856.000 |   3.318e-07 |     6.609e-05 |     0.0050
mercury_298K         |    13534.000 |   1.128e-07 |     4.396e-06 |     0.0256
methane_298K         |        0.657 |   1.686e-05 |     2.332e-05 |     0.7233
air_298K             |        1.184 |   1.562e-05 |     2.139e-05 |     0.7302
steam_473K           |        0.464 |   3.491e-05 |     3.645e-05 |     0.9579
co2_supercritical    |      629.000 |   7.599e-08 |     3.008e-08 |     2.5261
water_298K           |      997.050 |   8.926e-07 |     1.456e-07 |     6.1303
ethanol_298K         |      785.000 |   1.368e-06 |     8.719e-08 |    15.6920
engine_oil_313K      |      876.000 |   2.397e-04 |     8.370e-08 |  2864.1667
glycerol_298K        |     1261.000 |   7.534e-04 |     9.312e-08 |  8090.0000

What Demonstration 1 shows. constants.FLUIDS_DB spans six orders of magnitude in Prandtl number (Pr=0.0050\mathrm{Pr} = 0.0050 in liquid_sodium_673K up to Pr=8090\mathrm{Pr} = 8090 in glycerol_298K):

  • Liquid metals (Pr≪1\mathrm{Pr} \ll 1): Free-electron conduction makes α≈200 ν\alpha \approx 200\,\nu in liquid sodium (6.61e-5 vs. 3.32e-7 m2/s\mathrm{m^2/s}), so heat diffuses far faster than vorticity.

  • Diatomic/light gases (Pr≈0.72\mathrm{Pr} \approx 0.72): Kinetic theory of gases ties molecular momentum and energy mean-free-path transport together (air_298K, methane_298K, steam_473K).

  • Hydrogen-bonded & viscous liquids (Pr≫1\mathrm{Pr} \gg 1): Heavy entangled molecules transfer momentum rapidly via intermolecular shear (μ\mu), while phonon-like thermal conduction (kk) stays modest (water_298K Pr=6.13\mathrm{Pr} = 6.13, glycerol_298K Pr=8090\mathrm{Pr} = 8090).


2. Reynolds vs. Péclet Scaling in Channel & Pipe Flows

Non-dimensionalizing steady advection–diffusion u⋅∇ϕ=Γ∇2ϕ\mathbf{u}\cdot\nabla\phi = \Gamma\nabla^2\phi by characteristic speed UU and length scale LL yields the Reynolds number (for momentum, Γ=ν\Gamma = \nu) and thermal Péclet number (for temperature, Γ=α\Gamma = \alpha):

Re=∣U∣ Lν,PeT=U Lα=Re⋅Pr(2.1)\mathrm{Re} = \frac{|U|\,L}{\nu}, \qquad \mathrm{Pe}_T = \frac{U\,L}{\alpha} = \mathrm{Re}\cdot\mathrm{Pr} \tag{2.1}

We subject all 10 fluids to the identical geometric and kinematic flow (U=0.20 m/sU = 0.20\ \mathrm{m/s} in a L=0.05 mL = 0.05\ \mathrm{m} pipe) using constants.reynolds_number and constants.peclet_number.


Demonstration 2: Identical Pipe Flow (U = 0.20 m/s, D = 0.05 m) Across All 10 Fluids
====================================================================================
Fluid                |       Re [-] |     Pe_T [-] |  Pe_T / Re | Flow / Thermal Regime
----------------------------------------------------------------------------------------
liquid_sodium_673K   |     30140.85 |       151.31 |     0.0050 | Turbulent / Moderate-Pe
mercury_298K         |     88689.38 |      2274.69 |     0.0256 | Turbulent / High-Pe BL
methane_298K         |       592.96 |       428.88 |     0.7233 | Laminar / Moderate-Pe
air_298K             |       640.35 |       467.56 |     0.7302 | Laminar / Moderate-Pe
steam_473K           |       286.42 |       274.37 |     0.9579 | Laminar / Moderate-Pe
co2_supercritical    |    131589.96 |    332405.84 |     2.5261 | Turbulent / High-Pe BL
water_298K           |     11202.81 |     68676.54 |     6.1303 | Turbulent / High-Pe BL
ethanol_298K         |      7309.12 |    114694.61 |    15.6920 | Turbulent / High-Pe BL
engine_oil_313K      |        41.71 |    119476.67 |  2864.1667 | Laminar / High-Pe BL
glycerol_298K        |        13.27 |    107384.11 |  8090.0000 | Laminar / High-Pe BL
<Figure size 726x484 with 1 Axes>

Figure 0.1. Thermal Péclet number against Reynolds number for the ten fluids of FLUIDS_DB at U=0.20U = 0.20 m/s and D=0.05D = 0.05 m. The vertical distance of a point from the dashed line is its Prandtl number.

What Demonstration 2 shows. liquid_sodium_673K and glycerol_298K behave in opposite ways at the same U=0.20 m/s,D=0.05 mU = 0.20\ \mathrm{m/s}, D = 0.05\ \mathrm{m}:

  • Liquid sodium: Re=30 141\mathrm{Re} = 30\,141 (fully turbulent hydrodynamic core with thin viscous wall sublayer), yet PeT=151\mathrm{Pe}_T = 151 (broad conductive temperature profile across the duct).

  • Glycerol: Re=13.27\mathrm{Re} = 13.27 (deeply laminar viscous flow), yet PeT=107 384\mathrm{Pe}_T = 107\,384 (700×700\times higher thermal Péclet than turbulent sodium, which gives very thin thermal boundary layers).


3. Explicit Time-Step Ceilings: Convective CFL vs. Diffusive Fourier Limits

When advancing an explicit time-marching CFD solver on grid spacing Δx\Delta x with step Δt\Delta t, two dimensionless stability numbers control whether information outruns the numerical stencil:

CFL=∣u∣ ΔtΔx≤CFLmax⁡∼1,r=Γ ΔtΔx2≤rmax⁡=12d(3.1)\mathrm{CFL} = \frac{|u|\,\Delta t}{\Delta x} \leq \mathrm{CFL}_{\max} \sim 1, \qquad r = \frac{\Gamma\,\Delta t}{\Delta x^2} \leq r_{\max} = \frac{1}{2d} \tag{3.1}

In d=1d = 1 spatial dimension (CFLmax⁡=1\mathrm{CFL}_{\max} = 1, rmax⁡=1/2r_{\max} = 1/2), the maximum allowable explicit time steps scale with different powers of Δx\Delta x:

ΔtCFL(Δx)=Δx∣u∣∝Δx1,Δtdiff(Δx)=Δx22Γ∝Δx2(3.2)\Delta t_{\mathrm{CFL}}(\Delta x) = \frac{\Delta x}{|u|} \propto \Delta x^1, \qquad \Delta t_{\mathrm{diff}}(\Delta x) = \frac{\Delta x^2}{2\Gamma} \propto \Delta x^2 \tag{3.2}

Equating ΔtCFL(Δx∗)=Δtdiff(Δx∗)\Delta t_{\mathrm{CFL}}(\Delta x^*) = \Delta t_{\mathrm{diff}}(\Delta x^*) gives the crossover grid spacing:

Δx∗=2Γ∣u∣  ⟺  ∣PeΔx∗∣=∣u∣ Δx∗Γ=2(3.3)\Delta x^* = \frac{2\Gamma}{|u|} \iff |\mathrm{Pe}_{\Delta x^*}| = \frac{|u|\,\Delta x^*}{\Gamma} = 2 \tag{3.3}

Coarser grids (Δx>Δx∗\Delta x > \Delta x^*, ∣PeΔx∣>2|\mathrm{Pe}_{\Delta x}| > 2) are convection-limited; finer grids (Δx<Δx∗\Delta x < \Delta x^*, ∣PeΔx∣<2|\mathrm{Pe}_{\Delta x}| < 2) become diffusion-stiff.


Demonstration 3: CFL vs Diffusive Fourier Time-Step Scaling Across Mesh Refinement
==================================================================================
<Figure size 1232x473 with 2 Axes>
At crossover dx* = 0.009589 m: CFL = 1.0000, r = 0.5000, Pe_dx = 2.0000

Figure 0.2. (a) Largest stable explicit time step against grid spacing for engine oil moving at 0.05 m/s: the convective limit, the diffusive limit and the combined limit; the point marks the grid spacing at which the two limits are equal. (b) Kinematic viscosity and thermal diffusivity of the ten fluids of FLUIDS_DB; the length of each bar is the Prandtl number on the logarithmic axis.

What Demonstration 3 shows. Δx∗=9.59 mm\Delta x^* = 9.59\ \mathrm{mm} marks the exact threshold ∣PeΔx∣=2|\mathrm{Pe}_{\Delta x}| = 2 (which we will meet again in Lecture 4 as the central-difference oscillation limit). Refining a viscous wall mesh 10×10\times from 1 mm1\ \mathrm{mm} to 0.1 mm0.1\ \mathrm{mm} forces a 100×100\times smaller explicit diffusive step Δtdiff\Delta t_{\mathrm{diff}} (plus another 10×10\times more cells in 1-D, or 103×10^3\times in 3-D, inflating 3-D explicit runtime by 105×10^5\times). That quadratic penalty explains why industrial Navier–Stokes solvers treat viscous diffusion implicitly (Crank–Nicolson / ADI).


4. Multi-Dimensional Fourier Limits, Sign Conventions & Guards

Two subtleties frequently trip up CFD practitioners:

  1. Dimensionality penalty in explicit diffusion: On an isotropic dd-dimensional Cartesian mesh (Δx=Δy=Δz\Delta x = \Delta y = \Delta z), the center coefficient of explicit FTCS diffusion un+1=(1−2dr)un+r∑nbunbnu^{n+1} = (1 - 2 d r) u^n + r \sum_{\mathrm{nb}} u_{\mathrm{nb}}^n stays non-negative only when r≤1/(2d)r \leq 1/(2d) (0.5 in 1-D, 0.25 in 2-D, 1/61/6 in 3-D).

  2. Signed Péclet vs. Unsigned Reynolds/CFL: Flow direction matters for upwind flux biasing (peclet_number preserves the sign of u_m_s), whereas reynolds_number and courant_number take ∣u∣|u| and accept vectorized velocity arrays.


Demonstration 4: Signed Peclet, Vectorized Velocities & Multi-D Fourier Limits
==============================================================================
Velocity u [m/s] : [-2.5 -0.5  0.   0.5  2.5]
Unsigned Re [-]  : [28007.02  5601.4      0.    5601.4  28007.02]
Signed Pe [-]    : [-28007.02  -5601.4       0.     5601.4   28007.02]
Unsigned CFL [-] : [0.5 0.1 0.  0.1 0.5]
1-D liquid-sodium thermal FTCS limit (dx=1 mm): dt_max = 7.5655 ms (r = 0.5000 <= 0.5000)
2-D liquid-sodium thermal FTCS limit (dx=1 mm): dt_max = 3.7827 ms (r = 0.2500 <= 0.2500)
3-D liquid-sodium thermal FTCS limit (dx=1 mm): dt_max = 2.5218 ms (r = 0.1667 <= 0.1667)

Inside the algorithm

Below we inspect the exact implementation of constants.reynolds_number, constants.peclet_number, constants.courant_number, and constants.fourier_mesh_number, and verify all derived properties in constants.FLUIDS_DB from raw (ρ,μ,k,cp)(\rho, \mu, k, c_p) primitives using pure NumPy vectorization.

Check against the library


Inside the Algorithm: NumPy check of Dimensionless Groups & FLUIDS_DB
=====================================================================
def reynolds_number(u_m_s: float | np.ndarray, L_m: float, nu_m2_s: float) -> float | np.ndarray:
    """Compute Reynolds number Re = |u| * L / nu [-]."""
    if L_m <= 0.0 or nu_m2_s <= 0.0:
        raise ValueError("Characteristic length L_m and kinematic viscosity nu_m2_s must be > 0.")
    re_val = np.abs(np.asarray(u_m_s, dtype=float)) * float(L_m) / float(nu_m2_s)
    return float(re_val) if np.ndim(u_m_s) == 0 else re_val

def fourier_mesh_number(diffusivity_m2_s: float, dt_s: float, dx_m: float) -> float:
    """Compute diffusive mesh Fourier number r = Gamma * dt / dx^2 [-]."""
    if diffusivity_m2_s < 0.0 or dt_s <= 0.0 or dx_m <= 0.0:
        raise ValueError("Require diffusivity >= 0, dt_s > 0, and dx_m > 0.")
    return float(diffusivity_m2_s * dt_s / (dx_m**2))

Max |nu_np - nu_db|       = 0.00e+00 m^2/s
Max |alpha_np - alpha_db| = 0.00e+00 m^2/s
Max |Pr_np - Pr_db|       = 9.09e-13

Exercises

Worked solutions are in 00_solutions.ipynb. The cell below the list is a short self-check to start from.

  1. Verify a result. Across all 10 fluids in constants.FLUIDS_DB at U=0.25 m/sU = 0.25\ \mathrm{m/s} and L=0.04 mL = 0.04\ \mathrm{m}, verify PeT/Re=μcp/k\mathrm{Pe}_T / \mathrm{Re} = \mu c_p / k to <10−13< 10^{-13} relative error, and programmatically identify all fluids satisfying (a) Re>104\mathrm{Re} > 10^4 with PeT<103\mathrm{Pe}_T < 10^3 and (b) Re<20\mathrm{Re} < 20 with PeT>5×104\mathrm{Pe}_T > 5\times 10^4.

  2. Find how it fails. Quantify the error factor when dynamic viscosity μ [Pa⋅s]\mu\ [\mathrm{Pa\cdot s}] is mistakenly passed instead of ν [m2/s]\nu\ [\mathrm{m^2/s}] into reynolds_number for water_298K and mercury_298K, evaluate the unphysical center-node stencil weight 1−6r1 - 6r when the 1-D limit r=0.5r = 0.5 is used in 3-D explicit FTCS diffusion, and verify ValueError guards.

  3. Implement it yourself. Implement explicit_advection_diffusion_dt_max(u_m_s, diffusivity_m2_s, dx_m, ndim=1, safety=0.9) enforcing CFL+2dr=safety\mathrm{CFL} + 2 d r = \mathrm{safety}, and verify exact identity closure plus asymptotic log-slopes of 1.0 (advection regime) and 2.0 (diffusion regime).


Self-check for the exercises
============================
Turbulent (Re > 1e4) yet Pe_T < 1e3  : ['liquid_sodium_673K']
Laminar   (Re < 20)  yet Pe_T > 5e4  : ['glycerol_298K']
All checks passed.