Skip to content
cfd-lab:~/en/posts/fdm-fem-fvm● online

Translated from the author's Korean original. Read the original (한국어)

NOTE #006DAY MON CFD기법DATE 2026.03.09UPDATED 2026.10.19READ 8 min read#CFD#FDM#FEM#FVM#Numerical-Methods

FDM vs FEM vs FVM: The Essential Differences Between Three Discretization Techniques

What you discretize — the derivative, the function space, or the face flux — decides whether conservation comes free.

One PDE, Three Paths#

Put a PDE on a computer and the first cut is where the unknown sits. Same equation. Point value, basis coefficient, or cell average — three different methods.

One 1D advection-diffusion equation is enough to see the split.

∂u∂t+a∂u∂x=ν∂2u∂x2\frac{\partial u}{\partial t} + a\frac{\partial u}{\partial x} = \nu\frac{\partial^2 u}{\partial x^2}

The dropdown switches FDM, FEM, and FVM, and the degrees of freedom move among nodes, basis coefficients, and cell centers.

같은 격자 위에 세 방법이 어떤 자유도(노드/셀/요소)를 가지는지 비교 — 보존성과 정확도 차이의 출발점.

FDM lines the points up, while FVM parks one value in the middle of each cell. FEM keeps the coefficient on the node and lets the basis run across the element.


1. Finite Difference Method (FDM)#

Core Idea#

Approximate derivatives directly as differences.

This is the most intuitive approach. It approximates derivatives by performing a Taylor expansion of the function values at grid points (nodes).

Mathematical Origin: Taylor Expansion#

Taylor expansion at point xix_i:

u(xi+Δx)=u(xi)+Δx∂u∂x∣i+Δx22∂2u∂x2∣i+⋯u(x_i + \Delta x) = u(x_i) + \Delta x \frac{\partial u}{\partial x}\bigg|_i + \frac{\Delta x^2}{2}\frac{\partial^2 u}{\partial x^2}\bigg|_i + \cdots

From this, difference approximations are derived:

Forward Difference:

∂u∂x∣i≈ui+1−uiΔx+O(Δx)\frac{\partial u}{\partial x}\bigg|_i \approx \frac{u_{i+1} - u_i}{\Delta x} + O(\Delta x)

Central Difference:

∂u∂x∣i≈ui+1−ui−12Δx+O(Δx2)\frac{\partial u}{\partial x}\bigg|_i \approx \frac{u_{i+1} - u_{i-1}}{2\Delta x} + O(\Delta x^2)

Second Derivative:

∂2u∂x2∣i≈ui+1−2ui+ui−1Δx2+O(Δx2)\frac{\partial^2 u}{\partial x^2}\bigg|_i \approx \frac{u_{i+1} - 2u_i + u_{i-1}}{\Delta x^2} + O(\Delta x^2)

Application to Advection-Diffusion#

Using central differences:

duidt+aui+1−ui−12Δx=νui+1−2ui+ui−1Δx2\frac{du_i}{dt} + a\frac{u_{i+1} - u_{i-1}}{2\Delta x} = \nu\frac{u_{i+1} - 2u_i + u_{i-1}}{\Delta x^2}

This results in a system of coupled ODEs for the unknowns uiu_i at the grid points.

Pros and Cons#

Pros:

  • Simple concept and easy implementation
  • Highly efficient on structured grids
  • Easy to achieve high-order accuracy (compact schemes, spectral-like schemes)
  • Clean matrix structure on orthogonal grids (band matrix)

Cons:

  • Difficult to apply to unstructured grids - this is a critical limitation
  • Grid generation for complex geometries is challenging
  • Does not automatically satisfy conservation laws

Typical Application Areas#

  • DNS/LES (Turbulence simulations based on orthogonal grids)
  • Weather/Ocean models (Structured grids)
  • Seismic wave propagation simulation
  • High-precision calculations based on compact schemes

2. Finite Element Method (FEM)#

Core Idea#

Approximate the solution as a linear combination of basis functions and minimize the weighted residual.

FEM does not solve the differential equation directly. Instead, it transforms it into an integral form called the weak formulation.

Mathematical Origin: Weak Form#

Multiply the original PDE (strong form) by a test function ww and integrate:

∫Ωw(∂u∂t+a∂u∂x−ν∂2u∂x2)dx=0\int_\Omega w \left(\frac{\partial u}{\partial t} + a\frac{\partial u}{\partial x} - \nu\frac{\partial^2 u}{\partial x^2}\right) dx = 0

Applying integration by parts to the diffusion term:

∫Ωw∂u∂t dx+∫Ωw a∂u∂x dx+∫Ων∂w∂x∂u∂x dx=[νw∂u∂x]Γ\int_\Omega w \frac{\partial u}{\partial t}\,dx + \int_\Omega w\, a\frac{\partial u}{\partial x}\,dx + \int_\Omega \nu\frac{\partial w}{\partial x}\frac{\partial u}{\partial x}\,dx = \left[\nu w \frac{\partial u}{\partial x}\right]_\Gamma

This is the weak form. Note the key changes:

  • The original second derivative was required, but after integration by parts, only the first derivative is needed.
  • Requirements for solution continuity are relaxed (C1→C0C^1 \to C^0).
  • Boundary conditions are naturally included (Neumann BC = right-hand side).

Galerkin Approximation#

Express the solution as a linear combination of basis functions ϕj\phi_j:

uh(x,t)=∑j=1NUj(t) ϕj(x)u^h(x, t) = \sum_{j=1}^{N} U_j(t)\,\phi_j(x)

In the Galerkin method, test functions and basis functions are chosen from the same space (w=ϕiw = \phi_i):

∑j(∫Ωϕiϕj dx)dUjdt+∑j(∫Ωϕi a ϕj′ dx+∫Ων ϕi′ ϕj′ dx)Uj=0\sum_j \left(\int_\Omega \phi_i \phi_j\,dx\right) \frac{dU_j}{dt} + \sum_j \left(\int_\Omega \phi_i\, a\, \phi_j'\,dx + \int_\Omega \nu\, \phi_i'\, \phi_j'\,dx\right) U_j = 0

In matrix form:

MdUdt+KU=f\mathbf{M}\frac{d\mathbf{U}}{dt} + \mathbf{K}\mathbf{U} = \mathbf{f}
  • M\mathbf{M}: Mass matrix
  • K\mathbf{K}: Stiffness matrix
  • f\mathbf{f}: Boundary/source vector

Choice of Basis Functions#

The most common choice is elements based on Lagrange polynomials:

ElementOrderNumber of Nodes (2D Triangle)Characteristics
P1 (Linear)1st3Most basic, low cost
P2 (Quadratic)2nd6Can represent curved shapes
P3 (Cubic)3rd10High precision, higher cost

Pros and Cons#

Pros:

  • Natural for unstructured grids - handles complex shapes with triangular/tetrahedral meshes
  • Mathematically rigorous error estimation (a priori / a posteriori) is possible
  • Pairs well with adaptive mesh refinement
  • Flexibility to choose between p-refinement (increasing polynomial degree) and h-refinement (grid refinement)

Cons:

  • Does not satisfy conservation laws directly (Standard Galerkin)
  • Unstable in advection-dominated problems (oscillation) - requires stabilization like SUPG or GLS
  • Requires mass matrix inversion (or mass lumping)
  • Higher implementation complexity compared to FDM/FVM

Typical Application Areas#

  • Solid mechanics / Structural analysis (FEM's original home)
  • Electromagnetic field analysis
  • Heat transfer
  • Biomechanics
  • Geomechanics

3. Finite Volume Method (FVM)#

Core Idea#

Integrate conservation laws over control volumes and balance the fluxes passing through volume boundaries.

FVM reflects physical conservation laws most directly.

Mathematical Origin: Integral Conservation Law#

Write the advection-diffusion equation in integral form:

ddt∫Viu dx+∮∂Vi(au−ν∂u∂x)⋅n dS=0\frac{d}{dt}\int_{V_i} u\,dx + \oint_{\partial V_i} \left(au - \nu\frac{\partial u}{\partial x}\right) \cdot n\, dS = 0

For a control volume Vi=[xi−1/2, xi+1/2]V_i = [x_{i-1/2},\, x_{i+1/2}]:

duˉidt=−1Δx(F^i+1/2−F^i−1/2)\frac{d\bar{u}_i}{dt} = -\frac{1}{\Delta x}\left(\hat{F}_{i+1/2} - \hat{F}_{i-1/2}\right)

Where uˉi\bar{u}_i is the cell-averaged value and F^i+1/2\hat{F}_{i+1/2} is the numerical flux at the cell boundary.

Determining Numerical Fluxes#

The core of FVM is how to calculate cell boundary fluxes:

Advection term - based on Riemann solvers or upwind schemes:

F^i+1/2adv=RiemannSolver(uˉi, uˉi+1)\hat{F}^{adv}_{i+1/2} = \text{RiemannSolver}(\bar{u}_i,\, \bar{u}_{i+1})

Diffusion term - central difference:

F^i+1/2diff=−νuˉi+1−uˉiΔx\hat{F}^{diff}_{i+1/2} = -\nu\frac{\bar{u}_{i+1} - \bar{u}_i}{\Delta x}

Reconstruction#

Cell averages alone provide only first-order accuracy. For higher-order accuracy, the distribution inside the cell must be reconstructed:

MUSCL (2nd order):

ui+1/2L=uˉi+12ψ(ri) (uˉi−uˉi−1)u_{i+1/2}^L = \bar{u}_i + \frac{1}{2}\psi(r_i)\,(\bar{u}_i - \bar{u}_{i-1})

Where ψ\psi is a slope limiter and rir_i is the ratio of successive gradients.

WENO (5th order):

Achieves 5th-order accuracy by nonlinearly weighted averaging of three 2nd-order polynomial candidates:

ui+1/2L=∑k=02ωk qk(xi+1/2)u_{i+1/2}^L = \sum_{k=0}^{2} \omega_k\, q_k(x_{i+1/2})

Weights ωk\omega_k are determined based on smoothness indicators βk\beta_k, automatically giving higher weight to smooth stencils near discontinuities.

Face diffusion in the note above is −ν(uˉi+1−uˉi)/Δx-\nu(\bar{u}_{i+1}-\bar{u}_i)/\Delta x, an orthogonal spacing. That difference is the normal derivative only when the normal lies on the grid line. A skewed face does not get its direction from the neighbor averages alone. The non-orthogonal diffusion correction is what closes the gap. Drop it and a conservative update can still push diffusion off-axis.

The forward difference carried O(Δx)O(\Delta x). Central and the second-derivative stencil carried O(Δx2)O(\Delta x^2). Forward keeps the Taylor term Δx2/2\Delta x^2/2. Central subtracts ui+1u_{i+1} and ui−1u_{i-1} and cancels it. Halve the spacing and the forward error drops by about half. The O(Δx2)O(\Delta x^2) pieces drop by about a quarter. Cell averages alone, with no reconstruction, stay first order. The extra order is bought on the way up to the face.

The 1/21/2 in MUSCL is the factor that lifts a cell average linearly to the face. ψ(ri)=1\psi(r_i)=1 keeps the whole slope. ψ=0\psi=0 sends the face value back to uˉi\bar{u}_i, and the flux is first order again. WENO adds only three candidates, k=0,1,2k=0,1,2. Each qkq_k is a quadratic. ωk\omega_k cuts weight where βk\beta_k is large. "Fifth order on a smooth interval" is the order of that weighted sum. When ψ\psi falls to 0 the fifth-order formula is still on the page, but that face has dropped to first order. A P1 triangle has 3 nodes, P2 has 6, P3 has 10. Raising the degree from 1 to 3 pushes the unknowns per element from 3 past 10. In the weak form, M\mathbf{M} holds ∫ϕiϕj dx\int \phi_i \phi_j\,dx and K\mathbf{K} packs ϕiϕj′\phi_i \phi_j' with ν ϕi′ϕj′\nu\,\phi_i'\phi_j'. Positive ν\nu leaves the diffusion block nearly symmetric. The advective speed aa leaves the antisymmetric piece.

Pros and Cons#

Pros:

  • Conservation laws are exactly satisfied at the discrete level - a decisive advantage in CFD
  • Strong at capturing shock waves and discontinuities
  • Applicable to unstructured grids
  • Flux-based thinking directly aligns with physical intuition

Cons:

  • Achieving high-order accuracy is more difficult than in FEM (reconstruction becomes complex)
  • Can be less efficient than FEM for pure diffusion equations
  • Implementation of high-order reconstruction on unstructured grids is tricky

Typical Application Areas#

  • Across CFD (OpenFOAM, ANSYS Fluent, SU2)
  • Compressible/Incompressible flow
  • Multiphase flow, combustion, reacting flows
  • Parts of dynamical cores in weather/climate models

Key Comparison#

Mathematical Starting Points#

TechniqueStarting PointCore Tool
FDMStrong form PDETaylor expansion
FEMWeak formBasis functions + Weighted residuals
FVMIntegral conservation lawControl volumes + Numerical fluxes

"What" is Discretized?#

This is the most fundamental difference:

  • FDM: Discretizes the differential operator (∂/∂x\partial/\partial x)
  • FEM: Discretizes the solution space
  • FVM: Discretizes the flux in integral equations

Location of Unknowns#

  • FDM: Point values at grid points (nodes)
  • FEM: Point values at nodes (coefficients of basis functions)
  • FVM: Cell-averaged values

Comprehensive Comparison#

ItemFDMFEMFVM
Implementation DifficultyLowHighMedium
Unstructured GridsDifficultNaturalPossible
ConservationXX (Standard)O
Complex GeometriesDifficultExcellentPossible
High-Order AccuracyEasyEasy (p-ref)Possible (WENO)
Shock CapturingPossibleDifficultExcellent
Mathematical TheoryModerateExcellentModerate
Advection-DominatedModerateNeeds stabilizationExcellent

Modern Techniques: Blurring the Boundaries#

Recently, hybrid methods combining the advantages of all three techniques have been actively researched:

Discontinuous Galerkin (DG)#

Combines FEM's basis functions with FVM's flux concept. It approximates the solution with polynomials within each cell (FEM) and calculates fluxes at cell boundaries using Riemann solvers (FVM).

∫Viw∂uh∂t dx−∫Vi∂w∂xF(uh) dx+F^i+1/2wi+1/2−−F^i−1/2wi−1/2+=0\int_{V_i} w \frac{\partial u^h}{\partial t}\,dx - \int_{V_i} \frac{\partial w}{\partial x} F(u^h)\,dx + \hat{F}_{i+1/2} w_{i+1/2}^- - \hat{F}_{i-1/2} w_{i-1/2}^+ = 0

It satisfies conservation + high-order accuracy + unstructured grid capabilities. However, computational costs are high, and limiters are required near shocks.

Spectral Difference / Flux Reconstruction#

Similar to DG but solves in differential form without integration to increase efficiency. It pairs very well with GPU acceleration and is gaining attention for next-generation CFD solvers.

Meshless Methods (SPH, etc.)#

An approach that eliminates the grid entirely, approximating based on particles. Strong for free-surface flows and large deformation problems, but accuracy/consistency issues exist.


If the integral has to survive, drop the pure difference stencil#

A box-domain DNS on an orthogonal mesh can live on the central O(Δx2)O(\Delta x^2) stencil. Three nodes build the second derivative, and the matrix stays banded. Bend the geometry onto an unstructured mesh and that stencil no longer has a neighbor to name. The weak form then swallows the shape. Standard Galerkin's M\mathbf{M} and K\mathbf{K} still do not promise that face fluxes cancel cell by cell.

When a shock passes and the integral has to come back as the same number, the update is FVM. The face flux F^i+1/2\hat{F}_{i+1/2} is a loss for the left cell and a gain for the right, so interior faces vanish in the global sum. High order and conservation in one scheme means a polynomial inside the cell and a Riemann flux on the face, as in a discontinuous Galerkin discretization. Leave the limiter off and that hybrid still rings in front of a shock.

Share if you found it helpful.