This page states three things: the copyright and licence of this project, the provenance of each physics module, and the work that is owed acknowledgement. The per-file attribution of record is the repository NOTICE; this page is its readable summary, and every statement made here should be traceable to NOTICE or ACKNOWLEDGEMENTS.md.
Copyright and licence
fylite is developed at the Institute of Plasma Physics, Chinese Academy of Sciences (ASIPP) and released under the Apache License 2.0. Use, modification and redistribution are permitted, commercial use included, provided the copyright notice and NOTICE are retained and the changes made are stated.
fylite
Copyright 2026 Institute of Plasma Physics, Chinese Academy of Sciences (ASIPP)
and the fylite contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
★This page — the browser demos under app/ — and the .wasm kernels it loads are under the same licence: the kernels are compiled from this repository's Rust sources, and each artifact's sha256 and provenance are recorded in the repository documentation, so they can be checked byte for byte.
The parent project: FyTok
fylite is the lightweight edition of FyTok, its parent project (also Apache-2.0, Institute of Plasma Physics, Chinese Academy of Sciences): a full tokamak integrated-modelling framework in Python, with plugins, workflow scheduling, heterogeneous execution and provenance, aimed at HPC and the cloud. Both implement the fyo semantic contract; fylite takes the light end — the key solvers rewritten in Rust and run in the browser through WebAssembly with nothing to install — and doubles as FyTok's minimal functional verification: the two are coded independently against the same contract, so comparing them is a cross-check rather than a code confirming itself. The core-transport channel grammar is taken from FyTok's fytrans (see the table below), which is also the bit-for-bit anchor of the transport step.
Ports and provenance
The modules below are white-box translations of upstream code, not independent reimplementations from the literature. The distinction is a licence obligation and is therefore stated in the body of this page rather than in a footnote.
| Upstream | Authors / institution | Licence | What fylite took |
|---|---|---|---|
| GACODE — GEO | J. Candy (General Atomics) | Apache-2.0 | local flux-surface geometry (Miller-class shape and metric) |
| GACODE — NEO | E. Belli, J. Candy (General Atomics) | Apache-2.0 | analytic neoclassical models and the drift-kinetic solve |
| GACODE — TGLF | G. M. Staebler et al. (General Atomics) | Apache-2.0 | the gyro-Landau-fluid model, FLR fit tables, trapped-closure tables |
| GACODE — TGYRO / expro | General Atomics and the GACODE contributors | Apache-2.0 | NEO / TGLF input maps, sources and radiation, volume integrals, the input.gacode reader |
| NCLASS | W. A. Houlberg | via NEO | neoclassical coefficients as carried by NEO |
| METIS | J. F. Artaud et al. (CEA/IRFM) | CeCILL-C | the fast neutral-beam model: chord attenuation, Janev stopping cross-sections, Stix critical energy and beam-driven current |
| FyTok — fytrans | Institute of Plasma Physics, CAS (fylite's parent project) | Apache-2.0 | the channel declaration grammar, kept identical so a declaration round-trips between the parent project and this one; the 1.5-D transport core is anchored bit-for-bit against it |
Statement of changes (Apache-2.0 §4b): the ports are translations, not copies — module state becomes explicit arguments, LAPACK / UMFPACK become in-tree dense and sparse routines, upstream STOP becomes an error code, and the result is re-entrant. Several points deliberately differ from upstream behaviour, mostly where the upstream silently overrides its own inputs; each is marked at its use site in the source.
Two GACODE revisions coexist, deliberately: GEO / NEO / TGYRO derive from 5efddfdf1 and TGLF from 6357db306, matching the two libraries the ports were checked against. UMFPACK was not translated — the sparse LU here is written from scratch.
Data, oracles and cross-code anchors
- GACODE regression decks and recorded outputs (the GA standard case, TGYRO treg01, libgeo/libneo/libtglf recordings) — the gold fixtures of the ports (General Atomics, Apache-2.0).
- EAST discharge data and the operational EFIT workflow — the EAST team at ASIPP; per-channel diagnostic geometry reaches fylite through fydata. None of it ships with the demos.
- The ITER device description and the IMAS Data Dictionary — ITER Organization, reaching fylite through fyo and fydata; the ITER configuration built into the demos comes from there.
- Cross-code anchors: 0-D against METIS (CEA/IRFM), ITER scenarios against FUSE, electromagnetics and vertical stability against TokSys (General Atomics). None of those codes is redistributed here.
How this code was built
The physics modules of fylite were constructed from the public literature and open-source code listed above, with AI assistance (Anthropic Claude). Correctness is not claimed from authorship: it is established module by module against gold fixtures from the upstream implementations, with the tolerance and its error budget stated. fylite additionally exposes its own interfaces to AI hosts (MCP / JSON-RPC); that is a product feature and a separate matter from how it was written.
Acknowledgements
This project rests on physics, code and data that others made public. The debts are acknowledged item by item:
- General Atomics and the GACODE contributors (J. Candy, E. Belli, G. M. Staebler and colleagues) — upstream of the neoclassical, turbulence and flux-surface-geometry lines; W. A. Houlberg (NCLASS, as carried by NEO).
- CEA/IRFM and the METIS authors (J. F. Artaud et al.) — source of the fast neutral-beam model and of the 0-D conventions, and the reference for the 0-D comparison.
- P. B. Snyder, O. Meneghini and the EPED / EPED1-NN authors (General Atomics) — source of the pedestal model: EPED1's two constraints (Phys. Plasmas 16 056118 (2009)) reach this project through the EPED1-NN surrogate (Nucl. Fusion 57 086034 (2017)), with the network weights taken from the open-source EPEDNN.jl (ProjectTorreyPines, Apache-2.0; license and checksum vendored in this repository).
- The authors of TokSys (General Atomics) — cross-code anchor for the electromagnetics and vertical stability.
- The EAST team at ASIPP — discharge data, the operational EFIT workflow and per-channel diagnostic geometry.
- G. Q. Li, Q. L. Ren, J. P. Qian, L. L. Lao et al. — for porting EFIT to EAST and building its kinetic reconstruction (KEFIT), the upstream reference baseline of the reconstruction line here.
- Youwen Sun — the HT-7 soft-X-ray tomography work (camera-geometry parameterisation and the chord-Green / weighted pseudo-inverse method skeleton).
- Ting Lan — for curating the EAST experimental data corpus; its per-channel diagnostic geometry reaches this project through fydata.
- Yao Huang and the EAST PCS group — the plasma-control-system interface note (magnetic-probe geometry and the equilibrium↔PCS variables).
- Private communications: Tianyang Xia (edge and integration), Yemin Hu (equilibrium), Xiaotao Xiao (transport).
- The ITER Organization — the IMAS Data Dictionary and the ITER machine description, reaching this project through fyo and fydata; the ITER configuration built into the demos comes from there.
- The authors of the works listed in the following section — every formula used here names its source; none originates in this project.
★If you find work of yours used here and not named, please open an issue — the omission is an error, not a choice.
References
Every method used on this site is published method. ★This section previously sat on the entrance page and now lives here: provenance and acknowledgement are one subject and should not be maintained in two places.
Equilibrium and reconstruction
- The equilibrium itself is the Grad–Shafranov equation (Grad and Rubin 1958; Shafranov 1966).
- Fitting p′/FF′ polynomials to magnetic measurements and alternating with the equilibrium under the plasma-current constraint is the reconstruction framework of Lao et al.:
L. L. Lao, H. St. John, R. D. Stambaugh, A. G. Kellman, W. Pfeiffer, Reconstruction of current profile parameters and plasma shapes in tokamaks, Nuclear Fusion 25 (1985) 1611. - Free-boundary solving and the stabilisation of the vertical position:
S. C. Jardin, Computational Methods in Plasma Physics, CRC Press, 2010. - The fast direct solve on a regular grid:
R. W. Hockney, A fast direct solution of Poisson's equation using Fourier analysis, Journal of the ACM 12 (1965) 95. - Definitions of the safety factor, the shape quantities and the general tokamak background:
J. Wesson, Tokamaks, 4th ed., Oxford University Press, 2011.
Transport and turbulence
- Analytic neoclassical conductivity and bootstrap current:
O. Sauter, C. Angioni, Y. R. Lin-Liu, Neoclassical conductivity and bootstrap current formulas, Physics of Plasmas 6 (1999) 2834. - The bootstrap recalibration, kept apart from the line above — the two readings differ by several per cent:
A. Redl, C. Angioni, E. Belli, O. Sauter, A new set of analytical formulae for the computation of the bootstrap current, Physics of Plasmas 28 (2021) 022502. - Analytic neoclassical variants and the trapped fraction:
C. S. Chang, F. L. Hinton, Physics of Fluids 25 (1982) 1493; Y. R. Lin-Liu, R. L. Miller, Physics of Plasmas 2 (1995) 1666. - The gyro-Landau-fluid quasilinear transport model (TGLF):
G. M. Staebler, J. E. Kinsey, R. E. Waltz, A theory-based transport model with comprehensive physics, Physics of Plasmas 14 (2007) 055909. - Direct solution of the drift-kinetic equation (NEO):
E. A. Belli, J. Candy, Kinetic calculation of neoclassical transport including self-consistent electron and impurity dynamics, Plasma Physics and Controlled Fusion 50 (2008) 095010.
0-D modelling, sources and atomic data
- Energy-confinement scalings:
ITER Physics Basis, Nuclear Fusion 39 (1999) 2175 (IPB98(y,2)); P. N. Yushmanov et al., Nuclear Fusion 30 (1990) 1999 (ITER89-P). - D-T reactivity:
H.-S. Bosch, G. M. Hale, Improved formulas for fusion cross-sections and thermal reactivities, Nuclear Fusion 32 (1992) 611. - The L–H threshold power:
Y. Martin et al., Power requirement for accessing the H-mode, Journal of Physics: Conference Series 123 (2008) 012033. - The reference code for 0-D integrated modelling, and the source of the fast neutral-beam model:
J. F. Artaud et al., Metis: a fast integrated tokamak modelling tool, Nuclear Fusion 58 (2018) 105001. - Impurity radiation cooling curves:
T. Pütterich et al., Nuclear Fusion 59 (2019) 056013; Open-ADAS, open.adas.ac.uk. - Beam stopping and charge-exchange cross-sections:
R. K. Janev, C. D. Boley, D. E. Post, Penetration of energetic neutral beams into fusion plasmas, Nuclear Fusion 29 (1989) 2125.
The full texts
This page is a summary. The binding, per-file statements are in the repository:
- LICENSE — the full Apache License 2.0
- NOTICE — per-file provenance, the statement of changes, and what is not included
- ACKNOWLEDGEMENTS.md — the readable acknowledgement list: upstream code, transcribed formulae, data and fixtures, and what was deliberately not taken
- CONTRIBUTORS.md — maintainers and copyright
Repository: github.com/fusion-yun/fylite