Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thermo future development #53

Closed
tkeskita opened this issue Jul 4, 2020 · 3 comments
Closed

Thermo future development #53

tkeskita opened this issue Jul 4, 2020 · 3 comments

Comments

@tkeskita
Copy link
Contributor

tkeskita commented Jul 4, 2020

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 #48 you mention about a development version which includes classes for Phase, Flasher and EquilibriumState.

  • What is the development status now and how are you going to continue?
  • I didn't find any development branches on github? Could you please start to use one so that it is possible to follow your progress?
  • I think there is potential to expand your libraries towards research applications, like small scale equipment simulations (starting with flash drums) and maybe minor flowsheeting. Are you interested in those?

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
Copy link
Owner

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
Copy link
Contributor Author

Hello,

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

  • Thermo as a Python library has been around for long enough that some people might depend on it as-is and don't want it changed. Maybe best to start a new library effort?
  • Splitting high level functionality of thermo to another libraries is good idea, keep base lib focus clear. But where to draw the line?
  • Change to explicit operation (require user to select a method or allow "any" or raise error) is the right way to go.
  • Lazy loading (or late evaluation in general) sounds good, if it does not make code complex. In Python, speed is not a top priority.
  • Type annotations (https://docs.python.org/3/library/typing.html) is good idea (code should be written for readability)
  • Phase equilibria is huge field, I agree. Separate library is likely good idea, and its development should be thought of as highly experimental and prone to changes along the way.
  • I am interested in this open source development work, but only if it is done in public, so that people have opportunity to build and fork on even unfinished work.

Thanks!
BR,
Tuomo

@CalebBell
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants