gustavochm / phasepy

Other
82 stars 28 forks source link

Mixture not working #1

Closed dorox closed 5 years ago

dorox commented 5 years ago

The code from "phasepy/examples/Components and mixtures.ipynb" produces this:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-a71afce738b2> in <module>
----> 1 mix = mixture(ethanol, water)
      2 mix.names
      3 ['ethanol', 'water']
      4 mix.nc
      5 2

~/anaconda3_501/lib/python3.6/site-packages/phasepy/mixtures.py in __init__(self, component1, component2)
    247         self.GC = [component1.GC,  component2.GC]
    248 
--> 249         self.m = [component1.m, component2.m]
    250         self.sigma = [component1.sigma, component2.sigma]
    251         self.e = [component1.e, component2.e]

AttributeError: 'component' object has no attribute 'm'
gustavochm commented 5 years ago

Sorry about that there was some parameters that I forgot to erase for the new saft vr mie for mixtures, the code has been updated and should been working.

Greets

dorox commented 5 years ago

Thanks, I've ended up using https://github.com/CalebBell/thermo , All the best