Skip to content

Input File Overview

GUERNICA is configured through a single INI-style input file. This file is the main user interface to the code: it tells GUERNICA what problem to solve, which physics to include, how to initialize the state, and how to run the simulation.

GUERNICA input files use the .cfg extension and are usually stored in the configs/ directory (a bare file name passed with -i is looked up there; a path is used as given).

The goal of this page is to explain the structure of the input file at a practical level. For the full list of supported fields, defaults, and allowed values, see the Inputs Reference.

Big picture

A GUERNICA input file usually answers the following questions:

  • Is this a transient or a steady-state run, and how long should it run?
    Controlled by [time].

  • What spatial mesh and DG order should be used?
    Controlled by [grid].

  • What velocity grid should be used?
    Controlled by [vx], [vy], and [vz].

  • What is the neutral mass (and so the velocity and time units)?
    Controlled by [units].

  • What backend should run the code?
    Controlled by [device].

  • What output should be written?
    Controlled by [output].

  • What species, operators, and boundaries are active?
    Controlled by [components].

  • How are the species initialized?
    Controlled by sections like [e:init], [i:init], and [n:init].

  • How do density, temperature, and velocity vary in space?
    Controlled by named profile sections like [profile:electron_density].

  • Are there sources, wall interactions, ionization, recombination, charge exchange, or neutral-neutral collisions?
    Controlled by sections such as [source], [boundary:wall], [plasma_interface], [ionization], [recombination], [charge_exchange], and [neutral_neutral].

How to think about the input file

The input file can be separated it into four layers:

1. Global run controls

These sections set up the simulation itself:

  • [time]
  • [grid]
  • [vx], [vy], [vz]
  • [units]
  • [device]
  • [output]

These do not describe the plasma or neutral physics directly. They describe how GUERNICA should run.

2. What physics is active

The [components] section tells GUERNICA what is included in the run:

  • which species exist
  • which operators are enabled
  • which boundaries are active

This section acts like a high-level switchboard for the rest of the file.

3. Initial and boundary data

Sections like

  • [e:init]
  • [i:init]
  • [n:init]
  • [source]
  • [boundary:<name>]
  • [plasma_interface]

describe what distributions or wall/source data should be used. The neutral [n:init] is the initial condition. [e:init] and [i:init] define the prescribed electron and ion backgrounds that the operators use.

4. Reusable spatial profiles

Sections like

[profile:electron_density]
type = constant
value = 5.0

define reusable spatial data.

A profile might represent:

  • density
  • temperature
  • bulk velocity
  • wall emission data
  • source strength

Profiles can be analytic (constant, affine, Gaussian, cosine, and so on) or read from a file (file_rectilinear_2d for 2D tabulated data such as plasma backgrounds, and file_boundary_linear_2d for data along boundary faces). Other sections refer to these profiles by name. The names default_density (0), default_temperature (0.01), and default_u (0) are always available without a section.

A minimal example

A steady-state run with a Maxwellian volume source, charge exchange, and absorbing walls:

[time]
mode = steady
dt = 0.01
max_iters = 20000
steady_tol = 1e-8
check_every = 50
vis_steps = 500

[grid]
mesh_file = mesh/bernard18.mesh
order = 2

[vx]
num = 21
min = -10.0
max = 10.0

[vy]
num = 21
min = -10.0
max = 10.0

[vz]
num = 1
min = -10.0
max = 10.0

[device]
backend = cuda

[components]
species = n, i
operators = charge_exchange, source
boundaries = walls

[n:init]
density = n_init

[i:init]
density = ion_density
temperature = ion_temperature

[charge_exchange]
model = FFT

[source]
flux = source_flux
temperature = ion_temperature

[boundary:walls]
attrs = 1
type = absorbing

[profile:n_init]
type = constant
value = 0.1

[profile:ion_density]
type = constant
value = 1.0

[profile:ion_temperature]
type = constant
value = 5.0

[profile:source_flux]
type = constant
value = 0.1

What this page does not cover

This page explains the overall structure of the input file, not every supported field.

For more detail, use the other pages: