CalebBell / thermo

Thermodynamics and Phase Equilibrium component of Chemical Engineering Design Library (ChEDL)
MIT License
594 stars 114 forks source link

Stream generation for air - cas_id references different chemical and H_reactive is attempted to use in calculation, but is None #143

Closed mikeyj777 closed 9 months ago

mikeyj777 commented 9 months ago

creating Stream to represent air:

s = Stream(IDs = ['132259-10-0'], ws=[1], m=0.27, T=298.15, P=101325)

During instantiation, Stream.set_extensive_properties() is called.

stream.py, line 1909: self.energy_reactive = self.H_reactive*self.m, the self.H_reactive property is None. Throws error.

stream.name is listed as "(2r)-4-methyl-2-(propan-2-yl)-2-[2-(4-{4-[2-(3,4,5-trimethoxyphenyl)ethyl]piperazin-1-yl}butoxy)phenyl]-2h-1,4-benzothiazin-3(4h)-one dihydrochloride"

CalebBell commented 9 months ago

Hi mikeyj777,

Looks like an issue in the pubchem metadata. I took a selection of it over 10 years ago and the issue is still there: https://pubchem.ncbi.nlm.nih.gov/#query=132259-10-0 Unfortunately I can't maintain that data since I took ~70000 elements from it and the Stream interface is outdated so I am closing this issue. If what you want to do is model the properties of air, please see the Phase and Flash interface and this example: https://thermo.readthedocs.io/Examples/Creating%20Nitrogen%2C%20oxygen%2C%20and%20nitrogen%20ternary%20air%20system%20phase%20envelope.html

Sincerely, Caleb

mikeyj777 commented 8 months ago

thank you for getting back to me! I used nitrogen in place of air, so should be a suitable substitution.