3. Design of experiments for CAE
Before a surrogate model can be trained, the CAE solver must be evaluated at a set of design points that adequately represents the design space. This set is the design of experiments (DoE), and its quality determines the ceiling of surrogate accuracy: no regression or Gaussian process can recover behavior that the sample set never probed. In CAE practice the DoE is also the dominant cost driver, since every point is a full simulation. The goal is therefore to extract maximum information per simulation by choosing points that are spread across the space, avoid clustering, and respect geometric or manufacturing constraints.
Why Random Sampling Is Not Enough
Monte Carlo (pure random) sampling is unbiased but suffers from clustering and voids: with 50 points in a 5-dimensional unit cube, random sampling routinely leaves large unsampled regions and produces near-duplicate points. For surrogate training this is wasteful. Structured low-discrepancy sequences and stratified designs address this by enforcing better coverage while retaining flexibility.
Latin Hypercube Sampling (LHS)
LHS stratifies each of the d dimensions into n equal-probability intervals and places exactly one sample per interval per dimension, then randomly permutes the interval assignments across dimensions. This guarantees one-dimensional projection uniformity: every variable is sampled across its full range with no gaps. For a 5-variable, 60-point design, each variable is divided into 60 strata and each stratum receives exactly one point.
A critical caveat: LHS guarantees good marginal coverage but not good joint coverage. Two LHS designs with identical one-dimensional histograms can differ dramatically in pairwise correlation and in the largest empty region. This is why LHS is almost always paired with an optimization criterion (maximin or correlation minimization) rather than used raw. In Python, scipy.stats.qmc.LatinHypercube generates the base design, and a subsequent optimization pass improves it.
Sobol and Halton Sequences
Both are low-discrepancy sequences that fill the space deterministically and progressively: any prefix of the sequence is itself well distributed, so the design can be extended without discarding earlier runs. Sobol sequences use base-2 digital nets and generally exhibit the best uniformity in moderate dimensions (up to roughly 10–20 variables), making them the default choice for CAE DoE in tools such as Dakota and Ansys optiSLang. Halton sequences use van der Corput radical-inverse construction with pairwise-coprime bases; they are simple and effective in low dimensions but show correlation artifacts in higher dimensions unless scrambled or leaped.
The practical distinction: Sobol and Halton are nested (adding points preserves prior coverage), whereas optimized LHS is not. If the simulation budget may grow incrementally, a scrambled Sobol sequence is usually preferable. Scrambling (Owen or Matousek) also enables variance estimation and removes the regularity that can alias with periodic geometry.
Space-Filling Criteria
To compare candidate designs quantitatively, three criteria dominate:
- Maximin distance — maximize the minimum pairwise Euclidean distance between points. This directly penalizes clustering and is the most widely used criterion for CAE DoE.
- Centered L2 discrepancy — measures deviation from uniform distribution; lower is better and it captures higher-order uniformity that maximin misses.
- Maximum correlation — minimize the largest absolute pairwise Pearson correlation between input columns, ensuring variables are not confounded.
In practice one optimizes a weighted combination. A common workflow: generate 10,000 candidate LHS designs, score each by maximin distance, and retain the best. The improvement over a single random LHS is often 20–40% in minimum spacing for the same point count.
Handling Constrained Design Spaces
CAE design spaces are rarely simple boxes. Constraints arise from packaging envelopes, manufacturability (minimum wall thickness), and coupled geometric relations (e.g., rib height ≤ 0.8 × cavity depth). Naively sampling the bounding box and rejecting infeasible points wastes simulations and biases coverage toward the feasible region's interior. Three robust strategies exist:
- Rejection with repair — sample the box, discard infeasible points, and refill until n feasible points remain. Simple but inefficient when the feasible fraction is below ~20%.
- Constrained LHS via optimization — start from a box LHS and iteratively move infeasible points toward the feasible region while maximizing the maximin criterion. This preserves stratification better than rejection.
- Mapping from a unit hypercube — define a smooth bijective map from the unit cube to the feasible region (e.g., for a simplex or a thickness-bounded domain) and sample in the cube. This is the cleanest approach when the constraint has an analytic form.
t ∈ [2, 8] mm and rib height h ∈ [5, 30] mm subject to h ≤ 4t, the feasible region is a trapezoid. Sampling the 6×25 mm box and rejecting violations discards roughly 30% of points; a constrained LHS that projects violators onto h = 4t retains all 60 points and keeps the boundary well sampled, which matters because optima frequently lie on active constraints.Choosing a Strategy
The decision depends on dimensionality, budget, and whether the design must be extended. The diagram below summarizes the selection logic and the resulting coverage behavior.
Practical Workflow and Verification
A reproducible DoE setup for a 5-variable CAE study with a 60-simulation budget proceeds as follows. First, normalize all variables to [0,1] using their physical bounds. Second, generate a scrambled Sobol sequence of 64 points (a power of two preserves the digital-net structure) and discard the last 4 to reach 60. Third, compute the minimum pairwise distance and the maximum absolute column correlation; accept the design if minimum distance exceeds 0.15 in normalized units and correlation stays below 0.1. Fourth, map points back to physical units and check constraint feasibility; if violations occur, apply the constrained-LHS projection. Fifth, export the point table to the solver batch script.
from scipy.stats.qmc import Sobol
import numpy as np
d, n = 5, 64
sampler = Sobol(d=d, scramble=True, seed=42)
X = sampler.random(n)[:60] # normalized [0,1]^d
# space-filling diagnostics
from scipy.spatial.distance import pdist
dmin = pdist(X).min()
corr = np.abs(np.corrcoef(X.T) - np.eye(d)).max()
print(f"min distance = {dmin:.3f}, max |corr| = {corr:.3f}")
Typical failure symptoms and their causes: a minimum distance below 0.05 signals insufficient scrambling or too few points for the dimension; a maximum correlation above 0.3 indicates an unscrambled Halton sequence aliasing in higher dimensions; and a large fraction of infeasible points after mapping means the bounding box was defined too loosely and should be tightened before sampling. Verifying these three numbers before launching simulations costs seconds and prevents wasted solver runs.
The DoE is the foundation on which every subsequent surrogate and optimization step rests. A well-chosen, constraint-aware, space-filling design with documented diagnostics gives the surrogate the best possible chance of generalizing, and it makes the simulation budget auditable rather than a matter of guesswork.