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 throughvmec_jaxBoozer
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 starts from the local monoenergetic drift-kinetic equation on a single flux surface,
with fixed speed, Lorentz pitch-angle scattering, and two source terms: the radial-transport drive and the parallel-flow/bootstrap-current drive. Projecting that equation onto Legendre polynomials in pitch angle gives the system actually 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
Source-Code Map: where each model component lives in
src/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
- 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
- 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
- Owned JAX-Native NTX+NEOPAX Dataset
- 10. Bootstrap Current With NEOPAX
- 10. Fixed-Field Bootstrap-Current Validation
- 11. Autodiff Inverse Problem
- 12. Precise-QS Redl Versus SFINCS Audit
- 13. Fixed-Field Transport-Matrix Audit
- 14. Autodiff Derivative Audit
- 15. Prepared-Derivative Benchmark
- 16. Autodiff NEOPAX Profiles
- 17. Autodiff Profile Uncertainty
- 18. Robust Bootstrap-Current Optimization
- 19. Ambipolar Profile
- 20. Ambipolar Profile Family
- 19. Science Case: Bootstrap-Current Optimization
- 20. Profile-Control Optimization
- 21. Profile-Basis Optimization
- 22. Profile Transport Loop
- 23. Primitive Profile Transport
- 24. Performance Scaling
- 25. Prepared-Geometry Reuse Profile
- 26. Profile Force Reconstruction Audit
- 26. Validation Summary
- 27. 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
- 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
- Research-Grade Performance Plan
- Research Roadmap
- Research Goal
- Why These Lanes Matter
- Phase 1: Optimization-Grade Derivatives
- Phase 2: Profile-Grade Transport Workflows
- Phase 3: Geometry Breadth For Open Design Problems
- Phase 4: Production Throughput
- Phase 5: Physics Expansion
- Adjacent-Code Lessons Incorporated Into The Plan
- Current Milestone Status
- Next Development Pass
- 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
- 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