pandapipes
pandapipes copied to clipboard
Gas mixture simon
This PR rectifies the gas mixture compressiblity calculation and merges the changes from the master branch in the kbensafta:gas_mixture_simon branch to make the latter pass the tests.
The SRK method has been implemented for the compressibility calculation (see G. Soave, Equilibrium constants from a modified Redlich-Kwong equation of state). The new function is calculate_mixture_compressibility_fact
in properties_toolbox.py
. Among other changes, the gas mixture compressibility takes now the temperature into account. A test has been added (test_compressibility
in pandapipes/test/api/test_special_networks.py
) to compare the results of the calculation with CoolProp results.
Minor changes:
- rectification of the
calculate_molar_fraction_from_mass_fraction
function (also inproperties_toolbox.py
) - add critical data to the fluids text files and (critical temperature, critical pressure and acentric factor) to the Fluid class.
Note: The folder tests_gas_mix is not necessary and have to be ignored during the final PR to the develop branch. SRK_TEST.ipynb
contains the script that produces the CoolProp results for the compressiblity. This could/should be saved somewhere outside of the pandapipes repository.
Can you make the tests pass, e.g. by merging the current develop into this PR? (or at least delete Python 3.7 from the test pipeline)
Codecov Report
Attention: Patch coverage is 81.93018%
with 616 lines
in your changes are missing coverage. Please review.
Project coverage is 83.55%. Comparing base (
f9b7cb0
) to head (1623ae4
). Report is 67 commits behind head on gas_mixture.
:exclamation: Current head 1623ae4 differs from pull request most recent head 9a8fb85. Consider uploading reports for the commit 9a8fb85 to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## gas_mixture #550 +/- ##
===============================================
- Coverage 87.07% 83.55% -3.53%
===============================================
Files 79 93 +14
Lines 4681 7277 +2596
===============================================
+ Hits 4076 6080 +2004
- Misses 605 1197 +592
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.