This is probably not implemented correctly. The stability of the salt should be added into this calculation. The underlying water model may be called to get the stability of the pure water solution, if needed.
Make two solvent minimum fractions. One would be for calculation of the non-ideal factors. The other one would be for purposes of stoichiometry evaluation. the stoichiometry evaluation one would be a 1E-13 limit. Anything less would create problems with roundoff error.
Specify that the input mole, mass, and volume fraction vectors must sum to one on entry to the set state routines. Non-conforming mole/mass fraction vectors are not thermodynamically consistent. Moreover, unless we do this, the calculation of Jacobians will be altered whenever the treatment of non- conforming mole fractions is changed. Add setState functions corresponding to specifying mole numbers, which is actually what is being done (well one of the options, there are many) when non- conforming mole fractions are input. Note, we realize that most numerical Jacobian and some analytical Jacobians use non-conforming calculations. These can easily be changed to the set mole number setState functions.