Closed ghost closed 2 years ago
Hi, can you specify:
import thermo
# code snippet here
File D:\Study\TFM-ASA\UCLouvain - Ecole Polytechnique de Louvain\LMECA2220 - Internal Combustion Engines\Assignment 1\modified Beau.py:77 in myfunc mix_prop.calculate(T=Tin) #calculation for the inlet mixture
Interestingly, the code worked [i got 100% grade automatically based on test cases]on the platform where i was supposed to submit it as an assignment, which may mean that platform was running the old thermo package but it kept showing me this error on my pc which led me to think that version of python may be causing the issue. I tried with all python versions upto 3.6 but the same error which led me to deduce maybe package has some bug. I dont want to downgrade the thermo package as I would better use 0.2.* so please help me solve this issue.
in the documentation for Legacy Mixtures, i could not find the calculate attribute. Has the calculate attribute been changed when thermo was upgraded from 0.1 to 0.2?
Hi,
I recommend people convert to the new interfaces, which are more consistent and eventually I aim to never change. The library is old but still has a long way to mature.
If you want to keep using the Mixture API, I believe the flash_caloric call is what you want, but I see in your code you are providing only T
. You will need to change it to provide P
as well. The thermodynamic consistency between liquid and vapor and in the supercritical region could be a lot better than it is with the Mixture API though, which is why I recommend using the new calls.
You are of course free to keep using old versions!
I hope this helps.
Sincerely, Caleb
Thank you for the clarification Caleb, I will definitely keep this in mind when i use the package again. I am happy to see that you have improved the library in the 0.2 version and its actually better to use the flash_caloric call indeed!
Best, Kunal
I was recently coding using Mixture object in thermo.chemical package. It kept giving me an error saying 'Mixture' object didnt have attribute 'calculate' When i changed the thermo version to 0.1.40, it worked.
Please fix the bus/issue.
Ps. I am using github for the first time, so please forgive me for the way of creating an issue, if wrong or let me know if you want any further information about my error.