spectrax._model¶
Hermite–Fourier model operators for the Vlasov–Maxwell system.
This module contains the spectral Ampère–Maxwell current operator
(plasma_current()) and the right-hand side of the Hermite–Fourier moment
equations (Hermite_Fourier_system()).
Functions¶
|
Compute the spectral Ampère-Maxwell current from Hermite-Fourier coefficients. |
|
Evaluate the right-hand side of the coupled Hermite-Fourier moment equations. |
Module Contents¶
- spectrax._model.plasma_current(qs, alpha_s, u_s, Ck, Nn, Nm, Np, Ns)¶
Compute the spectral Ampère-Maxwell current from Hermite-Fourier coefficients.
- Parameters:
qs (jnp.ndarray, shape (Ns,)) – Charges of the species.
alpha_s (jnp.ndarray, shape (3 * Ns,)) – Velocity scaling factors for each species.
u_s (jnp.ndarray, shape (3 * Ns,)) – Velocity shift for each species.
Ck (jnp.ndarray, shape (Ns * Np * Nm * Nn, Ny, Nx, Nz)) – Hermite-Fourier coefficients for all species stacked along the first axis.
Nn (int) – Number of Hermite modes in x, y, and z respectively.
Nm (int) – Number of Hermite modes in x, y, and z respectively.
Np (int) – Number of Hermite modes in x, y, and z respectively.
Ns (int) – Number of species.
- Returns:
The total Ampère-Maxwell current components (Jx, Jy, Jz).
- Return type:
jnp.ndarray, shape (3, Ny, Nx, Nz)
- spectrax._model.Hermite_Fourier_system(Ck, C, F, kx_grid, ky_grid, kz_grid, k2_grid, col, sqrt_n_plus, sqrt_n_minus, sqrt_m_plus, sqrt_m_minus, sqrt_p_plus, sqrt_p_minus, Lx, Ly, Lz, nu, D, alpha_s, u_s, qs, Omega_cs, Nn, Nm, Np, Ns, mask23)¶
Evaluate the right-hand side of the coupled Hermite-Fourier moment equations.
- Parameters:
Ck (jnp.ndarray) – Hermite-Fourier coefficients with shape (Ns * Np * Nm * Nn, Ny, Nx, Nz).
C (jnp.ndarray) – Configuration-space Hermite coefficients (i.e., inverse FFT of Ck), with shape (Ns * Np * Nm * Nn, Ny, Nx, Nz). The array is reshaped internally to separate the species and Hermite indices.
F (jnp.ndarray) – Configuration-space electromagnetic fields with shape (6, Ny, Nx, Nz) ordered as (Ex, Ey, Ez, Bx, By, Bz).
kx_grid (jnp.ndarray) – Fourier wave-number grids scaled to the physical domain length.
ky_grid (jnp.ndarray) – Fourier wave-number grids scaled to the physical domain length.
kz_grid (jnp.ndarray) – Fourier wave-number grids scaled to the physical domain length.
k2_grid (jnp.ndarray) – Squared magnitude of the wave number.
col (jnp.ndarray) – Precomputed collision coefficients.
sqrt_* (jnp.ndarray) – Square-root ladder coefficients for the Hermite recurrences along each axis.
Lx (float) – Domain lengths in each spatial direction.
Ly (float) – Domain lengths in each spatial direction.
Lz (float) – Domain lengths in each spatial direction.
nu (float) – Collision frequency.
D (float) – Hyper-diffusion coefficient.
alpha_s (jnp.ndarray) – Thermal scaling parameters and drift velocities per species.
u_s (jnp.ndarray) – Thermal scaling parameters and drift velocities per species.
qs (jnp.ndarray) – Species charges.
Omega_cs (jnp.ndarray) – Cyclotron frequencies per species.
Nn (int) – Number of Hermite modes and species.
Nm (int) – Number of Hermite modes and species.
Np (int) – Number of Hermite modes and species.
Ns (int) – Number of Hermite modes and species.
mask23 (jnp.ndarray) – Boolean mask implementing the 2/3 de-aliasing rule in Fourier space.
- Returns:
Time derivative dCk/dt with shape (Ns, Np, Nm, Nn, Ny, Nx, Nz).
- Return type:
jnp.ndarray