(parameter-dependencies-config)=
# Parameter Dependencies

A description on parameter dependencies from a modeling perspective is provided under {ref}`parameter-dependencies`.

## Parameter-Parameter Dependencies

### Group /input/model/unit_XXX

`COL_DISPERSION_DEP`

: Parameter dependence of column dispersion on the interstitial velocity. Available for all 1D units and both the FV and DG discretization.
  For the DG discretization, `DISPERSION_SPATIAL_DEPENDENCE_POLYDEG` must additionally be set (see below).

  ```{list-table}

  * - **Type:** string
    - **Range:** $\texttt{POWER_LAW}, \texttt{VAN_DEEMTER}$
    - **Length:** 1
  ```

`DISPERSION_SPATIAL_DEPENDENCE_POLYDEG`

: Quadrature polynomial degree used to evaluate the position-dependent (velocity-dependent) dispersion integral when `COL_DISPERSION_DEP` is set together with DG bulk discretization. Required in that case only; ignored for FV.

  ```{list-table}

  * - **Type:** int
    - **Range:** $\geq 0$
    - **Length:** 1
  ```

### Group /input/model/unit_XXX/particle_type_YYY

`FILM_DIFFUSION_DEP`

: Parameter dependence of film diffusion on the interstitial velocity.
  Available for all 1D unit operations and both the FV and DG discretizations.
  For the DG discretization there might be a loss of accuracy since the current implementation only supports a pointwise/"mass-lumped" evaluation.

  ```{list-table}

  * - **Type:** string
    - **Range:** $\texttt{POWER_LAW}, \texttt{VAN_DEEMTER}$
    - **Length:** 1
  ```

#### **Correlations**

Different types of parameter correlations can be applied.
The following correlations can be used for all parameter-parameter dependencies, but we specify the required input fields only for `COL_DISPERSION_DEP`, for the sake of conciseness.

**Power Law**

$$
\begin{aligned}
    p_{dep} &= p_{dep} \cdot b \ |p_{on}^x|
\end{aligned}
$$

Here, $p_{dep}$ is the dependent parameter and $p_{on}$ is the parameter it depends on.

`COL_DISPERSION_DEP_BASE`

: Base $b$ of the power law parameter dependence. Optional, defaults to $1.0$

  ```{list-table}

  * - **Type:** double
    - **Range:** $\mathbb{R}$
    - **Length:** 1
  ```

`COL_DISPERSION_DEP_EXPONENT`

: Exponent $x$ of the power law parameter dependence

  ```{list-table}

  * - **Type:** double
    - **Range:** $\mathbb{R}$
    - **Length:** 1
  ```

`COL_DISPERSION_DEP_ABS`

: Specifies whether or not the absolute value should be computed. Optional, defaults to $1$

  ```{list-table}

  * - **Type:** int
    - **Range:** $\{0, 1\}$
    - **Length:** 1
  ```

**Van Deemter**

The van Deemter parameter dependence reproduces the classical van Deemter plate-height correlation $H(v) = A + B / |v| + C\, |v|$ and applies it to a dispersion-type parameter via the standard equilibrium-dispersive-model relation $D_\mathrm{ax}(v) = H(v)\, v / 2$.
Concretely,

$$
\begin{aligned}
    p_{dep} &= p_{dep} \cdot \left( A\, |p_{on}| + B + C\, p_{on}^2 \right) / 2
\end{aligned}
$$

Here, $p_{dep}$ is the dependent parameter (e.g. `COL_DISPERSION`) and $p_{on}$ is the parameter it depends on (e.g. the local interstitial velocity).
Using this dependence with the associated base parameter left at its default (dimensionless placeholder $1$) directly evaluates $D_\mathrm{ax}(v) = H(v)\, v / 2$ for a local, velocity-dependent plate height $H(v)$.
Unlike `POWER_LAW`, the absolute value of $p_{on}$ is always taken (there is no `_ABS` flag).

`COL_DISPERSION_DEP_A`

: Coefficient $A$ (eddy diffusion / flow-independent term) of the van Deemter parameter dependence

  ```{list-table}

  * - **Type:** double
    - **Range:** $\mathbb{R}$
    - **Length:** 1
  ```

`COL_DISPERSION_DEP_B`

: Coefficient $B$ (longitudinal molecular diffusion term) of the van Deemter parameter dependence

  ```{list-table}

  * - **Type:** double
    - **Range:** $\mathbb{R}$
    - **Length:** 1
  ```

`COL_DISPERSION_DEP_C`

: Coefficient $C$ (mass transfer resistance term) of the van Deemter parameter dependence

  ```{list-table}

  * - **Type:** double
    - **Range:** $\mathbb{R}$
    - **Length:** 1
  ```

## Parameter-State Dependencies

Currently, the dependence of surface diffusion on the particle liquid salt component is the only available parameter-state dependence and is only implemented for the arrow-head optimized (see `FV_ARROW_HEAD_OPTIMIZATION`) GRM unit.

### Group /input/model/unit_XXX/particle_type_YYY

`SURFACE_DIFFUSION_DEP`

: Parameter dependence of $\texttt{SURFACE_DIFFUSION}$ on the particle liquid salt component (i.e. component with index 0). Valid dependencies are:

  - $\texttt{NONE}$ Original parameter is used unmodified.
  - $\texttt{LIQUID_SALT_EXPONENTIAL}$ Original parameter is modified by exponential law of liquid phase salt concentration.
  - $\texttt{LIQUID_SALT_POWER}$ Original parameter is modified by power law of liquid phase salt concentration.
  - $\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}$ Original parameter is modified by colloidal binding affinity based on liquid phase salt concentration.

  Optional: If left out, no parameter dependence is assumed and the original surface diffusion coefficients are used unmodified.
  The field is read from `particle_type_000`; a single entry is applied to all particle types.

  ```{list-table}

  * - **Type:** string
    - **Range:** $\{\texttt{NONE}, \texttt{LIQUID_SALT_EXPONENTIAL}, \texttt{LIQUID_SALT_POWER}, \texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}\}$
    - **Length:** $1 / \texttt{NPARTYPE}$
  ```

`SURFACE_DIFFUSION_EXPFACTOR`

: Factor $\texttt{p1}$ in exponential law particle surface diffusion relation
  $D_{s, i, m} = \tilde{D}_{s, i, m} p_{1, i, m} exp \left(p_{2, i, m} c_{0}^{p} \right)$, where $\tilde{D}_{s, i, m}$ is the original surface diffusion coefficient.
  Only required if $\texttt{SURFACE_DIFFUSION_DEP}$ is $\texttt{LIQUID_SALT_EXPONENTIAL}$.

  ```{list-table}

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

  If $\texttt{SURFACE_DIFFUSION_DEP}$ is $\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}$, this is factor $\texttt{p6}$ in the colloidal affinity law particle surface diffusion relation
  $D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} + p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]$
  where $\tilde{D}_{s, i, m}$ is the original surface diffusion coefficient and
  $k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}$.
  Only required if $\texttt{SURFACE_DIFFUSION_DEP}$ is $\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}$.

  ```{list-table}

  * - **Type:** double
    - **Range:** $\mathbb{R}$
    - **Length:** $\texttt{NBOUND}$
  ```

`SURFACE_DIFFUSION_EXPARGMULT`

: Factor $\texttt{p2}$ in exponential law particle surface diffusion relation
  $D_{s, i, m} = \tilde{D}_{s, i, m} p_{1, i, m} exp \left(p_{2, i, m} c_{0}^{p} \right)$
  where $\tilde{D}_{s, i, m}$ is the original surface diffusion coefficient. Only required if $\texttt{SURFACE_DIFFUSION_DEP}$ is $\texttt{LIQUID_SALT_EXPONENTIAL}$ or $\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}$; in the latter, it is factor $\texttt{p7}$ of the colloidal affinity law (see $\texttt{SURFACE_DIFFUSION_LOGKEQFACTOR}$).

  ```{list-table}

  * - **Type:** double
    - **Range:** $\mathbb{R}$
    - **Length:** $\texttt{NBOUND}$
  ```

`SURFACE_DIFFUSION_POWFACTOR`

: Factor $\texttt{p1}$ in power law particle surface diffusion relation
  $D_{s, i, m} = \tilde{D}_{s, i, m} p_{1, i, m} \left( c_{0}^{p} \right)^{p_{2, i, m}}$
  where $\tilde{D}_{s, i, m}$ is the original surface diffusion coefficient. Only required if $\texttt{SURFACE_DIFFUSION_DEP}$ is $\texttt{LIQUID_SALT_POWER}$ or $\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}$; in the latter, it is factor $\texttt{p4}$ of the colloidal affinity law (see $\texttt{SURFACE_DIFFUSION_LOGKEQFACTOR}$).

  ```{list-table}

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

`SURFACE_DIFFUSION_POWEXP`

: Factor $\texttt{p2}$ in power law particle surface diffusion relation
  $D_{s, i, m} = \tilde{D}_{s, i, m} p_{1, i, m} \left( c_{0}^{p} \right)^{p_{2, i, m}}$
  where $\tilde{D}_{s, i, m}$ is the original surface diffusion coefficient. Only required if $\texttt{SURFACE_DIFFUSION_DEP}$ is $\texttt{LIQUID_SALT_POWER}$ or $\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}$; in the latter, it is factor $\texttt{p5}$ of the colloidal affinity law (see $\texttt{SURFACE_DIFFUSION_LOGKEQFACTOR}$).

  ```{list-table}

  * - **Type:** double
    - **Range:** $\mathbb{R}$
    - **Length:** $\texttt{NBOUND}$
  ```

`SURFACE_DIFFUSION_LOGKEQFACTOR`

: Factor $\texttt{p1}$ in colloidal affinity law particle surface diffusion relation
  $D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} + p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]$
  where $\tilde{D}_{s, i, m}$ is the original surface diffusion coefficient and
  $k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}$.
  Only required if $\texttt{SURFACE_DIFFUSION_DEP}$ is $\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}$.

  ```{list-table}

  * - **Type:** double
    - **Range:** $\mathbb{R}$
    - **Length:** $\texttt{NBOUND}$
  ```

`SURFACE_DIFFUSION_LOGKEQEXP`

: Factor $\texttt{p2}$ in colloidal affinity law particle surface diffusion relation
  $D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} + p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]$
  where $\tilde{D}_{s, i, m}$ is the original surface diffusion coefficient and
  $k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}$.
  Only required if $\texttt{SURFACE_DIFFUSION_DEP}$ is $\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}$.

  ```{list-table}

  * - **Type:** double
    - **Range:** $\mathbb{R}$
    - **Length:** $\texttt{NBOUND}$
  ```

`SURFACE_DIFFUSION_LOGKEQCONST`

: Factor $\texttt{p3}$ in colloidal affinity law particle surface diffusion relation
  $D_{s, i, m} = \tilde{D}_{s, i, m} \left[ p_{4, i, m} \left( k_{i, m} \left( c_{0}^{p} \right) \right)^{p_{5, i, m}} + p_{6, i, m} exp \left( p_{7, i, m} k_{i, m} \left( c_{0}^{p} \right) \right) \right]$
  where $\tilde{D}_{s, i, m}$ is the original surface diffusion coefficient and
  $k_{i, m} \left( c_{0}^{p} \right) = p_{1, i, m}\left( c_{0}^{p} \right)^{p_{2, i, m}} + p_{3, i, m}$.
  Only required if $\texttt{SURFACE_DIFFUSION_DEP}$ is $\texttt{LIQUID_SALT_COLLOIDAL_AFFINITY}$.

  ```{list-table}

  * - **Type:** double
    - **Range:** $\mathbb{R}$
    - **Length:** $\texttt{NBOUND}$
  ```

## Dependence on external functions

Dependence on external functions is currently only implemented for binding model parameters, as detailed in {ref}`dependence-on-external-function-bind`.
