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

Soave-Redlich-Kwong EOS #1423

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from
Draft

Soave-Redlich-Kwong EOS #1423

wants to merge 17 commits into from

Conversation

corykinney
Copy link
Contributor

@corykinney corykinney commented Jan 12, 2023

Closes Cantera/enhancements#159

Proposed changes:

  • Add SoaveRedlichKwong class
  • Moved shared cubic EoS functionality to MixtureFugacityTP

Derivations at https://github.com/corykinney/Soave-Redlich-Kwong.

To do:

  • Finish derivations and implementations for thermodynamic properties
  • Implement tests similar to RedlichKwongMFTP/PengRobinson
  • Consolidate shared functionality of all three in MixtureFugacityTP
  • Clean up commit history

Checklist

  • The pull request includes a clear description of this code change
  • Commit messages have short titles and reference relevant issues
  • Build passes (scons build & scons test) and unit tests address code coverage
  • Style & formatting of contributed code follows contributing guidelines
  • The pull request is ready for review

Copied from `PengRobinson`/`RedlichKwongMFTP`
Also copied over other variable declarations to the header file
Add `SoaveRedlichKwong` to `ThermoFactory`
Change coefficients to original SRK values
Fix build issues
Fix typo in `isothermal_compressibility` and `thermal_expansion_coeff` and remove unused variables
@codecov
Copy link

codecov bot commented Jan 12, 2023

Codecov Report

Merging #1423 (74d7624) into main (2ce92ea) will decrease coverage by 0.48%.
The diff coverage is 0.00%.

❗ Current head 74d7624 differs from pull request most recent head d9e783a. Consider uploading reports for the commit d9e783a to get more accurate results

@@            Coverage Diff             @@
##             main    #1423      +/-   ##
==========================================
- Coverage   70.78%   70.30%   -0.48%     
==========================================
  Files         373      375       +2     
  Lines       53872    54252     +380     
  Branches    17579    17707     +128     
==========================================
+ Hits        38131    38141      +10     
- Misses      13339    13709     +370     
  Partials     2402     2402              
Impacted Files Coverage Δ
include/cantera/thermo/SoaveRedlichKwong.h 0.00% <0.00%> (ø)
src/thermo/SoaveRedlichKwong.cpp 0.00% <0.00%> (ø)
src/thermo/ThermoFactory.cpp 78.71% <0.00%> (-0.40%) ⬇️

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Removed `getIsothermalCompressibility` and `getThermalExpansionCoeff` from `PengRobinson_Test` and `RedlichKwongMFTP_Test`.
Add finite difference tests to `TestConsistency` as `betaT_eq_minus_dmv_dP_const_T_div_mv` and `alphaV_eq_dmv_dT_const_P_div_mv`.
@corykinney
Copy link
Contributor Author

corykinney commented Apr 27, 2023

@ischoegl I'm currently working on this, and I had some questions regarding MixtureFugacityTP and how to refactor some things to simplify the common functionality between PengRobinson, RedlichKwongMFTP and the SoaveRedlichKwong class that I'm working on. Who would be best to direct the questions to?

@ischoegl
Copy link
Member

ischoegl commented Apr 27, 2023

@ischoegl I'm currently working on this, and I had some questions regarding MixtureFugacityTP and how to refactor some things to simplify the common functionality between PengRobinson, RedlichKwongMFTP and the SoaveRedlichKwong class that I'm working on. Who would be best to direct the questions to?

Likely @decaluwe or @speth. Thus far, I have more or less steered clear of equations-of-state related work, and don't know enough about the infrastructure. You may also ask @gkogekar as she implemented PengRobinson as far as I recall.

@wandadars
Copy link
Contributor

What else is needed to move this PR along @corykinney ?

@corykinney
Copy link
Contributor Author

What else is needed to move this PR along @corykinney ?

Hi, sorry for the delayed response @wandadars! I got a bit stuck at the derivation of the Helmholtz energy departure function and chemical potential, so if you are able to contribute to that, that would be great. I just haven't had the time to sit down and work through that part of the derivation. The progress I had implemented so far is summarized in the document I made up until that point https://github.com/corykinney/Soave-Redlich-Kwong/blob/main/SRK.pdf

@wandadars
Copy link
Contributor

Do you have a latex file for the document?

@corykinney
Copy link
Contributor Author

Do you have a latex file for the document?

I just uploaded the files to the repository if you want to take a look at them. I'm newer to LaTeX, so if it's a bit disorganized or not using best practices, that's why. I appreciate your help!

@ischoegl
Copy link
Member

Posting a link to a recent UG question here. What is the current status of this PR?

@corykinney
Copy link
Contributor Author

@ischoegl There's still a decent amount of work left to do on this pull request, as I rarely get opportunities to work on it anymore. I could draft a more detailed list of things already done/to do in case someone else wants to use this as a starting point before I come around to working on it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Soave-Redlich-Kwong (SRK) EOS
3 participants