-
Notifications
You must be signed in to change notification settings - Fork 114
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
New function - calculate bubble point temperature + minor edit to chemicals #6
Conversation
Hello Enrique, I am glad you have found thermo of use to you. I am accepting the pull with gratitude, especially for finding the currently failing test. The bubble P solution function is nice, and I really appreciate the effort you have put into adding the test and the documentation. I have been working on a rigorous module, thermo.property_package, which will allow for a wide range of flash specifications. Currently, the ideal package, and two UNIFAC variants are implemented. I cannot make a prediction about when it will be finished or what it will include when it is done. I hope to tie it into the Mixture framework smoothly. An example of using it is below. If you have any feedback on the interface, I would be happy to hear it. Eventually after the interface is stabilized, the individual functions such as bubble_at_P will be marked as deprecated and/or removed as they are less capable. One thing that is key to a good flash solver is using a bounded optimization method. For instance, your method would not work if the critical temperatures of all the species in the mixture were under 300 K.
|
Thank you Caleb, I very much appreciate the your speedy response and feedback! I was on vacation over the weekend and haven't found time to respond until today. I agree, using a fixed 300 K was an oversight on my part. I was too focused on my current problem rather than thinking about a general case. I should expand the test coverage for this function, but probably only for other basic cases given its scheduled deprecation. I've only had a brief chance to go over the new property_package so I don't have much input to add yet. I like where its going. My only suggestion would be to return the calculated values directly and possibly divide up some of the function calls. The idea being to make the vle package more standalone for when mixtures aren't fully needed. Returning a namedtuple would allow usage like this:
|
Hi Caleb,
This project is really nice! I found your project just last week or so, and have been playing around with it since. I'm amazed at the work you have here.
This pull request adds a function that calculates the bubble point temperature given a composition and pressure. In the process, I noticed that the chemicals test failed to initialize temperature for some components and fails. A small tweak fixes the issue, however, I'm not sure if the original placement was intentional.
I hope this helps. I'm greatly interested in helping out this project where and when I can.
-Enrique
P.S. Apologies for all the whitespace changes. My editor automatically removes them on saving. I can see about disabling that for future submissions.