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 (Revised) #1047

Merged
merged 66 commits into from
Jul 21, 2021

Commits on Jul 21, 2021

  1. Implementation of Peng-Robinson equation of state

    Co-authored-by: Steven DeCaluwe <[email protected]>
    Co-authored-by: Ray Speth <[email protected]>
    3 people authored and gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    11d5382 View commit details
    Browse the repository at this point in the history
  2. Abstracting thermo calcs from PengRobinson and RedlichKwong up to Mix…

    …tureFugacityTP
    
    Co-authored-by: Ray Speth <[email protected]>
    Co-authored-by: Gandhali Kogekar <[email protected]>
    3 people committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    12590d5 View commit details
    Browse the repository at this point in the history
  3. Abstracting cubic solver to MixtureFugacityTP thermo class.

    Co-authored-by: Gandhali Kogekar <[email protected]>
    decaluwe and gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    1929d1b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    fd24841 View commit details
    Browse the repository at this point in the history
  5. 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 Jul 21, 2021
    Configuration menu
    Copy the full SHA
    bd1954f View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7491a2b View commit details
    Browse the repository at this point in the history
  7. 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 Jul 21, 2021
    Configuration menu
    Copy the full SHA
    8ec7326 View commit details
    Browse the repository at this point in the history
  8. Adding cubic solver test

    decaluwe authored and gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    83e621c View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    04d3cf7 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    836a2bf View commit details
    Browse the repository at this point in the history
  11. 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 Jul 21, 2021
    Configuration menu
    Copy the full SHA
    34c9b50 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    3dbe95b View commit details
    Browse the repository at this point in the history
  13. 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 Jul 21, 2021
    Configuration menu
    Copy the full SHA
    fcd49cf View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    5363a4e View commit details
    Browse the repository at this point in the history
  15. Removing dependancy of EoS specific omega_a, omega_b parameters from …

    …solveCubic
    
    function in MixtureFugacityTP class.
    gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    308920a View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    e3d714c View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    848bd11 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    a3ff83a View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    c03b352 View commit details
    Browse the repository at this point in the history
  20. Update documentation of PengRobinson/MixtureFugacityTP

    Co-authored-by: Ray Speth <[email protected]>
    2 people authored and gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    b650c41 View commit details
    Browse the repository at this point in the history
  21. Modifying comments and correcting typos

    gkogekar authored and gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    1e02cf4 View commit details
    Browse the repository at this point in the history
  22. Modified Peng-Robinson to test file to read phase from

    thermo-models.yaml
    gkogekar authored and gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    a058c48 View commit details
    Browse the repository at this point in the history
  23. Modifying the explaination for solveCubic function to be more clear and

    explicit.
    gkogekar authored and gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    2e8a89f View commit details
    Browse the repository at this point in the history
  24. Changed the function name 'pressureDerivatives' to

    'calculatePressureDerivatives'
    gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    7a26c3b View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    2f67b9e View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    a5b67c1 View commit details
    Browse the repository at this point in the history
  27. Cleaning up functions to calculate critical properties in Redlich-Kwo…

    …ng 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.
    
    Co-authored-by: Ray Speth <[email protected]>
    gkogekar and speth committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    6b98a24 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    483dd6d View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    545caa6 View commit details
    Browse the repository at this point in the history
  30. Reading w_ac (acentric factor) with a more useful message that will

    point to the source of the error accurately
    gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    37700cb View commit details
    Browse the repository at this point in the history
  31. Removing redundant _updateStateThermo() call from thermodynamic

    calculations and also rebasing with cantera/main
    gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    e0673a3 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    5b19e15 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    ff320f8 View commit details
    Browse the repository at this point in the history
  34. Wrapping up some error messages to keep the line length below 80

    characters
    
    Co-authored-by: Bryan W. Weber <[email protected]>
    gkogekar and bryanwweber committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    e20ba42 View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    61cdb7e View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    915fdf6 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    940e0be View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    105a5a0 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    68b8d47 View commit details
    Browse the repository at this point in the history
  40. Renaming _curr vector variables

    Co-authored-by: Bryan W. Weber <[email protected]>
    gkogekar and bryanwweber committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    577da33 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    da66a8e View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    879ec59 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    0f9e186 View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    92654c7 View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    3cd9b12 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    90cda14 View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    742a776 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    9c7d705 View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    7236fc7 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    e668cf0 View commit details
    Browse the repository at this point in the history
  51. Add P-R tests for partial molar properties

    Test that mole-fraction weighted sum of partial molar properties
    equals the total, and that the identites h_k = u_k - P * v_k and
    g_k = h_k - T * s_k are satisfied.
    speth authored and gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    6605e14 View commit details
    Browse the repository at this point in the history
  52. Make Peng-Robinson cp validation test more robust

    Test using a mixture with multiple components, and at a pressure where
    some non-ideal effects will be present.
    speth authored and gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    21df76e View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    6c7e2b6 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    049ac0e View commit details
    Browse the repository at this point in the history
  55. Add tests for Peng-Robinson species lookup

    speth authored and gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    b83ab23 View commit details
    Browse the repository at this point in the history
  56. Fixing error in tests 'activityCoeffs' and 'chempotentials_RT'

    The temperatures used to calculate RT were inconsistent with the input
    temperature values.
    gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    140e898 View commit details
    Browse the repository at this point in the history
  57. Adding an error condition in 'getCoeff' function when the given species

    is not present in the database.
    gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    f9c28ca View commit details
    Browse the repository at this point in the history
  58. Configuration menu
    Copy the full SHA
    b8e009c View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    6af3c3f View commit details
    Browse the repository at this point in the history
  60. Simplifying the partial molar entropy calculation. The partial

    molar entropies are now evaluated using the equation: hk - t*sk = gk.
    Also fixed an error in d2aAlpha_DT2 calculation
    gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    9a250e4 View commit details
    Browse the repository at this point in the history
  61. Simplifying d(aAlpha)/dT equation

    Co-authored-by: Steven C. DeCaluwe <[email protected]>
    
    Simplifying d(aAlpha)/dT function for a multicomponent mixture
    
    Co-authored-by: Steven C. DeCaluwe <[email protected]>
    
    Using mixing coefficients a_ij instead of sqrt(a_ii*a_jj)
    
    Co-authored-by: Steven C. DeCaluwe <[email protected]>
    
    Simplifying d2(aAlpha)/dT2 function
    
    Co-authored-by: Steven C. DeCaluwe <[email protected]>
    2 people authored and gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    ecf4555 View commit details
    Browse the repository at this point in the history
  62. Cleaning up redundant lines/variables, also renamed 'den' to 'denom' to

    avoid confusion with density
    gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    c7cd768 View commit details
    Browse the repository at this point in the history
  63. Fixing an error in the partialMolarEnthalpies() function. Previously,…

    … the
    
    derivative term for aAlpha was missing in the calculation.
    gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    f5293a7 View commit details
    Browse the repository at this point in the history
  64. Removing incorrect partialCp calculation (Currently, throws

    NotImplemented error)
    gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    fe21bb3 View commit details
    Browse the repository at this point in the history
  65. Some formatting changes, also added a reference for the acentric factor

    value for CO2 in 'critProperties.xml' file.
    gkogekar committed Jul 21, 2021
    Configuration menu
    Copy the full SHA
    24bb1f7 View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    c32fa84 View commit details
    Browse the repository at this point in the history