NTX
NTX is a JAX-native monoenergetic neoclassical transport solver based on the Legendre-space drift-kinetic formulation in Javier Escoto’s PhD thesis, arXiv:2510.27513.
NTX provides:
built-in analytic sample surfaces
DKES-style Boozer inputs
VMEC
woutinputs throughvmexBoozer
boozmninputs throughbooz_xform_jaxdirect NEOPAX-style scan and HDF5 mapping helpers
CPU and GPU execution through the same JAX solver path
Fastest Start
Install the package:
pip install ntx
Run the bundled analytic sample:
ntx examples/example_surface.toml --plot
That solves one monoenergetic case, prints a Rich summary, and writes a NetCDF payload plus a PDF summary panel.
Inspect that output graphically:
python examples/plot_output_file.py examples/outputs/example_surface.nc
Main User Entry Point
ntx input.toml
What The Code Solves
NTX solves the normalized local monoenergetic drift-kinetic equation for the non-adiabatic response on a single flux surface,
where \xi=v_\parallel/v, \mathcal J is the Boozer-coordinate Jacobian, and
C_L is the Lorentz pitch-angle-scattering operator. Speed is fixed. The two
source systems are the radial-transport drive and the parallel-flow drive used
by downstream bootstrap-current closures. Projecting this equation onto
Legendre polynomials in pitch angle gives the system solved by the code,
on a single stellarator flux surface, then evaluates the monoenergetic coefficients
The CLI is tuned for production solves and output inspection. The imported JAX lane is tuned for scans, autodiff, optimization, NEOPAX coupling, and parallel-throughput workflows.
Documentation Guide
Install: package installation and extras
Input File: full TOML schema, outputs, and CLI behavior
Physics Model: the equations and normalizations
Physics Gates: analytical identities and benchmark acceptance rules
Geometry And Inputs: how surfaces are loaded and evaluated
Numerics And Algorithms: discretization, dense solve, and JAX/parallel execution
Resolution And Convergence: residual semantics, Nyquist gates, and adaptive angular/Legendre ladders
Source-Code Map: where each model component lives in
src/API Reference: generated public module, class, and function docs
Glossary: coordinates, normalizations, grids, and workflow terms
Autodiff: inverse problems, derivative audits, and prepared derivatives
Profiles: ambipolar electric-field and reduced current-response workflows
Examples: runnable workflows and figure generators
Validation: current status and benchmark philosophy
Testing And QA: test structure and quality gates
Benchmark Matrix: claim-to-script/test/artifact mapping
Repository Hygiene: local cleanup and commit-batch plan
Pre-Merge Ship Checklist: release blockers and acceptance criteria
NEOPAX: imported database-building workflows
GPU: hardware execution notes
Performance: throughput guidance and scaling figures
Research Roadmap: next research-grade development lanes
Manuscript Figures: publication-ready figure inventory
Literature: thesis and package links
Release Notes 0.2.4: current release notes
Contents
- Installation
- Input File
- Physics Model
- Scope Of The Model
- Coordinate And Field Representation
- Geometric Quantities Used By The Solver
- Drift-Kinetic Equation Treated By NTX
- Monoenergetic Legendre System
- Source Systems
- Nullspace Constraint
- Transport Coefficients
- Onsager Symmetry
- Electric-Field Normalization
- What Downstream Tools Consume
- Database Bridge And Bootstrap-Current Observable
- Closure-Model Gates
- Physics Gates
- Geometry And Inputs
- Algorithm
- Numerics And Algorithms
- Resolution and convergence
- Source-Code Map
- Core Solver Modules
- Refactoring Target
- Equation-To-Code Mapping
- Fourier Representation Of
B - Boozer Jacobian And Field Components
- Radial-Drift Spatial Factor
- Legendre-Space Block System
- Nullspace Fix
- Flux-Surface Averages And Transport Coefficients
- Electric-Field Normalization
- Scan And Differentiable Workflows
- Profile Forces And Ambipolarity
- Publication Figures
- API Reference
- Glossary
- Autodiff
- Inverse Problem Example
- Derivative Audit
- Prepared-Derivative Benchmark
- Geometry-Control Derivative Benchmark
- File-Backed Geometry-Control Benchmark
- Boundary Forward-Mode Benchmark
- Implicit Equilibrium Forward-Mode Benchmark
- Explicit-Relaxed Equilibrium Benchmark
- Geometry-Family Breadth Summary
- Geometry-Family Transport Convergence
- NEOPAX-Style Profile Example
- Profile Uncertainty Audit
- Robust Bootstrap-Current Optimization
- Parallel Execution
- Profiles
- Scope
- Main Objects
- Reduced Monoenergetic Model
- Main Helpers
- Typical Workflow
- Example Script
- Control-Parameter Families
- Differentiable Profile-Control Optimization
- Low-Dimensional Radial Basis Controls
- Profile Transport Relaxation Loop
- Primitive Density And Temperature Transport
- Literature-Anchored Primitive-To-Force Audit
- Source-Code Map
- Examples
- 1. Simplest CLI Run
- 2. DKES-Style CLI Run
- 3. VMEC CLI Run
- 4. Open And Plot An Output File
- 5. Python Single-Case Solve
- 6. NEOPAX Mapping
- 7. Bootstrap Current From VMEC Or Boozmn
- 8. W7-X Bootstrap-Current Convergence Audit
- 9. VMEC Geometry-Family Transport Convergence
- 10. Angular Collocation Oversampling Audit
- 11. Owned JAX-Native NTX+NEOPAX Dataset
- 12. Bootstrap Current With NEOPAX
- 13. Fixed-Field Bootstrap-Current Validation
- 14. Autodiff Inverse Problem
- 15. Precise-QS Redl Versus SFINCS Audit
- 16. Fixed-Field Transport-Matrix Audit
- 17. Autodiff Derivative Audit
- 18. Prepared-Derivative Benchmark
- 19. Autodiff NEOPAX Profiles
- 20. Autodiff Profile Uncertainty
- 21. Robust Bootstrap-Current Optimization
- 22. Ambipolar Profile
- 23. Ambipolar Profile Family
- 24. Science Case: Bootstrap-Current Optimization
- 25. Profile-Control Optimization
- 26. Profile-Basis Optimization
- 27. Profile Transport Loop
- 28. Primitive Profile Transport
- 29. Performance Scaling
- 30. Prepared-Geometry Reuse Profile
- 31. Profile Force Reconstruction Audit
- 32. Validation Summary
- 33. Full Publication Bundle
- Validation
- SFINCS-JAX RHSMode=1 Profile-Current Handoff
- Testing And Quality Assurance
- Benchmark Matrix
- Repository Hygiene
- Ship Checklist
- NEOPAX
- GPU Runs
- Performance
- Reusable Prepared Scans
- File-Backed Run Path
- Benchmark Scripts
- Smoke-Grid Scaling
- Heavier-Grid Scaling
- Production-Grid Scaling
- Production Strong Scaling
- Prepared-Geometry Reuse
- Finite-Beta RHSMode=1 Profile-Current Profiling
- QI Hires NEOPAX-Database Export
- Reproducibility
- Integrated W7-X Workflow
- SOLVAX Solver Migration
- Research-Grade Performance Plan
- Research Roadmap
- Manuscript Figures
- Curated Figure Set
- Full Figure Inventory
- Manuscript Tables And Reproducibility
- One-Command Figure Bundle
- Science Figure
- Prepared-Derivative Efficiency Figure
- NTX Reduced Bootstrap-Current Response Figure
- Ambipolar Profile Figure
- Ambipolar Profile Family Figure
- Profile-Control Optimization Figure
- Profile-Basis Optimization Figure
- Profile Transport Loop Figure
- Primitive Profile Transport Figure
- W7-X Bootstrap-Current Convergence Figure
- Angular Oversampling Figure
- Literature And External Packages
- Release
- NTX 0.2.4 Release Notes
- NTX 0.2.3 Release Notes
- NTX 0.2.2 Release Notes
- NTX 0.2.1 Release Notes
- NTX 0.2.0 Release Notes