3. Design of experiments for CAE

A surrogate model is only as good as the data it is trained on. In CAE-driven design optimization, each training sample typically requires a full simulation run — a nonlinear structural solve, a CFD iteration to convergence, or a transient thermal analysis — costing minutes to hours. The design of experiments (DoE) is therefore not a statistical formality but the primary lever for controlling surrogate accuracy per unit of simulation budget. This section covers how to choose sample locations in the design space, how to guarantee coverage with space-filling designs, and how to spend the remaining budget where the surrogate is weakest through adaptive sampling.

From Design Space to Sample Matrix

Start by formalizing the design space. Each design variable xi is bounded by a lower and upper limit derived from manufacturing constraints, packaging envelopes, or regulatory limits, and may be continuous, discrete (e.g., ply counts, standard sheet thicknesses), or categorical (e.g., material grade). Normalize every variable to [0, 1] before sampling so that distances are comparable across variables with different physical units:

x_norm = (x - x_min) / (x_max - x_min)

This normalization matters: a Latin hypercube that treats a 0.5 mm tolerance variable and a 200 mm span variable on their raw scales will effectively ignore the small-range variable. Record the normalization constants alongside the sample matrix — they are required to map surrogate predictions back to physical units and to reproduce the DoE later.

Baseline Strategies and Their Limits

Full factorial designs scale as kn and become infeasible beyond a handful of variables. One-at-a-time (OFAT) sweeps are cheap but cannot reveal interactions, which dominate in CAE problems — a rib height that helps stiffness at one wall thickness may hurt it at another. Random Monte Carlo sampling is unbiased but clusters by chance, leaving large voids in the design space and producing surrogate errors that vary unpredictably across the domain. For surrogate training, the practical baseline is a space-filling design, optionally refined by adaptive infill.

Space-Filling Designs

Latin hypercube sampling (LHS) divides each variable's range into N equal strata and places exactly one sample per stratum per variable, with the pairing across variables randomized. This guarantees one-dimensional projection coverage at any sample count. However, plain LHS can still produce poor two-dimensional projections — two points may sit close together in the full space. The standard remedy is to optimize the sample matrix against a spacing criterion, most commonly the maximin criterion: maximize the minimum pairwise Euclidean distance.

import numpy as np
from scipy.stats import qmc
from scipy.spatial.distance import pdist

def maximin_lhs(n_vars, n_samples, n_candidates=200, seed=0):
    rng = np.random.default_rng(seed)
    best_D, best_X = -np.inf, None
    for _ in range(n_candidates):
        X = qmc.LatinHypercube(d=n_vars, seed=rng).random(n_samples)
        D = pdist(X).min()          # minimum pairwise distance
        if D > best_D:
            best_D, best_X = D, X
    return best_X, best_D

X, D = maximin_lhs(n_vars=5, n_samples=40, seed=42)
print(f"min pairwise distance = {D:.4f}")

This candidate-selection loop is a lightweight approximation of a true maximin optimization; for production use, swap in a proper optimizer (e.g., enhanced stochastic evolutionary algorithm) or use a low-discrepancy sequence such as a Sobol sequence, which offers better uniformity than random LHS at the same sample count and is naturally extensible — appending samples preserves the low-discrepancy property, which matters when the budget grows incrementally.

Two practical cautions apply. First, space-filling designs assume the response varies comparably across the normalized domain; if one region is known to be highly nonlinear (e.g., near a buckling threshold), uniform coverage wastes samples elsewhere. Second, discrete and categorical variables break the continuous distance metric — handle them by sampling levels explicitly and stratifying the continuous variables within each level combination, or by using a Gower-type distance that mixes continuous and categorical contributions.

Adaptive Sampling: Spending Budget Where It Matters

Once an initial space-filling set (typically 10–20 samples per variable, capped by budget) has trained a first surrogate, adaptive sampling adds points sequentially. The two dominant infill criteria are:

  • Exploitation (prediction-error driven): place the next sample where the surrogate's estimated error is largest. For Gaussian process (Kriging) surrogates, this is the predictive standard deviation σ(x); for other surrogates, use a cross-validation error field or a holdout residual map.
  • Exploration (objective driven): place the next sample near the predicted optimum or along the predicted Pareto front, to sharpen the region that actually drives the design decision.

The expected improvement (EI) criterion blends both: it weights the predicted improvement over the current best by the probability that the prediction is trustworthy, naturally balancing exploitation of promising regions against exploration of uncertain ones. A common practical loop is:

  1. Train the surrogate on the current sample set.
  2. Evaluate the infill criterion on a dense candidate grid (e.g., 10,000 Sobol points) or solve a continuous optimization for its maximum.
  3. Run the CAE simulation at the selected point and append it to the training set.
  4. Stop when the maximum EI falls below a threshold, the cross-validated error meets the target, or the budget is exhausted.
Batch infill is often necessary because CAE runs are queued on a cluster. Select the top-k candidates by EI but enforce a minimum separation distance (e.g., 0.05 in normalized space) between them, otherwise the batch collapses onto a single promising point and wastes simulations.

Worked Example: A Five-Variable Bracket Study

Consider a topology-optimized mounting bracket with five continuous design variables: rib height (20–60 mm), wall thickness (2–6 mm), fillet radius (3–12 mm), bolt-hole diameter (6–10 mm), and a rib angle (30–75°). The response of interest is peak von Mises stress under a 2 kN load, with a constraint that mass stay below 1.8 kg. The simulation budget is 60 runs.

A reasonable allocation is 40 maximin-LHS samples for the initial surrogate, followed by 20 adaptive infill iterations using EI on the stress response with a feasibility penalty on mass. After the initial 40 runs, inspect the leave-one-out cross-validation R² and normalized RMSE; if the stress surrogate shows R² below roughly 0.9, the response is likely too nonlinear for the current sample density and the infill budget should be shifted toward error-driven sampling rather than objective-driven sampling. A useful diagnostic is to plot the predicted stress field over the design space and look for sharp ridges — these indicate where the surrogate is extrapolating between distant samples and where the next infill points should go.

Adaptive sampling can over-converge on a local optimum if the initial space-filling set is too sparse: EI will keep refining a region that looks promising only because the surrogate has never seen the true global basin. Keep at least 30–40% of the total budget in the initial space-filling design, and verify the final surrogate against an independent holdout set of 5–10 random samples that were never used for training or infill.
Maximin LHS (initial DoE) x₁ (normalized) x₂ train Surrogate error field σ(x) high σ → candidate for infill EI After infill orange = adaptive infill points initial space-filling samples adaptive infill samples high predictive uncertainty DoE pipeline: space-filling coverage → error/objective-driven infill → converged training set

Choosing the Strategy in Practice

The decision hinges on three factors: dimensionality, budget, and the smoothness of the response. For low-dimensional, smooth responses (e.g., 3–5 variables, linear-elastic stress), a maximin LHS of 10–15 samples per variable is usually sufficient and adaptive sampling adds little. For high-dimensional or highly nonlinear responses (buckling, contact, turbulence), start with a Sobol sequence for uniformity, then allocate 30–50% of the budget to EI-driven infill. When the design space contains discrete variables, stratify the continuous sampling within each discrete level combination and treat each combination as a separate sub-design. Finally, always reserve a holdout set — 5–10 samples drawn independently of the training DoE — and report the surrogate's error on it; a surrogate that looks excellent in cross-validation but fails on the holdout is a sign that the infill has overfit the training distribution, and the remedy is to rebalance the budget toward space-filling coverage.