Source
Source
The source operator in GUERNICA is an optional additive term that injects neutrals into the distribution function. It is enabled by including source under operators in [components], together with a [source] section. It is added directly to the right-hand side alongside advection and any other active operators, in both transient and steady mode.
The implemented source is a drifting Maxwellian source that is prescribed in space and constant in time:
where \(T\) is the source temperature and \(\mathbf{u}=(u_x,u_y,u_z)\) its drift. The amplitude \(A(\mathbf{x})\) is not the continuum Maxwellian prefactor. Instead it is chosen at every spatial degree of freedom so that the discrete velocity integral of the source equals the prescribed flux profile:
This means the injected particle rate is exactly what was asked for on the velocity grid in use, regardless of its resolution. The source does not depend on the current solution \(f_n\), so it acts as a prescribed inflow of neutrals rather than a collision-like term. Internally it is stored in separable form (one amplitude per spatial node times one 1D factor per velocity axis), so it does not need a full phase-space array.
To turn the source on in the input file, include it in [components] and add a [source] section. A typical setup looks like this:
[components]
species = n
operators = source
[source]
type = maxwellian
neutral_species = n
flux = source_flux
temperature = source_temperature
ux = default_u
uy = default_u
uz = default_u
[profile:source_flux]
type = gaussian
amplitude = 1.0
sigma = 0.1
x_shift = 0.5
y_shift = 0.5
[profile:source_temperature]
type = constant
value = 1.0
Here:
flux(required) is the volumetric particle source rate, in code units. It may be any spatial profile and must be non-negative.temperaturemust be positive everywhere.ux,uy,uzset the drift of the source Maxwellian.
The old key density has been replaced by flux and is rejected by validation.
The same machinery is reused by the recombination operator to inject newly formed atoms.