CalebBell / thermo

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

Thermo future development #53

Closed tkeskita closed 3 years ago

tkeskita commented 3 years ago

Hello @CalebBell ,

thanks for your work on Thermo, Fluids and other Python chemical engineering libs! These seem to be exceptionally coherent, maintainable and good quality libraries, with literature references and nice documentation.

About roadmap: On README you mention phase equilibrium as your current main development item. Also, in the pull request https://github.com/CalebBell/thermo/pull/48 you mention about a development version which includes classes for Phase, Flasher and EquilibriumState.

About execution speed: I got the impression that you are concerned about speed. In my experience, access to clean but slow (hopefully also robust) methods is far better than access to no methods. Speedier alternative methods can always be provided afterwards, if there is time for development and code size remains manageable. Any comments on this?

Hope to hear about your current thoughts, thanks!

CalebBell commented 3 years ago

Hi, My current focus is actually toying with refactoring the library into multiple libraries. Thermo contained too much unrelated functionality and the the scope is huge! Classes like Mixture and Chemical have been a huge challenge to be maintainable - frankly they over-promise by providing a default way to do things. It is not very encouraging to get bug reports complaining someone's table in the back of a textbook disagrees with thermo by 1%, even in the case thermo is more accurate. The load time of thermo is huge also, lazy loading needs to be a part of its future. I have fluids loading in 10 ms now, and hope to get the feature set of thermo in a similar time frame.

Phase equilibrium continues to be in my focus also - it is very challenging to get the right answers, and the literature is full of active developments in that area. I released an incomplete set of answers once with not great abstractions, and I do not plan on doing so ago.

Flowsheeting applications are really cool. I am generally interested in providing correlations and letting users build their own models for such high level stuff - trying to make it easier for the state of the art to advance in other fields like catalysis, or heat exchanger design. Understanding completely the model you build is a huge advantage that I really think helps people do a better job. Some other things, like a PH flash for flash drums, I have well underway and are planned to be a core feature set at some point. I am interested in helping with modeling but more importantly to me, as a field Chemical Engineering has struggled to get new correlations out and distributed. So for example if someone comes up with a new correlation for estimating flash drum holdups, I hope that could make its way into fluids.separator.

I am doing my best to keep fluids and ht fully maintained and adding new functionality periodically while I work on the future of thermo. Please note that I am working hard but I do not have a time frame for major updates. I'm not sure what to say about the development status - releasing a fully featured library is often a more challenging aspect than developing something and I think that is the case here.

I am also trying to catch up on the new technologies that have came up in Python lately, starting with my fluids library. I have started adding type stubs - which is very exciting to me; as well as a strange new world.

I guess if you or someone else have lots of spare time to please PM me and I will try to put you to use working on the upgrade.

Sincerely, Caleb

tkeskita commented 3 years ago

Hello,

thanks for your reply! I still need to go through more thermo code, but brief comments so far:

Thanks! BR, Tuomo

CalebBell commented 3 years ago

For anyone reaching this issue in the future, a new release with a whole bunch more features and documentation is out as of yesterday, April 14, 2021. Hopefully the library will be much easier to maintain in the future, and allow it to grow with less pain.