-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add tp_flash & example notebook #56
Conversation
Thinking in terms of tests, what would say is the minimum required to ensure all aspects of your code works? Would just testing for two-phase equilibrium be sufficient? Or should we test three-phase as well? |
I think a two-phase test would be sufficient. There are a number of examples (with 2 and 3 species) in the example notebook. A three-phase simulation should work as well, but I believe you'd need >=4 species to see a 3-phase region of phase space at fixed p and T. |
There's a compatibility issue between BlackBoxOptim.jl and FillArrays.jl which we're trying to resolve. Really, we're just waiting for the BlackBoxOptim.jl folks to update their package... |
I've now switched the optimiser package to Metaheuristic such that we don't have a compatibility issue. I've also added a simple test. Do you think that's sufficient? |
If the test passes, merge it, we can iterate over it later |
Do you want to re-organise anything? |
Oh, yes, but if the functionality is working, the code reorganization can be done later |
Codecov Report
@@ Coverage Diff @@
## master #56 +/- ##
==========================================
+ Coverage 84.35% 84.37% +0.01%
==========================================
Files 112 113 +1
Lines 6877 6917 +40
==========================================
+ Hits 5801 5836 +35
- Misses 1076 1081 +5
Continue to review full report at Codecov.
|
Alright, after 3 runs, I still can't get all tests to pass but I think Andrés' other update should be able to handle it. |
Wonderful, thanks for making this process so smooth! I can see you have made my crude code more 'Julian' - I look forward to testing this to see if there are some performance improvements! |
This pull request contains a new file, src/methods/property_solvers/tp_flash/DifferentialEvolutiontp_flash.jl, in which a new function, tp_flash, is defined and exported. tp_flash solves the non-reactive flash problem via differential evolution.
I have also included an example notebook, examples/PTFlashDifferentialEvolution.ipynb, to demonstrate use of this function.
I am new to package development in julia, so I apologize if changes need to be made.
Feel free to free to use and modify this code in any way.