2. CAE simulation fundamentals for surrogate modeling

A machine-learning surrogate is only as trustworthy as the simulation data it learns from. Before choosing a network architecture or a sampling strategy, you must understand what the CAE solver actually computes, how the continuous physics is reduced to a finite numerical problem, and which quantities the surrogate is expected to reproduce. This section builds that foundation using a structural linear-elastic case as the running example, because the same conceptual chain — governing equations, discretization, boundary conditions, and quantities of interest (QoIs) — applies to thermal, fluid, and multiphysics solvers as well.

From Governing Equations to a Solvable System

Every CAE analysis begins with a boundary value problem (BVP). For static linear elasticity on a domain Ω, the strong form is the equilibrium equation

∇ · σ + b = 0        in Ω
σ = C : ε             (constitutive law)
ε = ½(∇u + ∇uᵀ)      (small-strain kinematics)
u = ū                 on Γ_D   (Dirichlet / displacement BC)
σ · n = t̄             on Γ_N   (Neumann / traction BC)

Here u is the displacement field, σ the Cauchy stress, ε the strain, C the fourth-order elasticity tensor, b body force, n the outward unit normal, and Γ_D, Γ_N the Dirichlet and Neumann boundaries. The strong form demands pointwise satisfaction of derivatives, which is impractical for arbitrary geometry. The finite element method therefore recasts it in weak (variational) form: multiply by a test function v that vanishes on Γ_D, integrate by parts, and require

∫_Ω ε(v) : C : ε(u) dΩ = ∫_Ω v · b dΩ + ∫_Γ_N v · t̄ dΓ   ∀ v

This weak form is the actual object the solver discretizes. Understanding it matters for surrogate work because it tells you which inputs enter the physics: material tensor C, geometry (through Ω and the boundary partition), loads b and t̄, and prescribed displacements ū. These are precisely the parameters your surrogate will be trained to map to outputs.

Discretization: Mesh, Shape Functions, and the Stiffness System

The domain is partitioned into elements (triangles, quads, tetrahedra, hexahedra). Within each element the displacement is interpolated from nodal values via shape functions N_i: u(x) ≈ Σ N_i(x) u_i. Substituting into the weak form yields the assembled linear system

K u = f
K = Σ_e ∫_Ωe Bᵀ C B dΩ        (global stiffness matrix)
f = Σ_e (∫_Ωe Nᵀ b dΩ + ∫_ΓN Nᵀ t̄ dΓ)   (load vector)

where B is the strain-displacement matrix derived from shape-function gradients. The solver factors K and solves for nodal displacements u. Two practical consequences follow for surrogate modeling. First, mesh resolution controls accuracy: stress concentrations at fillets or holes require local refinement, and a surrogate trained on coarse-mesh data will inherit that bias. Second, the number of degrees of freedom (DOF) determines simulation cost, which in turn limits how many training samples you can afford — the central trade-off of surrogate workflows.

When generating training data, keep the mesh topology and refinement pattern consistent across samples unless mesh variation is itself a design variable. Inconsistent meshes introduce discretization noise that the surrogate will mistake for physical response.

Boundary Conditions: The Inputs That Define the Problem

Boundary conditions are not incidental settings; they are the parameters that most strongly shape the solution field and therefore the surrogate's input space. In the elasticity example, a cantilever bracket might be fixed at the root (u = 0 on Γ_D) and loaded with a distributed pressure or a point force at the tip (t̄ on Γ_N). For a thermal problem, the analogues are prescribed temperature and prescribed heat flux or convection. For CFD, they are inlet velocity, outlet pressure, and wall no-slip conditions.

For surrogate construction, classify each BC as either fixed (constant across all samples) or parametric (varied during sampling). A common mistake is to vary a load magnitude while silently changing its application region, which conflates two parameters and degrades surrogate generalization. Document the BC parameterization explicitly, including units and sign conventions. If your coordinate system defines tension as positive, state it once and keep it consistent in every sample and every plot.

Quantities of Interest: What the Surrogate Must Predict

The QoI is the scalar or field output the downstream decision depends on. Typical structural QoIs include maximum von Mises stress, tip deflection, first natural frequency, and mass. Thermal analyses may target peak temperature or heat flux; CFD may target pressure drop or drag coefficient. The choice of QoI drives both the sampling plan and the surrogate's output layer.

Two distinctions matter. A field QoI (the full stress distribution) requires a high-dimensional output and often dimensionality reduction such as POD before regression. A scalar QoI (peak stress) permits a simple regression model but discards spatial information. Many engineering workflows need both: a scalar for optimization and a field for design review. Decide early, because it determines whether your surrogate is a regressor or a field-to-field operator.

Governing Equations ∇·σ + b = 0 σ = C : ε ε = ½(∇u+∇uᵀ) strong form → weak form Discretization mesh + shape functions K u = f Bᵀ C B integration DOF count → cost Boundary Conditions Γ_D: u = ū Γ_N: σ·n = t̄ fixed vs parametric defines input space QoI σ_max, u_tip f₁, mass scalar vs field output layer choice CAE Solver Execution assemble K, apply BCs, factorize, solve → u, σ, ε fields Design of Experiments LHS / Sobol over parameters Training Dataset X = [geometry, material, loads, BC params] → Y = [QoI] Surrogate Model fit X → Y Validation: hold-out CAE runs, error vs. QoI tolerance if error too high → refine mesh, resample, or enrich features

Worked Example: A Parametric Bracket Study

Consider a steel cantilever bracket, 200 mm long, 40 mm wide, 8 mm thick, fixed at one end and loaded by a vertical tip force. The design parameters are fillet radius r ∈ [4, 12] mm and tip force F ∈ [200, 800] N. Material: E = 210 GPa, ν = 0.3, yield strength σ_y = 355 MPa. The QoI is maximum von Mises stress at the fillet, with a constraint σ_max ≤ 250 MPa.

A reproducible workflow proceeds as follows. First, build a parametric CAD model driven by r, mesh it with quadratic tetrahedra and a refined fillet region (target element size 1 mm near the fillet, 4 mm elsewhere), and verify mesh convergence by comparing σ_max at two refinement levels — accept when the change is below 3%. Second, apply the fixed support on the root face and the tip force as a distributed load on the end face; keep the load direction and sign convention constant. Third, run a Latin hypercube sample of 40 design points over (r, F), solve each, and record σ_max. Fourth, fit a Gaussian-process or polynomial surrogate and validate on 8 held-out CAE runs.

Expected observable behavior: σ_max increases roughly linearly with F and decreases nonlinearly as r grows, with the strongest sensitivity at small radii where the stress concentration factor is highest. If the surrogate's validation error exceeds, say, 5% of the QoI range, the usual causes are insufficient fillet mesh refinement (discretization noise), too few samples near the small-radius corner, or a load application region that shifted between runs. Check these before adding model capacity.

Never train a surrogate on QoIs extracted from unconverged meshes. Discretization error is systematic, not random, and a flexible model will fit it as if it were physics — producing a surrogate that is accurate on the training mesh and wrong on any other.

What This Means for Surrogate Design

The simulation chain fixes the surrogate's contract. The governing equations and constitutive model define which material parameters are legitimate inputs. The discretization defines the fidelity ceiling and the cost per sample. The boundary-condition parameterization defines the input space and its dimensionality. The QoI defines the output type and the error metric that matters. Get these four elements explicit and documented before any learning begins; most surrogate failures in CAE practice trace back to an under-specified simulation contract rather than to the regression algorithm itself.