gustavochm / phasepy

Other
87 stars 29 forks source link

Does the order in which mixture components are defined is important? #14

Closed CesarConopoima closed 2 years ago

CesarConopoima commented 2 years ago

Hello. Thanks for making this project available as a python package. I was testing your available example 4. Two phase flash (TP) and whilst testing I change the order of the components in which the mixture is defined. So in the 2nd code box I changed from.

mix = ethanol + water 
to 
mix = water + ethanol

And the result for the phase composition equilibrium is not the same. It seems that the answer is changed to the value of the composition (Z vector). I'm pretty interested in using this package for experimenting with ML models in order to improve the initial guess for the LV fractions. So, I'm concern in how to include more components into the mixture if an specific order is needed.

Thanks for your help!

CesarConopoima commented 2 years ago

I was doing a mistake. I did change the order of the mixture but did not change the vector composition order. So in the example ethanol passed to have more proportion than water. So, if I do change the composition to the original proportion water (0.6) and ethanol (0.4) the example just worked as expected.