Parameters
Everything a case needs is passed as keyword arguments to Parameters(...). This page lists all
keys, grouped by what they do, with the value that applies when the key is left out.
Two rules apply to all of them: the object is validated at start-up (a wrong type or format stops the script), and unknown keywords are a Python error, not a warning — a misspelled key does not silently fall back to its default.
Run identity and output
| Key | Type | Default | Meaning |
|---|---|---|---|
NAME | str | required | Name of the run. The run directory is created with this name next to the script |
DT | float | required | Time step in seconds. Must not be larger than TSIM |
TSIM | float | required | Simulated time in seconds |
MESH_FILE | str | required | Gmsh mesh file |
UNIT | float | 1.0 | Length unit of the mesh, in metres |
DUMP_PATH | str | "dumps" | Subdirectory of the run directory for all dumps |
LOGFILE_PATH | str | "logfiles" | Subdirectory of the run directory for the log files |
LOGFILE_SERVER | str | "log_server" | Base name of the server log; .txt is appended |
LOGFILE_CLIENT | str | "log_client" | Base name of the client logs, one per rank |
SEED_FOR_FIRST_CLIENT | int | -1 | Seed of the random number generator. A negative value leaves the seed to the system |
VERBOSE_SERVER | int | VERBOSE_NONE | Verbosity of the server, as a combination of VERBOSE_* flags |
VERBOSE_CLIENT | int | VERBOSE_NONE | Verbosity of the clients |
Dump files are named <NAME>_<file_template> inside DUMP_PATH. additional_path of a dumper
instance adds another level below it.
Domain
| Key | Type | Default | Meaning |
|---|---|---|---|
BB | 6 floats | required | Bounding box (x_min, y_min, z_min, x_max, y_max, z_max) in UNIT |
BB_OPTIONS | 3 ints | required | Behaviour of the box per direction: BB_SOLID, BB_PERIODIC, BB_OUT_MIN, BB_OUT_MAX, BB_OUT |
MESH_DIVISION | 3 ints | required | Resolution of the internal element lookup grid per direction; the product is the number of grid cells |
BORDER_TYPES | dict | required | Named Border objects, each with the icodec of a physical group |
A physical group that is not listed in BORDER_TYPES is not a wall for the particles: a
particle that reaches it crosses it as if it were open space.
Physics switches
The switches are integers, and any non-zero value means on.
| Key | Default | Meaning |
|---|---|---|
USE_GRAVITY | 1 | Weight, from the GRAVITY field |
USE_ELECTRIC_FORCE | 1 | Coulomb force qE |
USE_MAGNETIC_FORCE | 1 | Lorentz force qv×B |
USE_POLARIZATION_FORCE | 0 | Force on the induced dipole in a field gradient |
USE_COLLISIONAL_DRAG | 1 | Friction with the neutral gas |
USE_COULOMB_DRAG | 1 | Ion drag from Coulomb collisions |
USE_COLLISIONAL_THERMOPHORESIS | 1 | Thermophoresis in the neutral gas |
USE_COULOMB_THERMOPHORESIS | 1 | Thermophoresis in the plasma |
USE_PARTICLE_CURRENTS | 1 | Charge the particles from the plasma species |
USE_DEBYE_POLARIZATION_FORCE | 0 | Force from the polarised ion cloud |
REFLECTION_COEFFICIENT | 1.0 | Gas-surface scattering: 1.0 specular, 0.0 full accommodation |
LOW_KNUDSEN_NEUTRAL_GAS_CALCULATION | 0 | Use the continuum (Stokes) form of the neutral gas terms instead of the free-molecular one |
MORE_ACCURATE_COULOMB_FORCE_CALCULATION | 0 | More expensive evaluation of the Coulomb interaction |
CALCULATE_MESH_CONNECTIONS | 1 | Build the connectivity graph of touching particles (agglomerates) |
REFERENCE_TEMPERATURE | 300.0 | Reference temperature for the gas property model, in K |
REFERENCE_PRESSURE | 101325.0 | Reference pressure for the gas property model, in Pa |
Numerical and termination control
| Key | Default | Meaning |
|---|---|---|
MINOR_TIME_STEP_COUNT | 1 | Sub-steps per DT; a negative value is treated as 1 |
WALL_MODULUS | 1 | Parity of the inside-the-wall test; flip it for an inverted mesh orientation |
CHECK_FOR_WALLS | 0 | Test whether a particle is inside a wall volume, not only on a crossing |
CHECK_ALL_SURFACE_ANGLES_FOR_ROLLING_PARTICLES | 0 | Check all normals of an element for a rolling particle |
TEMPERATURE_DIFFERENCE_FOR_INSTANT_EQUILIBRIUM | 10.0 | Temperature change per step above which a droplet is set to the gas temperature |
MINIMUM_PARTICLE_SIZE | 0.0 | Radius at which a droplet is reset; 0 means the radius of the dry core |
DELETE_PARTICLES_IF_INVALID_CHARGE | 0 | Remove a particle whose charge became unphysical |
TERMINATION_LEVEL_IF_ALL_PARTICLES_VANISHED | NO_TERMINATION | What happens when no particle is left: NO_TERMINATION, TERMINATION_LEVEL_1, TERMINATION_LEVEL_2 |
TERMINATION_LEVEL_IF_ALL_PARTICLES_VANISHED is the switch to keep a long run from burning
wall-clock time on an empty box: a case whose particles have all left or stuck produces nothing
after that moment.
Content
| Key | Type | Meaning |
|---|---|---|
SPECIES_LIST | dict of Species | The traced particle species, by name |
PLASMA_SPECIES_LIST | dict of PlasmaSpecies | The plasma species that charge the particles; may be empty |
BORDER_TYPES | dict of Border | The walls, by name |
DUMPER_INSTANCES | dict of DumperInstance | The output files, by name |
ELECTRIC | Field | Electric field, constant or from a potential file |
MAGNETIC | Field | Magnetic field |
GRAVITY | Field | Gravity |
The three field slots may be None; a slot that is None and a switch that is on is not an
error, the field simply contributes nothing.
Species keys
Species describes the traced particle:
| Key | Default | Meaning |
|---|---|---|
size_distribution_type | DISTRIBUTION_CONSTANT | DISTRIBUTION_CONSTANT, DISTRIBUTION_UNIFORM, DISTRIBUTION_LOG_NORMAL, DISTRIBUTION_WEIBULL |
size_distribution_param_1 | 1.0 | First radius parameter in metres (bound, mean or scale depending on the distribution) |
size_distribution_param_2 | 0.0 | Second radius parameter (upper bound or width) |
size_distribution_param_int | 0 | Integer parameter of the distribution |
mass_density | 1.0 | Density of the particle material in kg/m³ |
dry_mass_density | 1.0 | Density of the non-volatile core |
initial_charge_density | 0.0 | Initial charge per volume in C/m³ |
relative_permittivity | 1.0 | For the polarisation force |
hamaker_constant | 1.0e-19 | For the van der Waals adhesion, in J |
minimum_wall_distance | 4.0e-10 | Distance at which the adhesion is evaluated, in m |
vapor_gas_constant | 1.0 | Vapour property of the condensable component |
latent_heat | 1.0 | Latent heat of evaporation |
dT_latent_heat | 0.0 | Temperature dependence of the latent heat |
dT_mass_density | 0.0 | Temperature dependence of the density |
saturation_pressure | 1.0 | Saturation pressure of the vapour |
dT_saturation_pressure | 0.0 | Temperature dependence of the saturation pressure |
diffusivity | 1.0 | Diffusion coefficient of the vapour in the gas |
diffusivity_exponent | 1.0 | Temperature exponent of the diffusivity |
molar_fraction | 1.0 | Molar fraction of the condensable component |
specific_heat_p | 1.0 | Specific heat at constant pressure |
Warning: the defaults are placeholders, not physical values. In particular
mass_density = 1.0 and hamaker_constant = 1e-19 are only sensible for a rough test; a real
case sets at least the density, the size distribution and, if adhesion matters, the Hamaker
constant of the material pair.
PlasmaSpecies describes a species of the background plasma or gas:
| Key | Default | Meaning |
|---|---|---|
mass | 1.0 | Particle mass in kg, e.g. 40*AMU |
charge | 0 | Charge number, −1 for electrons, +1 for singly charged ions |
density | Field | Number density |
temperature | Field | Temperature |
velocity | Field | Drift velocity, vector |
pressure | Field | Pressure |
energy | Field | Energy |
temperature_gradient | Field | For thermophoresis |
pressure_gradient | Field | Pressure gradient |
heat_flux | Field | Heat flux |
cross_section | 3.0e-19 | Collision cross-section in m², for the Knudsen number |
specific_heat_p | 1.0 | Specific heat at constant pressure |
heat_conductivity, dT_heat_conductivity | 1.0, 0.0 | Thermal conductivity and its temperature dependence |
dynamic_viscosity, dT_dynamic_viscosity | 1.0, 0.0 | Dynamic viscosity and its temperature dependence |
relative_humidity | 1.0 | Humidity of the gas, for droplet evaporation |
Border and DumperInstance are documented with the fields they set on the
scenario page and in the output section.