checkMoleFractions

Chemical Reactor Design Toolbox Reference Manual

ChemReactorDesign.Basic.Functions.checkMoleFractions

function x = checkMoleFractions(y)

The function calculates and adjusts the mole fraction of all species according to

\begin{equation*}
\underset{[N,1]}{\bf x} = \left(
\begin{array}{c}
max(0,y_{1}) \\ \cdots \\ max(0,y_{N-1}) \\  1 - \sum\limits_{i}^{N-1} max(0,y_{i})
\end{array}
\right)
\end{equation*}