Skip to content

Equilibrium - BUGFIX - Build the two-pass ψ grid from kinetic profiles that have no omega_E #614

Description

@d-burg

A run whose kinetic file has no omega_E now stops in the equilibrium stage on the default grid (mpsi = 0), even when only SLAYER uses the profiles. Before #581, the same deck ran: SLAYER warned and took Ω_E = 0. The HDF5 kinetic schema treats omega_E as optional.

Reproduced on develop 4f33fcf60:

  • Deck: examples/DIIID-like_SLAYER_example.
  • Kinetic file: its kinetic file copied without the omega_E dataset (n_e, n_i, T_e, T_i, chi_e, chi_i and chi_phi kept).
  • Result: main fails with ErrorException: kinetic profiles (...) missing required 'omega_E'.

Stack, innermost first:

kinetic_profile_splines        Equilibrium/KineticProfiles.jl:405   (_need(data.omega_E, "omega_E"))
ntv_profiles                   KineticForces/Utils.jl:304
maybe_reform_equilibrium       GeneralizedPerturbedEquilibrium.jl:498
main_from_inputs               GeneralizedPerturbedEquilibrium.jl:262

Cause:

  • maybe_reform_equilibrium builds the NTV view of the attached profiles (KineticForces.ntv_profiles) whenever equil.kinetic !== nothing. It feeds refined_psi_grid(kin=...) and implied_knot_count as well as the kinetic-resonance nodes, so it is built before any check on the kinetic source.
  • The NTV view requires omega_E.
  • The same path runs for a scripting-API solve on an equilibrium with such profiles attached.
  • prepare_force_free_states! likewise builds the NTV view whenever kinetic_factor > 0, including kinetic_source = "fixed", which does not need profiles.

Suggested fix:

  • Give the grid refinement a view that tolerates missing NTV fields, or pass kin only when the NTV fields are present.
  • Build the NTV view in FFS preparation only for kinetic_source = "calculated".
  • Add a test that runs maybe_reform_equilibrium with an omega_E-less KineticProfileData. The current omega_E-less test covers only Runner._slayer_profiles.

Found in review of #581.

Activity

  1. added this to the GPEC v2.0.0 milestone on Oct 30, 2026
  2. added theissue type on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions