Repository navigation
Physical species tables in the input TOML: no hand-built Hermite coefficients - #62
Open
rogeriojorge wants to merge 4 commits into
Open
rogeriojorge wants to merge 4 commits into
rogeriojorge wants to merge 4 commits into
Conversation
A [species.<name>] table with charge, mass, density, vth, drift and an optional density perturbation replaces hand-built Hermite-Fourier coefficients. The electric field solves Gauss's law, and Ns, qs, Omega_cs, alpha_s and u_s follow from the species. Old-style TOML files are unchanged.
This was referenced Oct 5, 2026
Open
rogeriojorge
added a commit
that referenced
this pull request
Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Setting up a SPECTRAX case means building Hermite–Fourier coefficient arrays by hand in Python. The Landau-damping example spends 30 lines on
Ck_0andFk_0index arithmetic, and the field must be made consistent with Gauss's law by hand. JAX-in-Cell, by contrast, describes each species physically in its TOML file.Change
load_parametersaccepts one[species.<name>]table per species:species_initial_statebuilds the following from the species tables:Ns,qs,ms,Omega_cs = Omega_ce / mass,alpha_sandu_s;Ck_0, from each species' density in its own Maxwellian basis;Fk_0, from Gauss's lawi k·E = rho / Omega_ce, plus an optional uniform background fieldB0.charge,mass,density,vth,driftand a density perturbation. The perturbation fields use JAX-in-Cell's names:perturbation_amplitude,perturbation_modeandperturbation_axis.ValueErroris raised.[input_parameters]and[solver_parameters]are now optional.The change is 56 lines in one existing file, with no new modules.
Tests