BoltzmannSolvers

Documentation for BoltzmannSolvers.

BoltzmannSolvers.BOLSIGExplicitRun — Type
BOLSIGExplicitRun(values)

RUN followed by explicit data rows — BOLSIG+'s manual/arbitrary-list scan. values is n_runs × n_var_fields; column order matches the order VAR appears in BOLSIGConditions (see _BOLSIG_CONDITIONS_SCALAR_FIELDS, then gas_fractions). Multiple BOLSIGExplicitRuns may appear in one BOLSIGInput's runs (BOLSIG+ allows repeated RUN blocks that all enqueue rows in sequence).

source
BoltzmannSolvers.BOLSIGInput — Type
BOLSIGInput(; noscreen=true, nologfile=true, collisions, conditions, runs, save=nothing)

Configuration for one standalone BOLSIG+ run script. save is nothing only when every entry in runs is a BOLSIGRun2D (which writes its own output file and doesn't need a SAVERESULTS block).

See read_bolsig_input/write_bolsig_input to parse/emit the actual .dat script format.

source
BoltzmannSolvers.BOLSIGRun2D — Type
BOLSIGRun2D(variable1, min1, max1, num1, type1, min2, max2, num2, type2, output_file)

A RUN2D block: a 2D parametric scan. The first variable is identified by code (like BOLSIGSeriesSegment); the second is whichever BOLSIGConditions field is marked VAR (there's no numeric code for arbitrary second dimensions, e.g. a gas-mixture fraction). Writes its own output_file directly, bypassing BOLSIGSaveResults.

Note: BOLSIG() (src/solvers/bolsig.jl) does not read RUN2D's 2D output format — this type only supports generating the input, not reading the result back.

source
BoltzmannSolvers.BOLSIGRunResult — Type
BOLSIGRunResult

Result of run_solver(::BOLSIGInput; ...).

  • workdir — the temporary directory the run happened in (input.dat, symlinked/copied collision files, bolsiglog.txt, and any output files all live here).
  • output_files — absolute paths to every file BOLSIG+ was configured to write (input.save.file if present, plus any BOLSIGRun2D.output_file).
  • success — whether every entry in output_files exists after running. Not derived from exit_code (see module notes — exit code 2 is BOLSIG+'s normal termination, not a failure indicator).
  • exit_code, log — the process's exit code and combined stdout/stderr, for diagnostics when success is false.
source
BoltzmannSolvers.BOLSIGSaveResults — Type
BOLSIGSaveResults(; file, format, kwargs...)

format is BOLSIG+'s output-layout code (1-6). The three layouts load_dataframe(BOLSIG(), ...) actually reads: 1 (Run by run) → the single-run report format, 2 (Combined) → the condensed R#/A#/C# table format, 3 (E/N) → the verbose block-per-quantity format. 4 (Energy), 5 (SIGLO), and 6 (PLASIMO) are not read by BOLSIG().

source
BoltzmannSolvers.BOLSIGSeriesRun — Type
BOLSIGSeriesRun(segments)

One or more chained RUNSERIES blocks — BOLSIG+ concatenates consecutive RUNSERIES blocks targeting the same or different ranges into one combined scan (e.g. the reference example1.dat's 40 points come from two segments, 31 exponentially-spaced + 9 linearly-spaced).

source
BoltzmannSolvers.BOLSIGSeriesSegment — Type
BOLSIGSeriesSegment(variable, min, max, count, type)

One RUNSERIES block: a formula-based range scan over variable (identified by code, not by a VAR marker in BOLSIGConditions).

source
BoltzmannSolvers.LoKIInput — Type
LoKIInput(; kwargs...)

Configuration of a LoKI-B electron-kinetics run, as described by the workingConditions and electronKinetics sections of a .in setup file (see read_loki_input). Species, states, and model choices are plain strings in LoKI's own notation; raw holds the full parsed setup tree (chemistry, output, GUI, ... configuration).

Conditions given as linspace/logspace/vector scans are kept as vectors (reduced_field, electron_temperature).

source
BoltzmannSolvers.LoKISmartGrid — Type
LoKISmartGrid(; min_eedf_decay=20.0, max_eedf_decay=25.0, update_factor=0.05)

LoKI-B's adaptive energy-grid settings (numerics.energyGrid.smartGrid): the grid boundary is moved until the EEDF falls between min_eedf_decay and max_eedf_decay decades below its maximum.

source
BoltzmannSolvers.MultiBoltDefinedSweep — Type
MultiBoltDefinedSweep(values)

--sweep_style def v1 v2 ... — an explicit list of values, MultiBolt's manual/arbitrary-list scan (the analog of BOLSIG+'s BOLSIGExplicitRun).

source
BoltzmannSolvers.MultiBoltInput — Type
MultiBoltInput(; kwargs...)

Configuration for one MultiBolt run. Unlike BOLSIGInput, this isn't read from/written to a file — MultiBolt takes its configuration entirely as command-line arguments — so MultiBoltInput is only ever translated into an argument vector (via _multibolt_args, used by run_solver(::MultiBoltInput; ...)), not serialized.

Required: cross_section_files, species, export_name. Everything else has a default matching MultiBolt's own CLI defaults, or nothing/false meaning "don't pass this flag, let MultiBolt use its own default".

source
BoltzmannSolvers.MultiBoltRunResult — Type
MultiBoltRunResult

Result of run_solver(::MultiBoltInput; ...).

  • workdir — the temporary directory used as --export_location.
  • output_dir — joinpath(workdir, config.export_name), where MultiBolt actually wrote its output — pass this directly to load_dataframe(MultiBolt(), ...).
  • success — exit_code == 0 && isdir(output_dir).
  • exit_code, log — the process's exit code and combined stdout/stderr, for diagnostics when success is false.
source
BoltzmannSolvers.MultiBoltSpecies — Type
MultiBoltSpecies(name, fraction)

--species name fraction. name is matched against whatever species are identifiable (as reactants/products) in the files listed in MultiBoltInput.cross_section_files — there's no explicit file→species pairing at the CLI level the way BOLSIGReadCollisions pairs one file with its species.

source
BoltzmannSolvers.MultiBoltSweep — Type
MultiBoltSweep(variable, style)

--sweep_option <variable> + the args from style. variable's current value in MultiBoltInput (e.g. EN_Td) acts as a placeholder, silently overridden by the sweep — no VAR-marker mechanism is needed here the way BOLSIG+'s CONDITIONS block needs one (confirmed against MultiBolt's own example_sweep_calculations_EN_Td.sh, which passes a concrete --EN_Td 100 alongside --sweep_option EN_Td).

source
BoltzmannSolvers.NamedInterpolationDerivative — Type
NamedInterpolationDerivative(name, itp)

d/dx of a NamedInterpolation's interpolation. Symbolics needs this as its own callable object: a registered function is opaque to symbolic differentiation, so without a registered derivative any Jacobian built symbolically through an interpolation sees zero — silently freezing implicit solves that must invert a tabulated quantity.

source
BoltzmannSolvers._bolsig_normalize_process — Method
_bolsig_normalize_process(desc) -> String

Normalize a raw BOLSIG+ collision description into a compact reaction string, e.g. "Ar Effective (momentum)" -> "Effective(Ar)", "Ar Excitation 11.50 eV" -> "Excitation(Ar,11.50eV)". Falls back to the original string, unmodified, if the description doesn't match the expected <species> <type> [threshold eV] shape rather than guessing.

source
BoltzmannSolvers._multibolt_args — Method
_multibolt_args(config::MultiBoltInput, export_location::AbstractString) -> Vector{String}

Translate config into the argument vector multibolt_linux/ multibolt_win64.exe expects, with --export_location fixed to export_location (managed by run_solver(::MultiBoltInput; ...)).

source
BoltzmannSolvers.create_interpolation — Method
`create_interpolation(df::DataFrame, y_name, x_name; name=y_name)`

Create interpolation object y(x) from DataFrame df. y_name is the column of the dependent variable, x_name is the column name of the independent variable.

Returns a NamedInterpolation which works with Symbolics.jl and can be used in ModelingToolkit.jl models.

source
BoltzmannSolvers.load_raw_dataframe — Method
load_raw_dataframe(::BOLSIG, source; kwargs...)

Read a single BOLSIG+ output file (source is a file path, unlike LoKI/ MultiBolt which take a directory — BOLSIG+ writes one output file per run). Auto-detects which of BOLSIG+'s three result layouts the file uses (condensed R#/A#/C# tables, a verbose block-per-quantity wrapped-table format, or a single-run R#-header name/value report) and returns one row per scanned condition (or a single row, for the single-run format).

source
BoltzmannSolvers.load_raw_dataframe — Method
load_raw_dataframe(::LoKI, source; kwargs...)

source is either a directory containing LoKI-B's plain-text lookup tables (lookUpTableSwarm.txt, lookUpTableRateCoeff.txt, and optionally lookUpTablePower.txt) or a single .h5 file — LoKI-B's HDF5 export of the same simulation (requires using HDF5, see _load_loki_hdf5).

source
BoltzmannSolvers.read_bolsig_input — Method
read_bolsig_input(path) -> BOLSIGInput

Parse a BOLSIG+ input script into a BOLSIGInput. Expects one standalone script (see BOLSIGInput's docstring) — a file that concatenates multiple scripts via CLEARCOLLISIONS/CLEARRUNS resets (like _research/bolsig/input-examples.dat) should be split into separate files first.

source
BoltzmannSolvers.read_loki_input — Method
read_loki_input(path) -> LoKIInput

Parse a LoKI-B .in setup file. The workingConditions, electronKinetics (cross-section files, gas fractions, state populations, growth/ionization/e-e model choices) and numerics sections map onto LoKIInput fields; the complete parsed tree — including sections this struct does not model (chemistry, output, state energies and statistical weights, ...) — is kept in raw.

source
BoltzmannSolvers.run_solver — Method
run_solver(input::BOLSIGInput; bolsig_path=nothing, collision_dir=pwd()) -> BOLSIGRunResult

Write input to a temporary directory (via write_bolsig_input, which also validates it), place every collision file it references alongside it, and run BOLSIG+ there.

  • bolsig_path — path to the bolsigminus executable. Resolved from this keyword argument first, then the BOLSIGMINUS_PATH environment variable; errors clearly if neither is given.
  • collision_dir — directory to look up each BOLSIGReadCollisions.file bare filename in (BOLSIG+'s input format can't reference collision files by absolute or subdirectory-relative path — see module notes). Defaults to the current working directory.

Example

result = run_solver(input; bolsig_path="/opt/bolsig/bolsigminus")
result.success || error("BOLSIG+ run failed:\n$(result.log)")
df = load_dataframe(BOLSIG(), result.output_files[1])
source
BoltzmannSolvers.run_solver — Method
run_solver(config::MultiBoltInput; multibolt_path=nothing) -> MultiBoltRunResult

Run MultiBolt with config, exporting to a fresh temporary directory.

multibolt_path — path to the multibolt_linux/multibolt_win64.exe executable. Resolved from this keyword argument first, then the MULTIBOLT_PATH environment variable; errors clearly if neither is given.

Example

result = run_solver(config; multibolt_path="/opt/multibolt/multibolt_linux")
result.success || error("MultiBolt run failed:\n$(result.log)")
df = load_dataframe(MultiBolt(), result.output_dir)
source