Computing Library › Applications
Applications

Worked Example: A Space-Filling Design

A short, concrete look at how a space-filling design spreads sample points across a configuration space before any simulation runs.

The setup

Suppose a design study varies three parameters over normalized ranges: magnetic field, density, and triangularity, each from 0 to 1. Running every combination on a grid would need many points and still leave gaps. A Latin hypercube spreads a fixed number of points so that each parameter is evenly sampled across its range.

Generating the samples

Kronos motion — design envelope

A Latin hypercube divides each parameter into equal bins and places exactly one sample in each bin, then shuffles the assignments across parameters so the points fill the space rather than lining up. The result is good coverage from relatively few points.

python
import numpy as np

def latin_hypercube(n, d, seed=0):
    rng = np.random.default_rng(seed)
    # one sample per bin, per dimension
    cut = np.linspace(0, 1, n + 1)
    pts = np.empty((n, d))
    for j in range(d):
        u = rng.uniform(size=n)
        pts[:, j] = cut[:n] + u * (1.0 / n)
        rng.shuffle(pts[:, j])
    return pts

samples = latin_hypercube(8, 3)
print(samples.shape)  # (8, 3): 8 candidates in 3D

What the samples become

Each row is one candidate configuration. In a real study these would be fed to the physics chain, one simulation per row, and the outputs used to train a surrogate and to run sensitivity analysis.

Why this matters

Good coverage from few points is what makes exploring the configuration space affordable. The design is chosen before any expensive simulation runs, so the compute budget is spent where it reveals the most, following the design-of-experiments principle.

Honesty

This is an illustration of the method, not Kronos design parameters; the frozen numbers for the Hyperion breeder come from the full physics chain, not a toy example.