GEOS-DEV / GEOS

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

[EPIC] PVT modeling #2465

Open francoishamon opened 1 year ago

francoishamon commented 1 year ago

Description

The goal of this issue is to keep track of all developments related to PVT modeling capabilities for CO2 in depleted reservoirs.

Work Scope

Basic first steps to port PVTPackage capabilities in GEOS:

  1. [x] Create and (unit) test functions to solve Rachford-Rice equation (@francoishamon)
  2. [x] Create and (unit) test functions to model cubic EOS (@francoishamon)
  3. [x] Add initialization heuristics for K-values (@dkachuma)
  4. [x] Add and (unit) test the negative two-phase flash loop (@dkachuma)
  5. [x] Add density calculation for multiphase fluid (@dkachuma)

Steps to test the new functions in PVTDriver

  1. [x] Create a class derived from MultiFluidBase to read an input and call the new flash functions (@dkachuma)
  2. [ ] Link MultiFluidBase class to static calculation functions.
  3. [ ] Allow the user to supply the viscosity values for the constant viscosity model
  4. [ ] Allow the user to select the mixing rule for the LBC viscosity calculation
  5. [ ] Allow the use to tune the flash calculation parameters
  6. [ ] Extend BlasLapackLA::solveLinearSystem to GPU

Steps to make the new code usable for simulations of CO2 injection in depleted reservoirs:

  1. [ ] Add Soreide Whitson modification to the cubic EOS functions (for the water phase) (@francoishamon)
  2. [x] Add binary interaction coefficients
  3. [ ] Add phase identification in the two-phase flash to identify the water phase
  4. [ ] Add property calculations for density (CO2 with impurities, etc) and viscosity (LBC and others) (@dkachuma)
  5. [ ] ~Compute finite-difference derivatives~

Steps to make the code efficient:

  1. [ ] Modify two-phase flash to do non-iterative K-value flash
  2. [ ] Compute analytical derivatives
  3. [ ] Explore Newton bisection in Rachford-Rice

Some tidying tasks

  1. [ ] Centralise code to convert compositions from mass fractions to mole fractions
  2. [x] Simplify fluid model interface to have a single compute for both flow and initialisation
  3. [ ] Use variadic template parameter for phase types in compositional multiphase fluid model
  4. [ ] Refactor CubicEOSPhaseModel which has become too large/complex.

Issues in this EPIC

paveltomin commented 1 year ago

Compute finite-difference derivatives - would you consider using AD instead? Flash is local, so AD operations are much easier.