(mass-action-law-cross-phase-config)=
# Mass Action Law Cross Phase

**Group /input/model/unit_XXX(/particle_type_YYY)/phase_reaction_ZZZ/ - TYPE = MASS_ACTION_LAW_CROSS_PHASE**

For information on model equations, refer to {ref}`mass-action-law-model-cross-phase`.

`MAL_KFWD_LIQUID`

: Forward rate constants for particle liquid phase reactions (available for external functions)

  ```{list-table}

  * - **Type:** double
    - **Range:** $\geq 0$
    - **Length:** $\texttt{NREACT}$
  ```

`MAL_KBWD_LIQUID`

: Backward rate constants for particle liquid phase reactions (available for external functions)

  ```{list-table}

  * - **Type:** double
    - **Range:** $\geq 0$
    - **Length:** $\texttt{NREACT}$
  ```

`MAL_KFWD_SOLID`

: Forward rate constants for particle solid phase reactions (available for external functions)

  ```{list-table}

  * - **Type:** double
    - **Range:** $\geq 0$
    - **Length:** $\texttt{NREACT}$
  ```

`MAL_KBWD_SOLID`

: Backward rate constants for particle solid phase reactions (available for external functions)

  ```{list-table}

  * - **Type:** double
    - **Range:** $\geq 0$
    - **Length:** $\texttt{NREACT}$
  ```

`MAL_STOICHIOMETRY_LIQUID`

: Stoichiometric matrix of particle liquid phase reactions as $\texttt{NCOMP} \times \texttt{NREACT}$ matrix in row-major storage

  ```{list-table}

  * - **Type:** double
    - **Length:** $\texttt{NCOMP} \cdot \texttt{NREACT}$
  ```

`MAL_EXPONENTS_LIQUID_FWD`

: Forward exponent matrix of particle liquid phase reactions as $\texttt{NCOMP} \times \texttt{NREACT}$ matrix in row-major storage (optional, calculated from $\texttt{MAL_STOICHIOMETRY_LIQUID}$ by default)

  ```{list-table}

  * - **Type:** double
    - **Length:** $\texttt{NCOMP} \cdot \texttt{NREACT}$
  ```

`MAL_EXPONENTS_LIQUID_BWD`

: Backward exponent matrix of particle liquid phase reactions as $\texttt{NCOMP} \times \texttt{NREACT}$ matrix in row-major storage (optional, calculated from $\texttt{MAL_STOICHIOMETRY_LIQUID}$ by default)

  ```{list-table}

  * - **Type:** double
    - **Length:** $\texttt{NCOMP} \cdot \texttt{NREACT}$
  ```

`MAL_EXPONENTS_LIQUID_FWD_MODSOLID`

: Forward solid phase modifier exponent matrix of particle liquid phase reactions as $\texttt{NTOTALBND} \times \texttt{NREACT}$ matrix in row-major storage (optional, defaults to all 0)

  ```{list-table}

  * - **Type:** double
    - **Length:** $\texttt{NTOTALBND} \cdot \texttt{NREACT}$
  ```

`MAL_EXPONENTS_LIQUID_BWD_MODSOLID`

: Backward solid phase modifier exponent matrix of particle liquid phase reactions as $\texttt{NTOTALBND} \times \texttt{NREACT}$ matrix in row-major storage (optional, defaults to all 0)

  ```{list-table}

  * - **Type:** double
    - **Length:** $\texttt{NTOTALBND} \cdot \texttt{NREACT}$
  ```

`MAL_STOICHIOMETRY_SOLID`

: Stoichiometric matrix of particle solid phase reactions as $\texttt{NTOTALBND} \times \texttt{NREACT}$ matrix in row-major storage

  ```{list-table}

  * - **Type:** double
    - **Length:** $\texttt{NTOTALBND} \cdot \texttt{NREACT}$
  ```

`MAL_EXPONENTS_SOLID_FWD`

: Forward exponent matrix of particle solid phase reactions as $\texttt{NTOTALBND} \times \texttt{NREACT}$ matrix in row-major storage (optional, calculated from $\texttt{MAL_STOICHIOMETRY_SOLID}$ by default)

  ```{list-table}

  * - **Type:** double
    - **Length:** $\texttt{NTOTALBND} \cdot \texttt{NREACT}$
  ```

`MAL_EXPONENTS_SOLID_BWD`

: Backward exponent matrix of particle solid phase reactions as $\texttt{NTOTALBND} \times \texttt{NREACT}$ matrix in row-major storage (optional, calculated from $\texttt{MAL_STOICHIOMETRY_SOLID}$ by default)

  ```{list-table}

  * - **Type:** double
    - **Length:** $\texttt{NTOTALBND} \cdot \texttt{NREACT}$
  ```

`MAL_EXPONENTS_SOLID_FWD_MODLIQUID`

: Forward liquid phase modifier exponent matrix of particle solid phase reactions as $\texttt{NCOMP} \times \texttt{NREACT}$ matrix in row-major storage (optional, defaults to all 0)

  ```{list-table}

  * - **Type:** double
    - **Length:** $\texttt{NCOMP} \cdot \texttt{NREACT}$
  ```

`MAL_EXPONENTS_SOLID_BWD_MODLIQUID`

: Backward liquid phase modifier exponent matrix of particle solid phase reactions as $\texttt{NCOMP} \times \texttt{NREACT}$ matrix in row-major storage (optional, defaults to all 0)

  ```{list-table}

  * - **Type:** double
    - **Length:** $\texttt{NCOMP} \cdot \texttt{NREACT}$
  ```

## Examples

Cross-phase reactions couple the particle liquid and the particle solid phase, so they are
configured in a particle type. `NREAC_CROSS_PHASE` is set on the particle type itself, the
parameters of each reaction go into the subgroup `cross_phase_reaction_YYY`:

```
input.model.unit_000.particle_type_000.NREAC_CROSS_PHASE = 1
input.model.unit_000.particle_type_000.cross_phase_reaction_000.TYPE = 'MASS_ACTION_LAW_CROSS_PHASE'
input.model.unit_000.particle_type_000.cross_phase_reaction_000.MAL_KFWD_LIQUID = [1.0]
input.model.unit_000.particle_type_000.cross_phase_reaction_000.MAL_KFWD_SOLID = [1.0]
input.model.unit_000.particle_type_000.cross_phase_reaction_000.MAL_STOICHIOMETRY_LIQUID = [... length NCOMP*1 ...]
input.model.unit_000.particle_type_000.cross_phase_reaction_000.MAL_STOICHIOMETRY_SOLID = [... length NTOTALBND*1 ...]
```

## See also

- Single-phase variant: {ref}`mass-action-law-config`
