Concepts#
MIAM (Model-Independent Aerosol Module) is organized around three core abstractions: Representations, Processes, and the Model that orchestrates them.
Architecture Overview#
┌─────────────────────────────────────┐
│ MICM Solver │
│ (Rosenbrock, BDF, etc.) │
├─────────────────────────────────────┤
│ ExternalModelProcessSet interface │
│ ForcingFunction(params, vars) │
│ JacobianFunction(params, vars) │
├─────────────────────────────────────┤
│ MIAM Model │
│ ┌───────────────┐ ┌──────────────┐ │
│ │Representations│ │ Processes │ │
│ │ │ │ │ │
│ │ - Modes │ │ - Dissolved │ │
│ │ - Sections │ │ Reactions │ │
│ │ │ │ - Phase │ │
│ │ Providers: │ │ Transfer │ │
│ │ r_eff, N, │◄┤ │ │
│ │ φ_p │ │ │ │
│ └───────────────┘ └──────────────┘ │
└─────────────────────────────────────┘
Representations#
A representation describes a particle size distribution. It owns a set of phases (e.g., aqueous, organic), each containing species whose concentrations are state variables. Representations provide:
State variables — species concentrations plus (for TwoMomentMode) a number concentration variable.
State parameters — fixed distribution parameters (geometric mean radius, geometric standard deviation, section bounds).
Aerosol property providers — functions that compute effective radius, number concentration, and phase volume fraction from the state, along with their partial derivatives for the Jacobian.
MIAM provides three representation types:
Type |
Description |
|---|---|
|
Log-normal distribution with fixed size parameters (GMD, GSD). Number concentration is diagnosed from total volume. |
|
Log-normal distribution with prognostic number concentration. Effective radius depends on both volume and number. |
|
Sectional bin with fixed radius bounds. Number concentration is diagnosed from total volume. |
Processes#
A process describes a transformation of species concentrations. Each process implements a common interface that provides:
Forcing function — the ODE right-hand side contribution.
Jacobian function — the partial derivatives of the forcing with respect to state variables (stored as −J per MICM convention).
State parameter management — temperature-dependent rate constants are updated each time step before the solver iterates.
Processes can require aerosol properties from representations. When they do, the Model automatically builds and routes the appropriate providers.
MIAM currently provides two process types:
Type |
Description |
|---|---|
|
Equilibrium reactions within a condensed phase (e.g., H₂O ⇌ OH⁻ + H⁺). Does not require aerosol properties. |
|
Gas ⇌ condensed-phase mass transfer governed by Henry’s Law. Requires effective radius, number concentration, and phase volume fraction from the representation. |
Model#
The Model is the top-level container. It:
Stores representations and processes.
Collects all state variable and parameter names for the solver.
Builds aerosol property providers by matching process requirements to the representations that own each phase prefix.
Returns forcing and Jacobian functions that iterate over all processes in a single loop.
A Model is registered with MICM as an ExternalModelSystem and
ExternalModelProcessSet, making MIAM’s state seamlessly part of the
coupled solver state.
Data Flow#
Each solver time step follows this sequence:
Conditions update — the host model sets temperature and pressure on the MICM
State.Rate constant calculation —
solver.CalculateRateConstants(state)calls MIAM’sUpdateStateParametersFunction, which evaluates temperature-dependent constants (HLC, K_eq, k_f, k_r) and writes them into state parameter columns.Solver iteration — the Rosenbrock solver calls MIAM’s
ForcingFunctionandJacobianFunctionat each internal stage. These functions:Query aerosol property providers for r_eff, N, φ_p (and their partial derivatives, for the Jacobian).
Compute condensation/evaporation rates.
Accumulate forcing terms and Jacobian entries.
State update — the solver writes the updated concentrations back into the
Stateobject.
Species Naming Convention#
State variable names follow a hierarchical pattern:
<mode_name>.<phase_name>.<species_name>
For example, a model named "CLOUD" with a SingleMomentMode named
"DROPLET" containing an aqueous phase produces variables like:
DROPLET.AQUEOUS.CO2DROPLET.AQUEOUS.H2O
Gas-phase species are registered directly by MICM with their short name
(e.g., CO2). When passed to MICM’s System constructor, the model
name is not prepended — only the representation and phase names form
the prefix.
Two-moment modes also introduce a number concentration variable:
AITKEN.number_concentration