Skip to content
Development documentation — This site follows the main branch and may differ from an installed release. View the changelog.

Choose where particles enter

This page helps you choose a particle source from its creation location and physical supply mechanism. source_mode creates particles inside the domain. [particles.species.boundary_inflow] brings particles across a box boundary from outside; it has a separate role.

Decision rule: use volume_seed for a specified count, plane_source for continuous supply from an internal rectangle, boundary_inflow for an external plasma reservoir, and photo_raycast for emission from illuminated surfaces.

After reading this page, you should be able to choose one path and continue to the relevant detailed guide or reference.

GoalSettingWhat determines particle countCreation location
Create a specified initial population or orbit testsource_mode="volume_seed"npcls_per_stepBetween pos_low and pos_high
Supply particles one way from an internal surfacesource_mode="plane_source"Flux × area × batch_durationAxis-aligned rectangle
Bring particles in from plasma outside the boxboundary_inflowReservoir flux × box area × batch_durationNonperiodic box face
Emit from a surface reached by lightsource_mode="photo_raycast"Current density, projected area, batch_durationFirst surface hit by a ray

source_mode and boundary_inflow are separate settings. In the current schema, a species that uses boundary inflow alone must also specify source_mode="volume_seed" and npcls_per_step=0. This does not create particles in a volume.

volume_seed creates npcls_per_step particles in every batch. Positions are sampled from the box enclosed by pos_low and pos_high; velocities follow the configured drifting Maxwell distribution.

It does not derive count from a physical surface flux. A run can therefore use this source with batch_duration=0, but no physical duration in seconds is assigned to that batch. The official 10-minute tutorial uses this path to demonstrate inter-batch surface-charging feedback.

Supply particles from an internal surface: plane_source

Section titled “Supply particles from an internal surface: plane_source”

plane_source supplies particles along source_normal from a rectangle inside the box. pos_low and pos_high must share one coordinate and span a positive area in the other two directions.

source_mode = "plane_source"
pos_low = [0.2, 0.2, 0.7]
pos_high = [0.8, 0.8, 0.7]
source_normal = [0.0, 0.0, -1.0]

Flux, rectangle area, and batch_duration determine the particle count. Because the rectangle is not an outer plasma boundary, it does not use the potential correction from infinity defined by reservoir.phi_infty.

Enter from an external reservoir: boundary_inflow

Section titled “Enter from an external reservoir: boundary_inflow”

boundary_inflow represents plasma entering through an entire nonperiodic box face. Separately configure the outward action on every selected face as open.

[[particles.species]]
source_mode = "volume_seed"
npcls_per_step = 0
# density, temperature, charge, mass, and macro-particle weight
[particles.species.boundary_inflow]
z_high = "reservoir"

See inflow through a simulation boundary for Maxwell or velocity-grid distributions, per-face flux and remainder, and correction from an upstream plasma potential to the boundary. This model does not solve trajectories or a self-consistent sheath outside the box. If the case needs an outer sheath response itself, consider quasistatic matching-plane coupling.

Emit from illuminated surfaces: photo_raycast

Section titled “Emit from illuminated surfaces: photo_raycast”

photo_raycast launches rays through an illumination aperture on a box face and emits particles from the first triangle hit. See photoelectron emission and lifecycle for reaction charge left at the source, reabsorption, and closed-photoelectron return.

Every creation path enters the same particle tracker.

OutcomeBEACH treatment
Absorbed by a triangleAdd charge to the hit element’s pending change
Escapes through an open faceRemove it and count a species-resolved escape
Reflected or crosses a periodic boundaryContinue tracking the same particle for the remaining time
Still alive at sim.max_stepCount an unresolved survivor and discard it at batch end

See particle escape and return for outward box boundaries and particle collision and boundary events for event ordering.

source_mode="reservoir_face" is a deprecated compatibility input. Use boundary_inflow for a new external-plasma case and plane_source for an internal rectangle. Moving a legacy aperture to a complete box face changes area and total inflow, so BEACH does not convert it silently.

The input parameter reference is the canonical list of keys, combinations, MPI behavior, and checkpoint behavior.