Numerical Methods for CAE
FEM, FVM, FDM Theory and Solver Selection

Category: Fundamental Theory | Updated: 2026-03-25 | NovaSolver Contributors

Every CAE software — Abaqus, Ansys, OpenFOAM, COMSOL — is ultimately a large numerical computation engine. Understanding the mathematical methods beneath the GUI doesn't just satisfy academic curiosity: it determines whether you interpret results correctly, recognize when a simulation is going wrong, and know how to fix it efficiently.

1. PDE Classification and Numerical Methods Overview

🧑‍🎓

I keep hearing "parabolic," "elliptic," and "hyperbolic" PDEs. Do these classifications actually matter for choosing a solver, or is it just academic?

🎓

It absolutely matters — the classification determines the mathematical character of the solution, which in turn dictates appropriate numerical methods. Elliptic problems (like steady-state heat conduction) have smooth solutions where every point depends on every other point simultaneously — you must solve the whole domain at once. Parabolic problems (like transient heat) propagate smoothly forward in time — you can march step by step. Hyperbolic problems (like shock waves) propagate at finite speed with possible discontinuities — you need upwind schemes that respect wave direction. Use the wrong method for the problem type and you get instability, false diffusion, or wrong wave speeds.

1.1 PDE Classification for a 2nd-Order PDE

For $A u_{xx} + 2B u_{xy} + C u_{yy} + \ldots = 0$, the discriminant $\Delta = B^2 - AC$ determines:

DiscriminantTypePrototype equationPhysical analogy
Δ < 0 (B² < AC)Elliptic$\nabla^2 u = f$ (Poisson)Steady-state heat, electrostatics, elastic equilibrium
Δ = 0Parabolic$u_t = \alpha\nabla^2 u$ (diffusion)Transient heat, mass diffusion, viscous flow
Δ > 0 (B² > AC)Hyperbolic$u_{tt} = c^2\nabla^2 u$ (wave)Sound waves, structural dynamics, compressible shocks

1.2 Methods Overview

MethodAcronymMesh typeConservationPrimary domain
Finite DifferenceFDMStructured (Cartesian)Not automaticSimple geometry, wave propagation, research codes
Finite ElementFEMUnstructured (any)Weak formStructural, electromagnetic, coupled physics
Finite VolumeFVMUnstructured (any)Cell-exactCFD (Fluent, OpenFOAM, STAR-CCM+)
Boundary ElementBEMSurface onlyAcoustics, unbounded EM, potential flow
Spectral ElementSEMStructuredSpectral accuracyComputational fluid dynamics research, seismic

2. Finite Difference Method (FDM)

🧑‍🎓

FDM seems simpler than FEM — why don't CFD codes just use it instead?

🎓

FDM is indeed simpler and gives very efficient codes on structured Cartesian grids — that's why FDTD (finite difference time domain) is still king in electromagnetic wave simulation, and many research CFD codes use it. The problem is that most engineering geometries — car bodies, pipe junctions, turbine blades — are not nice rectangular boxes. Fitting a structured Cartesian grid to an arbitrary geometry requires body-fitted coordinates or immersed boundary methods, which add complexity. FVM naturally handles unstructured meshes with triangles, tetrahedra, and arbitrary polyhedra, making it far easier to mesh complex CAD geometries. That's the main reason CFD uses FVM.

2.1 Finite Difference Approximations

From Taylor series expansion, the first derivative:

$$\frac{du}{dx}\bigg|_i \approx \frac{u_{i+1} - u_i}{\Delta x} \quad \text{(forward, 1st order, } O(\Delta x)\text{)}$$ $$\frac{du}{dx}\bigg|_i \approx \frac{u_{i+1} - u_{i-1}}{2\Delta x} \quad \text{(central, 2nd order, } O(\Delta x^2)\text{)}$$

Second derivative:

$$\frac{d^2u}{dx^2}\bigg|_i \approx \frac{u_{i+1} - 2u_i + u_{i-1}}{\Delta x^2} \quad \text{(central, 2nd order)}$$

2.2 Stability Analysis: Von Neumann Method

For the 1D diffusion equation $u_t = \alpha u_{xx}$ with explicit FDM (FTCS):

$$\frac{u_i^{n+1} - u_i^n}{\Delta t} = \alpha\frac{u_{i+1}^n - 2u_i^n + u_{i-1}^n}{\Delta x^2}$$

Von Neumann stability analysis: assume $u_i^n = g^n e^{i\xi x_i}$. The amplification factor must satisfy $|g| \leq 1$:

$$g = 1 - 4r\sin^2(\xi\Delta x/2), \qquad r = \frac{\alpha\Delta t}{\Delta x^2} \quad \text{(diffusion number)}$$ $$\text{Stable if:} \quad r \leq \frac{1}{2} \quad\Rightarrow\quad \Delta t \leq \frac{\Delta x^2}{2\alpha}$$

This CFL-like stability condition is the fundamental constraint of explicit time integration: halving the grid spacing requires quartering the time step — a severe restriction for 3D fine meshes.

2.3 1D Advection Equation — Upwind Schemes

For $u_t + c\,u_x = 0$ (wave speed c > 0), central differences give an unstable scheme. The first-order upwind scheme is stable:

$$\frac{u_i^{n+1} - u_i^n}{\Delta t} + c\frac{u_i^n - u_{i-1}^n}{\Delta x} = 0 \quad (c > 0)$$ $$\text{CFL condition: } \quad \nu = \frac{c\Delta t}{\Delta x} \leq 1$$

The CFL number ν must be ≤ 1 for stability — information cannot travel more than one cell per time step.

3. Finite Element Method (FEM) — Mathematical Foundations

🧑‍🎓

I understand the basic concept of FEM — divide into elements, solve locally, assemble globally. But what's the mathematical justification? Why does this actually work and give the right answer?

🎓

The justification is the Galerkin method: instead of satisfying the PDE exactly at every point, we require it to be satisfied on average — weighted by test functions. The beautiful result from functional analysis is that among all possible approximations within our finite-dimensional function space (spanned by the shape functions), the Galerkin solution is the best possible in terms of the energy norm. It minimizes the projection error orthogonally. As you add more elements or use higher-order polynomials, the solution space grows and the approximation error provably converges to zero at predictable rates. That's the rigorous foundation.

3.1 The Variational (Ritz-Galerkin) Foundation

For the model problem $-\nabla\cdot(k\nabla u) = f$ with $u = 0$ on boundary:

Minimization form: The FEM solution minimizes the potential energy functional:

$$\Pi(u) = \frac{1}{2}\int_\Omega k|\nabla u|^2\,d\Omega - \int_\Omega fu\,d\Omega$$

Galerkin (weak) form: Find $u^h \in V^h$ such that $\forall v^h \in V^h$:

$$a(u^h, v^h) = L(v^h)$$ $$a(u,v) = \int_\Omega k\nabla u\cdot\nabla v\,d\Omega, \qquad L(v) = \int_\Omega fv\,d\Omega + \int_{\Gamma_N} \bar{q} v\,d\Gamma$$

3.2 Galerkin Orthogonality and Best Approximation

The Galerkin error $e = u - u^h$ satisfies:

$$a(u - u^h, v^h) = 0 \quad \forall v^h \in V^h$$

This "Galerkin orthogonality" means the error is orthogonal to the approximation space in the energy inner product. Cea's lemma then gives the best approximation property:

$$\|u - u^h\|_a \leq \frac{M}{\alpha}\min_{v^h\in V^h}\|u - v^h\|_a$$

3.3 Convergence Rates

For polynomial order p elements and smooth solutions, the h-convergence rate:

$$\|u - u^h\|_{H^1} \leq Ch^{\min(p,s)-1}\|u\|_{H^s}, \qquad \|u - u^h\|_{L^2} \leq Ch^{\min(p,s)}\|u\|_{H^s}$$

where h is the mesh size and s is the smoothness of the exact solution. For smooth problems with linear elements (p=1): energy error converges as h¹, L₂ error as h².

3.4 Element Types and Polynomial Orders

ElementNodesPolynomial orderBest for
Linear tetrahedral (Tet4)4p=1Complex geometry; low accuracy per DOF; avoid for bending
Quadratic tetrahedral (Tet10)10p=2Industry standard for curved geometries
Linear hexahedral (Hex8)8p=1Structured regions; beware shear locking
Serendipity hex (Hex20)20p=2High accuracy; best efficiency for structural
Linear wedge (Penta6)6p=1Thin layers (boundary layers, laminates)
Linear shell (S4R)4p=1 (in-plane)Thin-walled structures; efficient

3.5 Locking Phenomena and Remedies

Low-order elements can exhibit artificial stiffness ("locking") in special cases:

Locking typeWhen it occursRemedy
Shear lockingLinear elements in bending-dominated problemsReduced integration (RI), incompatible modes (Q6), higher-order elements
Volumetric lockingNearly incompressible materials (ν → 0.5), plasticityMixed formulation (u-p elements), reduced integration, B-bar method
Membrane lockingCurved shell elementsAssumed Natural Strain (ANS), MITC elements

4. Finite Volume Method (FVM)

🧑‍🎓

I've heard FVM is "conservative" while FDM might not be. What does conservation mean in this context and why does it matter for CFD?

🎓

Conservation means the numerical method exactly balances fluxes across each cell — whatever flows out of one cell flows exactly into the adjacent cell, with no numerical leakage. This is critical in CFD because it ensures total mass, momentum, and energy are preserved to machine precision, regardless of mesh size. In a simulation of a flow through a duct, a non-conservative scheme might accumulate a net mass error that grows over time, eventually giving completely wrong answers. FVM achieves this automatically because it integrates the conservation law in integral form over each cell — the cell-face fluxes cancel exactly when you sum over adjacent cells.

4.1 FVM Discretization

Integrating a conservation law $\partial_t(\rho\phi) + \nabla\cdot(\mathbf{F}) = S$ over a control volume $V_P$:

$$\frac{d}{dt}\int_{V_P}\rho\phi\, dV + \oint_{\partial V_P} \mathbf{F}\cdot d\mathbf{S} = \int_{V_P} S\, dV$$

Approximating as:

$$\frac{(\rho\phi)_P^{n+1} - (\rho\phi)_P^n}{\Delta t}V_P + \sum_f \mathbf{F}_f\cdot\mathbf{S}_f = S_P V_P$$

The challenge: computing the face flux $\mathbf{F}_f$ from cell-center values requires interpolation — the choice of interpolation scheme determines accuracy, stability, and conservation.

4.2 Gradient Reconstruction

Cell-center gradients are needed for the viscous fluxes and for second-order interpolation to faces. Least-squares gradient reconstruction:

$$\nabla\phi_P = \left(\sum_N \mathbf{w}_{PN}\Delta\mathbf{x}_{PN}\otimes\Delta\mathbf{x}_{PN}\right)^{-1}\sum_N \mathbf{w}_{PN}\Delta\mathbf{x}_{PN}\Delta\phi_{PN}$$

where sum is over all face neighbors N, and $\mathbf{w}_{PN}$ are weights. This is more accurate than the Green-Gauss theorem approach on skewed meshes.

4.3 Flux Limiters for Convection

High-order (2nd+ order) convection schemes can produce oscillations (Gibbs phenomenon) near sharp gradients. TVD (Total Variation Diminishing) limiters enforce monotonicity:

$$\phi_f = \phi_U + \psi(r)\frac{\phi_D - \phi_U}{2}$$ $$r = \frac{\phi_U - \phi_{UU}}{\phi_D - \phi_U}, \qquad \psi(r) = \text{limiter function}$$

Common limiters: Minmod ($\psi = \max(0, \min(1, r))$), Van Leer ($\psi = (r+|r|)/(1+|r|)$), Superbee. Each offers different tradeoffs between accuracy and monotonicity.

5. Linear System Solvers (Direct vs. Iterative)

🧑‍🎓

My Abaqus analysis says it's spending most of its time in the "direct solver" phase. What is a direct solver doing, and should I switch to an iterative solver?

🎓

A direct solver performs LU or Cholesky factorization — essentially Gaussian elimination with pivoting — and gives the exact solution (within floating-point precision) in one pass. It's robust and doesn't need tuning, but memory and time scale badly: for n unknowns, cost is roughly O(n^1.5) for 2D problems and O(n^2) for 3D — that's why a 10 million DOF model can take hours and 100 GB of RAM. Iterative solvers work differently: start with an initial guess and improve it iteratively using matrix-vector products, which only cost O(n) memory. For very large 3D models (millions of DOFs), preconditioned iterative solvers (PCG, GMRES, AMG) are much faster. Switch to iterative if: you have millions of DOFs, the problem is well-conditioned, and the solver supports it.

5.1 Direct Solvers: Cholesky Factorization

For symmetric positive definite (SPD) systems (elastic FEM without rigid body motion): $\mathbf{K} = \mathbf{L}\mathbf{L}^T$.

Steps: (1) Analyze fill-in pattern → optimal reordering (AMD, nested dissection). (2) Symbolic factorization → allocate sparse storage. (3) Numerical factorization O(n_fill). (4) Forward/back substitution for each RHS.

Direct SolverMatrix typeUsed in
MUMPSGeneral sparse, parallelOpenFOAM (optional), Code_Aster
PARDISOSPD and general, parallelAbaqus, Ansys, COMSOL
SuperLUGeneral sparse, sequential/distributedCalculiX, research codes
MA57/MA97Symmetric, parallelAbaqus (classic)

5.2 Iterative Solvers: Krylov Methods

Krylov methods build an approximation from the Krylov subspace $\mathcal{K}_k = \text{span}\{r_0, \mathbf{A}r_0, \mathbf{A}^2r_0, \ldots, \mathbf{A}^{k-1}r_0\}$:

5.3 Preconditioning

Convergence rate depends on the condition number $\kappa(\mathbf{A}) = \lambda_{\max}/\lambda_{\min}$. Preconditioning replaces $\mathbf{A}\mathbf{x} = \mathbf{b}$ with:

$$\mathbf{M}^{-1}\mathbf{A}\mathbf{x} = \mathbf{M}^{-1}\mathbf{b}, \qquad \kappa(\mathbf{M}^{-1}\mathbf{A}) \ll \kappa(\mathbf{A})$$
PreconditionerQualityCost per iterationParallel scaling
Jacobi (diagonal)Poor (for structured meshes)Very cheapPerfect
ILU(0)ModerateCheapModerate
ILU(k)Good (larger fill k)ModerateModerate
AMG (Algebraic Multigrid)Excellent (mesh-size independent)ModerateGood
ILU + domain decompositionGoodModerateExcellent

Algebraic Multigrid (AMG) is the state-of-the-art preconditioner for FEM structural problems — it achieves nearly O(n) computational complexity. Ansys uses MEBA (Mechanical AMG), OpenFOAM uses GAMG for pressure equations.

6. Eigenvalue Solvers

🧑‍🎓

For modal analysis of a 5 million DOF model, the solver finds 100 modes in a few minutes. How does it do that without computing the full n×n eigenproblem?

🎓

The key insight is that you only need the lowest eigenvalues — the first few dozen modes that actually have physical significance. The Lanczos algorithm does this beautifully: it builds a small tridiagonal matrix (say 200×200) by iterating with matrix-vector products involving K and M. The eigenvalues of this small matrix converge to the lowest eigenvalues of the original n×n problem. The accuracy improves as you extend the Lanczos sequence. For a 5-million DOF model, each Lanczos step costs one K-factorization (done once) plus vector operations — so computing 100 modes might cost the equivalent of 150 linear solves. That's exactly what Abaqus/Ansys do internally.

6.1 The Lanczos Algorithm

For $(\mathbf{K} - \lambda\mathbf{M})\boldsymbol{\phi} = 0$, the shift-and-invert form avoids instability for clustered or zero eigenvalues:

$$\text{Solve: } (\mathbf{K} - \sigma\mathbf{M})^{-1}\mathbf{M}\boldsymbol{q}_j = \mathbf{q}_{j+1}\beta_{j+1} + \mathbf{q}_j\alpha_j + \mathbf{q}_{j-1}\beta_j$$

After m steps, the original eigenvalues near shift σ are approximated by eigenvalues of the m×m tridiagonal matrix. Convergence of the extreme Ritz values is rapid (super-linear for well-separated eigenvalues).

6.2 AMLS and Component Mode Synthesis

For models with millions of DOFs where even Lanczos is too expensive, AMLS (Automated Multi-Level Substructuring) partitions the model into substructures, computes local eigenmodes, and assembles a reduced-order model. This can reduce a 10M DOF problem to a 50,000 DOF eigenvalue problem, with less than 1% error for the lowest modes. Abaqus, Nastran, and Ansys all offer this option.

7. Numerical Accuracy and Error Management

🧑‍🎓

How do I know if my FEM result is accurate enough? My manager always asks "is this mesh converged?" but I'm not sure how to answer rigorously.

🎓

The rigorous answer is: run the analysis at least three times with systematically refined meshes (say, element size h, h/2, h/4) and check that your quantity of interest (peak stress, natural frequency, displacement) is converging. If the change from level 2 to level 3 is less than your required accuracy (say 5%), you're done. For a more formal estimate, Richardson extrapolation gives you the exact solution in the limit — and the Grid Convergence Index (GCI) gives a confidence interval. Checking a single mesh is not sufficient; you need at least two levels of refinement to demonstrate convergence.

7.1 Richardson Extrapolation and GCI

Given results on three successively refined meshes with refinement ratio r:

$$p_\text{obs} = \frac{\ln\!\left(\dfrac{f_3 - f_2}{f_2 - f_1}\right)}{\ln r} \quad \text{(observed order)}$$ $$f_\text{exact} \approx f_1 + \frac{f_1 - f_2}{r^p - 1} \quad \text{(Richardson extrapolation)}$$ $$\text{GCI}_{12} = \frac{F_s|f_1 - f_2|/f_1}{r^p - 1} \quad \text{(grid convergence index)}$$

Safety factor $F_s = 1.25$ (recommended by ASME V&V standards). GCI provides a reliable error bound for the discretization error.

7.2 Sources of Error in CAE

Error sourceTypeMitigation
Mesh discretization errorTruncation (goes to 0 with refinement)Mesh convergence study, higher-order elements
Time discretization errorTruncation (goes to 0 with smaller Δt)Time step convergence study
Round-off / floating-pointGrows with n for ill-conditioned systemsCheck condition number; use double precision
Model idealization errorNot reduced by refinementGeometry simplification validation; compare to test
Material parameter uncertaintyInput errorSensitivity study; use measured data, not handbook values
Convergence error (iterative)Solver residualReduce tolerance; monitor physical quantity, not just residual

7.3 Condition Number and Ill-Conditioned Systems

The condition number of the stiffness matrix:

$$\kappa(\mathbf{K}) = \|\mathbf{K}\|\,\|\mathbf{K}^{-1}\| \approx \frac{\lambda_\text{max}}{\lambda_\text{min}}$$

For structural FEM with linear elements: $\kappa \sim (L/h)^2$ — scales with the square of the mesh fineness. For double precision (64-bit), significant digits lost = $\log_{10}(\kappa)$. With κ = 10⁸ and 15 significant digits, you have 7 digits of accuracy — usually fine. With κ = 10¹² (very fine mesh or near-singular problem), only 3 digits remain — dangerous.

8. Solver Selection Guide

🧑‍🎓

When I open Abaqus, I see Abaqus/Standard and Abaqus/Explicit. And OpenFOAM has like 20 different solver options. How do I choose?

🎓

The fundamental split in structural analysis: implicit (Standard) vs. explicit (Explicit). Implicit is better for: static, quasi-static, low-frequency dynamics, anything requiring large time steps — Abaqus/Standard, Ansys Mechanical. Explicit is better for: high-speed impact, crash, metal forming, any problem with severe contact or very short event duration — Abaqus/Explicit, LS-DYNA. For CFD: steady incompressible → SIMPLE-based (OpenFOAM simpleFoam, Fluent pressure-based steady). Transient incompressible → PISO or PIMPLE (OpenFOAM pimpleFoam). Compressible → density-based (OpenFOAM rhoCentralFoam, Fluent density-based).

8.1 Structural Analysis Solver Selection

Analysis typeRecommended approachSolver examples
Linear staticDirect sparse (Pardiso, MA57)Abaqus/Standard, Ansys Mechanical, CalculiX
Nonlinear staticN-R + direct solverAbaqus/Standard, Marc, Code_Aster
Modal analysisLanczos (Abaqus), PCG Lanczos (Ansys)Abaqus, Ansys, Nastran
Transient, low frequencyImplicit HHT-α; AMG preconditionedAbaqus/Standard Dynamic, Ansys Transient
Impact/crashExplicit central difference; small ΔtLS-DYNA, Abaqus/Explicit, PAM-CRASH
Large-scale (10M+ DOF)Iterative + AMG; consider domain decomp.Ansys Mechanical (MEBA), OpenRadioss

8.2 CFD Solver Selection

Flow typeAlgorithmSolver
Steady incompressible RANSSIMPLE/SIMPLECsimpleFoam, Fluent steady pressure-based
Transient incompressiblePISO/PIMPLEpimpleFoam, pisoFoam
Natural convectionSIMPLE + BoussinesqbuoyantSimpleFoam, Fluent steady
Subsonic compressible (Ma<0.3)Density-based or low-Ma correctionrhoPimpleFoam, Fluent
Transonic/supersonicDensity-based (Roe, AUSM)rhoCentralFoam, Fluent density-based
LES/DESExplicit or low-storage Runge-KuttapimpleFoam (large Δt), Fluent LES
Key Takeaways
  • PDE type (elliptic/parabolic/hyperbolic) determines appropriate numerical methods
  • FEM: variational foundation; converges provably at h^p rate; best for structural/EM
  • FVM: exact cell conservation; handles arbitrary meshes; industry standard for CFD
  • Direct solvers: O(n^1.5–2) cost, robust; iterative + AMG: O(n) cost, requires tuning
  • Mesh convergence study (GCI) is the only rigorous way to quantify discretization error
  • Implicit integration for low-frequency dynamics; explicit for impact/crash

Related Interactive Tools

Written by NovaSolver Contributors (Anonymous Engineers & AI) | CAE Technical Encyclopedia