vmec_jax.profiles

VMEC profile evaluation.

This module implements the VMEC2000 profile logic used by the bundled examples: power-series, two-power, and tabulated spline profiles for pressure, iota, and toroidal current. The spline boundary conditions follow STELLOPT/VMEC2000’s spline_cubic.f and spline_akima.f conventions: endpoint derivatives are fixed by a quadratic fit to the first/last three knots.

We intentionally keep this code: - dependency-light (NumPy for parsing, JAX-compatible math via vmec_jax._compat.jnp) - pure (no I/O, no global state) - easy to extend later (additional VMEC profile families, pedestal variants, etc.)

Functions

eval_profiles(cfg, s_grid)

Evaluate VMEC profiles on a radial grid.

pressure_profile_to_vmec_am(...[, ...])

Convert a pressure profile in Pascals to VMEC AM/PRES_SCALE.

profile_to_power_series_coeffs(profile)

Return concrete ascending polynomial coefficients for simple profiles.

profiles_from_indata(indata)

Extract and normalize profile inputs from an InData.

standard_finite_beta_profiles(beta_percent, *)

Return the standard finite-beta profile bundle used in stage-one runs.

standard_pressure_profile(beta_percent)

Return only the standard finite-beta pressure profile in Pascals.

with_pressure_profile(indata, ...[, ...])

Return a copy of indata with a polynomial pressure profile applied.

Classes

Profile()

Small JAX-compatible radial-profile base class.

ProfileInputs(pmass_type, piota_type, ...[, ...])

Profile-related inputs extracted from &INDATA.

StandardFiniteBetaProfiles(beta_percent, ne, ...)

Density, temperature, and pressure profiles for finite-beta studies.