CalebBell / thermo

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

Calculate_PH #46

Closed allanc1 closed 4 years ago

allanc1 commented 4 years ago

Caleb

Are you able to give an example of how to calculate T given P & H?

Regards

Allan

CalebBell commented 4 years ago

Hi Allan,

There is limited support:

In [1]: from thermo import *                                                         
In [2]: m = Mixture(['nitrogen', 'oxygen'], zs=[.79, .21], T=500.0, P=101325.0)      
In [3]: m.H                                                                          
Out[3]: 206381.15752670215
In [4]: m.calculate_PH(101325.0, 206381.15752670215)                                 
Out[4]: 500.0

Sincerely, Caleb

allanc1 commented 4 years ago

Hi Caleb

That's fine and all I need. Once I have the temperature then I can get all the other properties from PT.

Kind regards

Allan