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

Implementation of Peng-Robinson EoS #641

Closed
wants to merge 110 commits into from

Commits on Mar 19, 2021

  1. Implementation of Peng-Robinson equation of state.

    Implemetation of Peng-Robinson equation of state
    
    added factories for FlowDevice and Wall objects
    
    Updating `thermo/PengRobinsonMFPT` class addition.
    
    -Adds `test/data/co2_PR_exmample.cti` for testing.
    -Corrects typo in `src/thermo/PengRobinsonMFTP::setSpeciesCoeffs`
    -Minor formatting changes (indentations)
    -Change how `Vroot_` is initialized.
    
    Updating ctml_writer.py to include acentric_factor
    Updating a typo in PengRobinsonMFTP.cpp
    
    Updating ctml_writer.py to add units for b_coeff
    
    Updating ctml_writer.py to add units for b_coeff with correct
    indentation
    
    Correcting a mistake in the getActivityCoefficient subroutine
    
    Updating PengRobinson_Test.cpp with accurate hard-coded values
    
    Adding a test getPressure in PengRobinsonMFTP_Test.cpp file
    
    Fixing tabs and spaces
    
    Replacing 'doublereal' with 'double'
    
    Fixing tabs and spaces in the CTI file
    
    Adding comments and renaming few parameter names
    
    Fixing tabs and spaces
    
    Following modifications in the code are performed:
    
    1. Fixing typos
    2. Adding more detailed documentation
    3. Deleting redundant variables
    
    Fixing typos and comments in the cubic solver
    
    Fixing typos in PengRobinsonMFTP.h
    
    Replacing (molecularWt/rho) calculations by molarVolume() function
    
    Modifying tests with tighter tolerances
    
    Modifying comments and reference for cubic solver
    
    Replacing sqrt(2) with math constant M_SQRT2
    
    Modification in cubic solver with additional comments and removal of
    redundant code
    Gandhali Kogekar authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    83080a1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f9145df View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    151a486 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3fbb73f View commit details
    Browse the repository at this point in the history
  5. Abstracting thermo calcs from PengRobinson and RedlichKwong up to Mix…

    …tureFugacityTP
    decaluwe authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    b0d1333 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1bee6cf View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0ffbe6b View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fa3c776 View commit details
    Browse the repository at this point in the history
  9. Fix species coefficient updates in PengRobinson.

    -Species coefficients were using phase critical termperature, rather than species critical temepratures.
    -Fixing this required updates to regression tests.
    -Removed commented code from previous commit (removing XML capabilities)
    decaluwe authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    bc06b6d View commit details
    Browse the repository at this point in the history
  10. Deleting test/data/co2_PR_example.cti

    decaluwe authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    bf5102a View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    4680886 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9f59243 View commit details
    Browse the repository at this point in the history
  13. Adding ThermoFromYAML:PengRobinson_CO2 test

    - Creates CO2-PR phase in test/data/thermo-models.yaml
    - Creates `PengRobinson_CO2` test in test/thermo/thermoFromYAML.cpp
    - Fixes minor capitalization typo in PengRobinson:calculateAlpha
    decaluwe authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    c40bd53 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    8ee1372 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    09d520a View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    759e738 View commit details
    Browse the repository at this point in the history
  17. Testing critical property lookup for PengRobinson.

    Deletes CO2 interaction parameters from co2_PR_example.yaml, such that
    phase construction in PengRobinson_Test.cpp covers the cirtical property
    lookup capabilities in PengRobinson::getCoeff. Note that this required
    changing some of the regression test expected values, as the critical
    properties don't correspond perfectly with the interaction parameters
    previously stored in co2_PR_exmple.yaml.
    decaluwe authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    ffee0f7 View commit details
    Browse the repository at this point in the history
  18. Adding cubic solver test

    decaluwe authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    defe2df View commit details
    Browse the repository at this point in the history
  19. Add functions for factory alias management

    This allows for error checking at the time of adding the alias, as well as
    providing a public interface for adding aliases.
    speth authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    835198e View commit details
    Browse the repository at this point in the history
  20. Implementation of Peng-Robinson equation of state.

    Implemetation of Peng-Robinson equation of state
    
    added factories for FlowDevice and Wall objects
    
    Updating `thermo/PengRobinsonMFPT` class addition.
    
    -Adds `test/data/co2_PR_exmample.cti` for testing.
    -Corrects typo in `src/thermo/PengRobinsonMFTP::setSpeciesCoeffs`
    -Minor formatting changes (indentations)
    -Change how `Vroot_` is initialized.
    
    Updating ctml_writer.py to include acentric_factor
    Updating a typo in PengRobinsonMFTP.cpp
    
    Updating ctml_writer.py to add units for b_coeff
    
    Updating ctml_writer.py to add units for b_coeff with correct
    indentation
    
    Correcting a mistake in the getActivityCoefficient subroutine
    
    Updating PengRobinson_Test.cpp with accurate hard-coded values
    
    Adding a test getPressure in PengRobinsonMFTP_Test.cpp file
    
    Fixing tabs and spaces
    
    Replacing 'doublereal' with 'double'
    
    Fixing tabs and spaces in the CTI file
    
    Adding comments and renaming few parameter names
    
    Fixing tabs and spaces
    
    Following modifications in the code are performed:
    
    1. Fixing typos
    2. Adding more detailed documentation
    3. Deleting redundant variables
    
    Fixing typos and comments in the cubic solver
    
    Fixing typos in PengRobinsonMFTP.h
    
    Replacing (molecularWt/rho) calculations by molarVolume() function
    
    Modifying tests with tighter tolerances
    
    Modifying comments and reference for cubic solver
    
    Replacing sqrt(2) with math constant M_SQRT2
    
    Modification in cubic solver with additional comments and removal of
    redundant code
    Gandhali Kogekar authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    8edf261 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    fc650ad View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    6ecfec3 View commit details
    Browse the repository at this point in the history
  23. Fixing typo in previous commit.

    decaluwe authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    d2ec337 View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    8828ef9 View commit details
    Browse the repository at this point in the history
  25. Cleaning up typos and merge conflicts.

    Cleaning up merge conflicts in src/thermo/PengRobinson.cpp
    Cleaning up `addAlias` typos in src/thermo/ThermoFactory.cpp
    decaluwe authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    ef8b92c View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    b8ff389 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    dfdaa82 View commit details
    Browse the repository at this point in the history
  28. Adding following tests to PengRobinson_Test.cpp to verify that

    1. g = h- T*s
    2. cp = dH/dT at constant pressure using Finite difference method
    3. molar enthalpy = \sum x_k h_k
    gkogekar authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    32af524 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    1eca522 View commit details
    Browse the repository at this point in the history
  30. Cleaning up thermo/PengRobinson

    -Temperature input not needed in PengRobinson:calculateAB
    -Unused variable RT in PengRobinson_Test/totalEnthalpy
    -Replacing duplicative code with call to calcualteAB
    decaluwe authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    26149ca View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    7402961 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    bb97af2 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    5032994 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    423154f View commit details
    Browse the repository at this point in the history
  35. Removing dependancy of EoS specific omega_a, omega_b parameters from …

    …solveCubic
    
    function in MixtureFugacityTP class.
    gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    e6f6b9d View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    04f0a80 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    92b66d5 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    29c6844 View commit details
    Browse the repository at this point in the history
  39. Removing getChemPotentials_RT function from PengRobinsonMFTP since it is

    already defined in the parent class MixtureFugacityTP.
    gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    83bc2be View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    768053c View commit details
    Browse the repository at this point in the history
  41. Fixing indentation and white spaces

    gkogekar authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    7e69a65 View commit details
    Browse the repository at this point in the history
  42. Modifying comments and correcting typos

    gkogekar authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    fded715 View commit details
    Browse the repository at this point in the history
  43. Replacing line endings with LF instead of CRLF

    gkogekar authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    df22aa7 View commit details
    Browse the repository at this point in the history
  44. Modified Peng-Robinson to test file to read phase from

    thermo-models.yaml
    gkogekar authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    891ce6c View commit details
    Browse the repository at this point in the history
  45. clearing the merge-conflict

    gkogekar authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    f8d7ee0 View commit details
    Browse the repository at this point in the history
  46. Modifying the explaination for solveCubic function to be more clear and

    explicit.
    gkogekar authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    4fe68b6 View commit details
    Browse the repository at this point in the history
  47. Adding a python test in interface/cython test suite

    gkogekar authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    fcab6f2 View commit details
    Browse the repository at this point in the history
  48. Fixing error in test_thermo.py

    gkogekar authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    ffaaa77 View commit details
    Browse the repository at this point in the history
  49. Indentation changes in the PengRobinson.cpp

    Co-authored-by: Ray Speth <speth@mit.edu>
    2 people authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    5d67a47 View commit details
    Browse the repository at this point in the history
  50. Update include/cantera/thermo/PengRobinson.h

    Co-authored-by: Ray Speth <speth@mit.edu>
    2 people authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    59e13a8 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    8562bb7 View commit details
    Browse the repository at this point in the history
  52. Removed the changes for P-R EoS model in ctml_writer.py, since the

    CTI/XML option is not implemented for Peng-Robinson EoS model.
    gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    fdfcc31 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    bfaae6d View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    71f124e View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    2e46979 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    61d1fe4 View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    0e81424 View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    b57740a View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    f2cd14d View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    7d1ad7e View commit details
    Browse the repository at this point in the history
  61. Changed the function name 'pressureDerivatives' to

    'calculatePressureDerivatives'
    gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    137deb6 View commit details
    Browse the repository at this point in the history
  62. Configuration menu
    Copy the full SHA
    157291d View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    46f3115 View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    21bd4e0 View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    131fa19 View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    5e83651 View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    91cc8df View commit details
    Browse the repository at this point in the history
  68. Configuration menu
    Copy the full SHA
    0687e6d View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    5b2e0f8 View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    76bb6bf View commit details
    Browse the repository at this point in the history
  71. Cleaning up functions to calculate critical properties in Redlich-Kwong

    and Peng-Robinson classes
    1. Declared calcCriticalConditions() as virtual in MixtureFugacityTP class.
    2. Moved all functions to calculate critical properties to the parent
       (MixtureFugacityTP) class.
    gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    5d3e6df View commit details
    Browse the repository at this point in the history
  72. Configuration menu
    Copy the full SHA
    a180bab View commit details
    Browse the repository at this point in the history
  73. Configuration menu
    Copy the full SHA
    1e142e4 View commit details
    Browse the repository at this point in the history
  74. Configuration menu
    Copy the full SHA
    d620b1a View commit details
    Browse the repository at this point in the history
  75. Reading w_ac (acentric factor) with a more useful message that will

    point to the source of the error accurately
    gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    6823f68 View commit details
    Browse the repository at this point in the history
  76. Correcting CRLF Line endings.

    decaluwe authored and gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    6a7f2b2 View commit details
    Browse the repository at this point in the history
  77. Rebasing with Cantera/main

    gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    666f285 View commit details
    Browse the repository at this point in the history
  78. Removing redundant _updateStateThermo() call from thermodynamic

    calculations and also rebasing with cantera/main
    gkogekar committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    404a5f7 View commit details
    Browse the repository at this point in the history
  79. Configuration menu
    Copy the full SHA
    4ea8da6 View commit details
    Browse the repository at this point in the history
  80. Configuration menu
    Copy the full SHA
    9508428 View commit details
    Browse the repository at this point in the history
  81. Configuration menu
    Copy the full SHA
    5e3fb4c View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2021

  1. Configuration menu
    Copy the full SHA
    7fee130 View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2021

  1. Update include/cantera/thermo/PengRobinson.h

    Co-authored-by: Ray Speth <speth@mit.edu>
    Gandhali Kogekar and speth authored Mar 21, 2021
    Configuration menu
    Copy the full SHA
    52e2212 View commit details
    Browse the repository at this point in the history
  2. Update include/cantera/thermo/PengRobinson.h

    Co-authored-by: Ray Speth <speth@mit.edu>
    Gandhali Kogekar and speth authored Mar 21, 2021
    Configuration menu
    Copy the full SHA
    67f22f6 View commit details
    Browse the repository at this point in the history
  3. Moving declaration of the protected variable m_pp from MixtureFugacity

    class to the PengRobinson class
    gkogekar committed Mar 21, 2021
    Configuration menu
    Copy the full SHA
    4e07743 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6b14db5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c766a9d View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    fb7386f View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ec17b30 View commit details
    Browse the repository at this point in the history

Commits on Apr 14, 2021

  1. Update src/thermo/PengRobinson.cpp

    Co-authored-by: Ray Speth <speth@mit.edu>
    2 people authored and gkogekar committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    1f5dbe7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1539bd1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8f0adc6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    d17641c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    a0dd0c0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2478999 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    95f9a65 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    dee71c1 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    aef53e5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f934e50 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    e835d17 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    2ea6496 View commit details
    Browse the repository at this point in the history
  13. Modifying comment

    Co-authored-by: Bryan W. Weber <bryan.w.weber@gmail.com>
    2 people authored and gkogekar committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    ffafe40 View commit details
    Browse the repository at this point in the history
  14. Fixing indentation

    Co-authored-by: Bryan W. Weber <bryan.w.weber@gmail.com>
    2 people authored and gkogekar committed Apr 14, 2021
    Configuration menu
    Copy the full SHA
    228d802 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    9789555 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    c5d4061 View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2021

  1. Configuration menu
    Copy the full SHA
    88a10c0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d0f66ce View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    f892c20 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2021

  1. Fixing indentation

    gkogekar committed Apr 16, 2021
    Configuration menu
    Copy the full SHA
    a9e8c4d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5a7a938 View commit details
    Browse the repository at this point in the history