MolalityUtils.hpp
70 //-----------------------------------------------------------------------------------------------------
72 //-----------------------------------------------------------------------------------------------------
73 // \frac{\partial m_{i}}{\partial n_{j}}=m_{i}\left(\frac{\delta_{ij}}{n_{i}}-\frac{\delta_{jw}}{n_{w}}\right)
75 //-----------------------------------------------------------------------------------------------------
119 //-----------------------------------------------------------------------------------------------------
121 //-----------------------------------------------------------------------------------------------------
122 // \frac{\partial\ln m_{i}}{\partial n_{j}}=\frac{1}{m_{i}}\frac{\partial m_{i}}{\partial n_{j}}=\left(\frac{\delta_{ij}}{n_{i}}-\frac{\delta_{jw}}{n_{w}}\right)
124 //-----------------------------------------------------------------------------------------------------
164 //-----------------------------------------------------------------------------------------------------
166 //-----------------------------------------------------------------------------------------------------
169 // \dfrac{\partial\ln a_{w}}{\partial n_{i}}=\begin{cases}-\dfrac{1}{n_{w}} & i\neq w\\\dfrac{n_{\Sigma}-n_{w}}{n_{w}^{2}} & i=w\end{cases}
170 //-----------------------------------------------------------------------------------------------------
The namespace containing all components of the Reaktoro library.
Definition: Algorithms.hpp:29
auto lnMolalitiesJacobian(ArrayConstRef &&n, Index iH2O, MatrixRef &&J) -> void
Compute the Jacobian matrix of the species molalities in natural log ( ).
Definition: MolalityUtils.hpp:117
auto molalitiesJacobian(ArrayConstRef &&n, Index iH2O, MatrixRef &&J)
Compute the Jacobian matrix of the species molalities ( ).
Definition: MolalityUtils.hpp:68
Eigen::Matrix< T, -1, -1, 0, -1, -1 > MatrixX
Convenient alias to Eigen type.
Definition: Matrix.hpp:42
auto molalities(ArrayConstRef &&n, Index iH2O, ArrayRef &&m)
Compute the molalities of the species with given species amounts.
Definition: MolalityUtils.hpp:32
const double waterMolarMass
The molar mass of water in units of kg/mol.
Definition: WaterConstants.hpp:23
Eigen::Array< T, -1, 1, 0, -1, 1 > ArrayX
Convenient alias to Eigen type.
Definition: Matrix.hpp:46
auto lnMolalitiesJacobianDiagonal(ArrayConstRef &&n, Index iH2O, VectorRef &&D) -> void
Compute the diagonal only of the Jacobian matrix of the species molalities in natural log ( ).
Definition: MolalityUtils.hpp:162