VirtualFCS.Media.PartialCondensingMixture.liquidMolarFractions

Given a generalised molar vaporisation ratio β, molar fractions Xmol and inverted equilibrium constants iK, the function returns the corresponding molar fractions in the liquid phase.
Note that, if β≤0 (i.e. only liquid), the liquid concentrations are simply the overall ones.

The case of β≥1 is a bit more thorny since no liquid phase exist, and the liquid fractions do not have a physical meaning, but must be defined nevertheless to ensure continuity of variables.
The algorithm first attempts to use iK*Xmol as the composition of the first droplet to form, but before normalising by dividing by Σ iK*Xmol, it checks whether the array is zero: this happens in corner cases such as dry air. In that case, it assumes a liquid composition of iK/Σ iK, which is the limit for the overall fractions of all condensable species tending to zero at the same rate.