Circular-coil baselines for Coilstellaration

Two geometric baselines for the Coilstellaration benchmark, which asks for a stellarator coilset given a plasma boundary and four engineering targets. Neither has trained parameters. Both return n_coils_per_half_period planar circular coils in planes of constant toroidal angle, evenly spaced across the half field period, each carrying the current that gives 1 T on the circle of radius R0, where R0 is the (m = 0, n = 0) coefficient of boundary_r_cos.

File Centre of each coil Radius
model.onnx the midplane circle of radius R0 0.3 R0
clearance.onnx the plasma cross-section at the coil's angle the smallest that keeps 1.03 times the coil-plasma target between the coil and the boundary, enlarged up to 0.45 R0 where 1.05 times the coil-coil target allows

model.onnx reads R0 alone. clearance.onnx evaluates the boundary on a grid for each cross-section's centre, the minor radius and the clearance, and reads the coil-coil and coil-plasma targets from requirement_metrics.

Interface

Both graphs follow the benchmark's ONNX contract. Their inputs are boundary_r_cos and boundary_z_sin (float32, [n_pol, n_tor]), requirement_metrics (float32, [4]), and n_field_periods and n_coils_per_half_period (int64 scalars). Their outputs are coil_x_n, coil_y_n and coil_z_n (float32, [n_coils, 3], Fourier order 1 in DESC's [sin(1), const, cos(1)] layout) and currents (float32, [n_coils], amperes). The metadata key supported_tracks is fixed_shape,variable_shape.

import numpy as np
import onnxruntime as ort
from huggingface_hub import hf_hub_download

session = ort.InferenceSession(hf_hub_download("phanerozoic/coilstellaration-circle-baseline", "clearance.onnx"))
r_cos = np.zeros((5, 9), np.float32)
z_sin = np.zeros((5, 9), np.float32)
r_cos[0, 4], r_cos[1, 4], z_sin[1, 4] = 1.0, 0.15, 0.15
coil_x_n, coil_y_n, coil_z_n, currents = session.run(
    ["coil_x_n", "coil_y_n", "coil_z_n", "currents"],
    {
        "boundary_r_cos": r_cos,
        "boundary_z_sin": z_sin,
        "requirement_metrics": np.array([0.4, 0.8, 3.0, 0.01], np.float32),
        "n_field_periods": np.asarray(3, np.int64),
        "n_coils_per_half_period": np.asarray(5, np.int64),
    },
)

make_circle_onnx.py and make_clearance_onnx.py build the files with the onnx package.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train phanerozoic/coilstellaration-circle-baseline