Before _constSolidVolume was always zero because the state of init_liquid_volume was declared after the parameters.
To fix this, there is now a variable init_liquid_volume to calculate _constSolidVolume even if the state is not set.
Additionally the calculation of _constSolidVolume has been fixed:
Before we calculated
$$
V^{s} = V^{l}*(1-\varepsilon)
$$
which is wrong because we distinguish between the total volume of the reaction $V^{total}$ and the volumes of the liquid and solid phases.
Instead we now calculate
Fixes #308
Before
_constSolidVolume
was always zero because the state ofinit_liquid_volume
was declared after the parameters.To fix this, there is now a variable
init_liquid_volume
to calculate_constSolidVolume
even if the state is not set. Additionally the calculation of_constSolidVolume
has been fixed:Before we calculated
$$ V^{s} = V^{l}*(1-\varepsilon) $$
which is wrong because we distinguish between the total volume of the reaction $V^{total}$ and the volumes of the liquid and solid phases. Instead we now calculate
$$ V^{s} = V^{total}(1-\varepsilon) = \frac{V^{l}}{(1-\varepsilon)} - V^{l}. $$
For the last equation we used that $(1-\varepsilon) = \frac{V^{l}}{V^{l} + V^{s}} \Leftrightarrow \frac{V^{l}}{(1-\varepsilon)} - V^{l}$