# Vlasov-1D Configuration Reference This document describes how to construct a configuration file for the `vlasov-1d` solver. ## Top-Level Structure ```yaml solver: vlasov-1d units: # Physical unit normalizations density: # Species definitions grid: # Simulation grid parameters save: # Output configuration mlflow: # Experiment tracking drivers: # External drivers diagnostics: # Diagnostic outputs terms: # Solver configuration ``` ## units Physical unit normalizations for the simulation. | Field | Type | Description | |-------|------|-------------| | `normalizing_temperature` | string | Reference temperature with unit, e.g., `"2000eV"` | | `normalizing_density` | string | Reference density with unit, e.g., `"1.5e21/cc"` | | `reference` | string | Reference species for the normalization: `"electron"` (default) or `"ion"` | | `A` | float | Ion mass number, $m_i = A\,m_p$ (only used with `reference: ion`; default `1.0`) | | `Z` | float | Ion charge state, $q_i = Z e$ (only used with `reference: ion`; default `1.0`) | Example: ```yaml units: normalizing_temperature: 2000eV normalizing_density: 1.5e21/cc ``` ### Normalization convention All Vlasov-1D quantities are normalized using the following unit system, built from `normalizing_density` ($n_0$) and `normalizing_temperature` ($T_0$): | Unit | Definition | Meaning | |------|-----------|---------| | time | $\tau = 1/\omega_{p0}$, $\omega_{p0} = \sqrt{n_0 e^2/(\epsilon_0 m_e)}$ | inverse plasma frequency | | velocity | $v_0 = \sqrt{T_0/m_e}$ | electron thermal speed (RMS / standard-deviation convention) | | length | $L_0 = v_0/\omega_{p0} = \lambda_{De}$ | electron Debye length | | wavenumber | $1/L_0$ | a code wavenumber is $k \lambda_{De}$ | Consequences of the $v_0 = \sqrt{T_0/m_e}$ (σ) convention: - A Maxwellian at code temperature $T = 1$ is $f \propto e^{-v^2/2}$ (unit variance). - The Bohm–Gross dispersion in code units is $\omega^2 = 1 + 3 k^2$. - The normalized speed of light is $\hat c = c/\sqrt{T_0/m_e}$ (e.g. $\hat c = 15.98$ at 2000 eV). Dimensional inputs (strings with units, e.g. `xmax: 100um`) are converted with these units; plain numeric inputs are taken to already be in code units and pass through unchanged. ### Ion reference (`reference: ion`) For runs where only ions are evolved kinetically (e.g. `terms.field: poisson-boltzmann`), set `reference: ion` to build the normalization from the ion species instead: | Unit | Definition | Meaning | |------|-----------|---------| | time | $\tau = 1/\omega_{pi}$, $\omega_{pi} = \sqrt{n_i Z^2 e^2/(\epsilon_0 m_i)}$ | inverse ion plasma frequency | | velocity | $v_0 = \sqrt{T_0/m_i}$ | ion thermal speed (same σ convention) | | length | $L_0 = v_0/\omega_{pi}$ | ion Debye length | with $m_i = A\,m_p$ and charge $Z e$; `normalizing_density` and `normalizing_temperature` are then the ion density $n_i$ and ion temperature $T_i$. Dimensional string inputs (e.g. `xmax: 300um`, `tmax: 50ps`) convert with these ion units, and the physical quantities logged by `write_units()` (`wp0`, `tp0`, `x0`, `v0`, ...) refer to the ion reference. The electron-specific collision entries (`nuee`, `nuee_norm`, `logLambda_ee`) are replaced by their ion-ion counterparts (`nuii`, `nuii_norm`, `logLambda_ii`, from the NRL formulary). Example (deuterium): ```yaml units: normalizing_temperature: 100eV # T_i normalizing_density: 1.0e20/cc # n_i reference: ion A: 2.0 Z: 1.0 ``` ## density Species and density configuration. You can define multiple "species" by using keys prefixed with `species-`. | Field | Type | Description | |-------|------|-------------| | `quasineutrality` | bool | Whether to enforce quasineutrality | ### Species Definition Each species is defined with a key starting with `species-` (e.g., `species-background`, `species-beam`, `species-electron1`). | Field | Type | Description | |-------|------|-------------| | `noise_seed` | int | Random seed for noise initialization | | `noise_type` | string | `"gaussian"` or `"uniform"` | | `noise_val` | float | Amplitude of noise | | `v0` | float | Drift velocity in code units of $\sqrt{T_0/m_e}$ (thermal-σ units). Numeric only — dimensional strings are not supported here | | `T0` | float | Temperature in units of `normalizing_temperature`. The initialized distribution has velocity variance `T0/mass`. Numeric only | | `m` | float | Exponent for super-Gaussian distribution $f \propto \exp[-\|v/(\alpha v_{th})\|^m]$. `2.0` is Maxwellian. Note: $\alpha$ is chosen to fix the moment ratio $\langle v^4\rangle/\langle v^2\rangle = 3\,T_0/\mathrm{mass}$ for all $m$; the *variance* equals `T0/mass` only at `m: 2`. For flat-top distributions (`m > 2`) the second-moment temperature diagnostic will read higher than `T0` (e.g. ×1.24 at `m: 3`, ×1.37 at `m: 4`) | | `basis` | string | Spatial profile type (see below) | #### Basis Types **`uniform`**: Constant density profile ```yaml species-background: basis: uniform # No additional parameters required ``` **`sine`**: Sinusoidal density perturbation ```yaml species-background: basis: sine baseline: 1.0 # Base density amplitude: 1.0e-4 # Perturbation amplitude wavenumber: 0.3 # Wavenumber of perturbation ``` **`tanh`**: Hyperbolic tangent profile (for density gradients) ```yaml species-background: basis: tanh baseline: 0.001 # Minimum density bump_or_trough: bump # "bump" or "trough" center: 2000.0 # Profile center location rise: 25.0 # Steepness of transition bump_height: 0.999 # Height of bump/trough width: 3900.0 # Width of profile ``` **`linear`**: Linear density gradient ```yaml species-background: basis: linear center: 1000.0 width: 500.0 rise: 10.0 gradient scale length: "100um" # Gradient scale length with units val at center: 1.0 # Density value at center ``` **`exponential`**: Exponential density gradient ```yaml species-background: basis: exponential center: 1000.0 width: 500.0 rise: 10.0 gradient scale length: "100um" val at center: 1.0 ``` ### Multi-Species Example ```yaml density: quasineutrality: true species-electron1: noise_seed: 420 noise_type: gaussian noise_val: 0.0 v0: -1.5 T0: 0.2 m: 2.0 basis: sine baseline: 0.5 amplitude: 1.0e-4 wavenumber: 0.3 species-electron2: noise_seed: 420 noise_type: gaussian noise_val: 0.0 v0: 1.5 T0: 0.2 m: 2.0 basis: sine baseline: 0.5 amplitude: -1.0e-4 wavenumber: 0.3 ``` ## grid Simulation grid parameters. | Field | Type | Description | |-------|------|-------------| | `dt` | float | Timestep (normalized) | | `nv` | int | Number of velocity grid points (not needed for multispecies) | | `nx` | int | Number of spatial grid points | | `tmin` | float | Start time | | `tmax` | float | End time | | `vmax` | float | Upper bound of the velocity grid (not needed for multispecies) | | `vmin` | float | Lower bound of the velocity grid. Optional; defaults to `-vmax` (symmetric grid). Use to specify an asymmetric velocity extent (not needed for multispecies). | | `xmin` | float | Domain minimum x | | `xmax` | float | Domain maximum x | | `parallel` | `false` or list of `"x"`, `"v"` | Axes to parallelize across devices using `jax.shard_map`. `"x"` shards the `edfdv` push and collision operator along the spatial axis; `"v"` shards the `vdfdx` push along the velocity axis. Requires the corresponding dimension (`nx` or `nv`) to be divisible by the number of JAX devices. Defaults to `false`. See [Running on Multiple GPUs](overview.md#running-on-multiple-gpus) for the memory model, the launch command, and the reverse-mode AD caveat on `"v"`. | The velocity grid is uniform and cell-centered: `dv = (vmax - vmin) / nv` with cell centers spanning `vmin + dv/2` to `vmax - dv/2`. An asymmetric grid (`vmin != -vmax`) is useful, for example, for a bump-on-tail distribution where less resolution is needed on one side. As with `vmax`, choose bounds wide enough that `f ~ 0` at *both* edges so that the spectral velocity push and the zero-flux collision boundary conditions remain accurate. **Note:** For multispecies simulations, `nv`, `vmax`, and `vmin` are defined per-species in `terms.species` and the global values are not used. Example: ```yaml grid: dt: 0.1 nv: 256 nx: 32 tmin: 0.0 tmax: 100.0 vmax: 6.4 xmin: 0.0 xmax: 20.94 parallel: ["x", "v"] # shard edfdv+collisions over x, vdfdx over v ``` ## save Configures what data to save and at what times. ### Structure ```yaml save: fields: t: tmin: 0.0 tmax: 100.0 nt: 601 electron: main: t: tmin: 0.0 tmax: 100.0 nt: 11 ``` | Save Key | Description | |----------|-------------| | `fields` | Electric and magnetic field data | | `` | Dict of named distribution function saves for that species | | `diag-vlasov-dfdt` | Time derivative from Vlasov operator (optional) | | `diag-fp-dfdt` | Time derivative from Fokker-Planck operator (optional) | ### Multiple distribution saves per species Each species section is a dict of **named saves** (`main`, `full`, `monitor`, etc.). Multiple saves with different resolutions and time cadences can be configured under the same species key. Each produces a `dist-/