particula.dynamics.ions.coagulation
Prepared collision laws for explicit ions and charged aerosols.
Attributes
| Name | Description |
|---|---|
NEGATIVE_ION_MASS | No description. |
POSITIVE_ION_MASS | No description. |
Classes
| Name | Description |
|---|---|
AtmosphericCoagulation | Combine charged aerosol coagulation, ion attachment and recombination. |
NEGATIVE_ION_MASSattributemodule attribute#
NEGATIVE_ION_MASS = 90 * ATOMIC_MASS_UNITPOSITIVE_ION_MASSattributemodule attribute#
POSITIVE_ION_MASS = 150 * ATOMIC_MASS_UNITAtmosphericCoagulationclassdataclass#
class AtmosphericCoagulation(positive_species: int, negative_species: int, charged_model: str = 'hard_sphere', omitted: str = 'reject', recombination: float = 1.7e-12, attachment_model: str = 'lf2013', positive_mobility: float = 0.00014, negative_mobility: float = 0.00019, ion_radius: float = 2.5e-10)Bases: RunnableABC
Combine charged aerosol coagulation, ion attachment and recombination.
Prepared Warp execution only, for unit represented particles. Aerosol pairs
use charged_model; default ion-aerosol rates use conductive-air LF2013
tables at 298.15 K and 101325 Pa, with 150 u positive and 90 u negative
ions. Opposite free ions recombine; same-sign ions do not cluster. Neutral
ion-only products are inert until an explicit IonNeutralCleanup.
Reserved material lanes must contain only ion mass.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
positive_species | int | required | Positive-ion material index. |
negative_species | int | required | Negative-ion material index. |
charged_model | str | 'hard_sphere' | Existing charged Brownian model name. |
omitted | str | 'reject' | reject (default), lower or upper for repulsive
attachment rates omitted below the published 1e-15 m^3/s cutoff.
Bounds are sensitivity assumptions, not extrapolated fit values. |
recombination | float | 1.7e-12 | Explicit opposite-ion recombination coefficient [m^3/s], held constant with T/P; not predicted by the attachment model. |
attachment_model | str | 'lf2013' | lf2013 or opt-in mobility Coulomb transport
approximation, supporting variable T/P. No image forces or
hydration. |
positive_mobility | float | 0.00014 | Illustrative positive-ion mobility at 298.15 K, 101325 Pa [m^2/(V s)]; supply a measured value for a specific ion. |
negative_mobility | float | 0.00019 | Corresponding negative-ion reference mobility. |
ion_radius | float | 2.5e-10 | Ion contact radius [m], independent of mobility transport. |
attachment_modelattributeclass attributeinstance attribute#
attachment_model: str = 'lf2013'charged_modelattributeclass attributeinstance attribute#
charged_model: str = 'hard_sphere'ion_radiusattributeclass attributeinstance attribute#
ion_radius: float = 2.5e-10negative_mobilityattributeclass attributeinstance attribute#
negative_mobility: float = 0.00019negative_speciesattributeinstance attribute#
negative_species: intomittedattributeclass attributeinstance attribute#
omitted: str = 'reject'positive_mobilityattributeclass attributeinstance attribute#
positive_mobility: float = 0.00014positive_speciesattributeinstance attribute#
positive_species: intrecombinationattributeclass attributeinstance attribute#
recombination: float = 1.7e-12__init__method#
def __init__(positive_species: int, negative_species: int, charged_model: str = 'hard_sphere', omitted: str = 'reject', recombination: float = 1.7e-12, attachment_model: str = 'lf2013', positive_mobility: float = 0.00014, negative_mobility: float = 0.00019, ion_radius: float = 2.5e-10) -> None_validate_batchmethod#
def _validate_batch(aerosol)Reject unsupported model and physical state before GPU upload.
executemethod#
def execute(*args, **kwargs)Reject native CPU execution without mutating the aerosol.
Inherited from particula.runnable.RunnableABC
__or__method#
particula.runnable.RunnableABCView sourcedef __or__(other: RunnableABC) -> RunnableSequenceChain this Runnable with another using the ’|’ operator.
This method enables an easy way to sequence processes, so they can be executed in a defined order.
Parameters
| Name | Type | Description |
|---|---|---|
other | RunnableABC | Another Runnable to append after this one. |
Returns
RunnableSequence- A sequence containing both processes.
Examples
combined_process = process1 | process2final_aerosol = combined_process.execute(aerosol, time_step=1.0)_advance_boxmethod#
particula.runnable.RunnableABCView sourcedef _advance_box(aerosol, time_step)Dispatch one staged interval through the native extension seam.
_box_workermethod#
particula.runnable.RunnableABCView sourcedef _box_worker(box, boxes, transaction)Create isolated hook state for a single box.
_execute_boxmethod#
particula.runnable.RunnableABCView sourcedef _execute_box(aerosol, time_step, sub_steps=1)Execute the single-box numerical building block.
_is_stochasticmethod#
particula.runnable.RunnableABCView sourcedef _is_stochastic(aerosol)Report whether this process requires independent box streams.
_prepare_commitmethod#
particula.runnable.RunnableABCView sourcedef _prepare_commit(workers, uses_context)Prepare a non-failing diagnostics publisher before numeric writes.
_rate_boxmethod#
particula.runnable.RunnableABCView sourcedef _rate_box(aerosol)Evaluate the single-box numerical building block.
_writer_fieldsmethod#
particula.runnable.RunnableABCView sourcedef _writer_fields(aerosol)Declare numeric destinations for transactional publication.
preparemethod#
particula.runnable.RunnableABCView sourcedef prepare(aerosol: Aerosol, *, time_step: float, backend: Backend | None = None, device: str = 'cuda:0', root_seed: int = 0, logical_box_ids=None, process_registry=None, coagulation_work_config=None, time: float = 0.0) -> PreparedSimulationUpload native state once and prepare supported resident GPU physics.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
aerosol | Aerosol | required | Initial native particle, gas and environment state. |
time_step | float | required | Fixed duration of each complete process cycle [s]. |
backend | Backend | None | None | Backend.WARP by default; CPU execution uses execute(). |
device | str | 'cuda:0' | Explicit Warp device, default CUDA device zero. |
root_seed | int | 0 | Root seed for persistent independent process/box streams. |
logical_box_ids | None | Optional stable identities in physical box order. | |
process_registry | None | Exact-type custom GPU adapter registrations. | |
coagulation_work_config | None | Optional coagulation resource budgets. | |
time | float | 0.0 | Absolute initial simulation time [s]. |
Returns
PreparedSimulation- An owned PreparedSimulation. Use its context manager or close().
PreparedSimulation- snapshot() returns detached CPU state for analysis and plotting.
Raises
ValueError- If process physics or state cannot be represented.
RuntimeError- If the requested runtime/device is unavailable.
ratemethod#
particula.runnable.RunnableABCView sourcedef rate(aerosol: Aerosol) -> AnyEvaluate detached box hooks and retain a leading box axis.
resumemethod#
particula.runnable.RunnableABCView sourcedef resume(checkpoint: SimulationCheckpoint, *, backend: Backend | None = None, device: str | None = None, process_registry=None) -> PreparedSimulationResume exact saved state using the same process configuration.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
checkpoint | SimulationCheckpoint | required | SimulationCheckpoint from a prepared owner. |
backend | Backend | None | None | Backend.WARP by default. |
device | str | None | None | Exact checkpoint device by default; migration rejects. |
process_registry | None | Compatible caller-supplied GPU implementations. |
Returns
PreparedSimulation- A new owner preserving state, RNG words, timestep and counters.
PreparedSimulation- Capture is explicit again; native graph handles are never restored.
Raises
ValueError- If configuration, order, schema or device differs, or current population cannot be admitted (e.g. unequal Brownian counts after a later process injected new particles).