0

I am trying the thermo library in python and want to calculate composition of 'milk of lime' and water however when I run the code below:

from thermo.chemical import Mixture
mix = Mixture(['water', 'Ca(OH)2'], Vfls=[.6, .4], T=300, P=1E5)
print(mix.Cp)

I get following error

TypeError: unsupported operand type(s) for /: 'float' and 'NoneType'

When I looked into thermo data it seems like some of the properties for 'Ca(OH)2' is None, am I assuming something wrong in water and 'Ca(OH)2' can be a mixture?

MikkelB
  • 53
  • 4

1 Answers1

0

@Cory Kramer

Traceback (most recent call last):
  File "path\VLE\chemprop.py", line 49, in <module>
    mix = Mixture(['water', 'Ca(OH)2'], Vfls=[.6, .4], T=300, P=1E5)
  File "path\Python\Python39\lib\site-packages\thermo\mixture.py", line 608, in __init__
    self.zs = Vfs_to_zs(Vfs, Vms_TP)
  File "path\Python\Python39\lib\site-packages\chemicals\utils.py", line 1519, in Vfs_to_zs
    v = Vfs[i]/Vms[i]
TypeError: unsupported operand type(s) for /: 'float' and 'NoneType'
MikkelB
  • 53
  • 4