GEOS-DEV / GEOS

GEOS Simulation Framework
GNU Lesser General Public License v2.1
203 stars 80 forks source link

Remove EOS template parameter from compositional fluid model #3121

Closed dkachuma closed 2 weeks ago

dkachuma commented 1 month ago

The purpose of this PR is to remove the equation of state template parameter from CompositonalFluidModel. The reason for this is to reduce the number of types listed in MultiFluidSelector.hpp. If too many types are listed here the CUDA builds fail to build CompositionalMultiphaseFVM::applyFaceDirichletBC (CompositionalMultiphaseFVM.cpp).

Removing the EOS template parameter from CompositonalFluidModel cuts the number of types from 4 to 2. Instead of the EOS being implicitly determined by the object type, there is a user field equationOfState (similar to CompositonalFluidModelPVTPackage) which determines the EOS to be used. The downside is that the EOS parameters have to be passed to the compute kernels. The selection is now done with if-else statements (e.g. FugacityCalculator.hpp).

Despite this, the build still fails when the LBC model is added. Follow up PR's to remove the viscosity template parameter as well.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 99.15966% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 53.99%. Comparing base (720eb22) to head (f33d63e).

Files Patch % Lines
.../compositional/functions/NegativeTwoPhaseFlash.hpp 98.66% 2 Missing :warning:
...positional/CompositionalMultiphaseFluidUpdates.hpp 87.50% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3121 +/- ## =========================================== + Coverage 53.66% 53.99% +0.33% =========================================== Files 996 1000 +4 Lines 84848 84933 +85 =========================================== + Hits 45534 45860 +326 + Misses 39314 39073 -241 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.