GEOS icon indicating copy to clipboard operation
GEOS copied to clipboard

Adding dispersion model for SPE11

Open jafranc opened this issue 2 years ago • 1 comments

Continuing the work initiated in #2678, the LinearIsotropicDispersion constitutive class init the BaseDispersion's m_dispersivity cell-wise diagonal tensor field to the sole longitudinal dispersion coefficient.

In order to get a cell-centered vectorial velocity, we enrich CellElementStencilTPFAWrapper of an initVelocity and a computeVelocity functions as the geometry is easily accessible from this point. They are responsible for filling in a m_phaseVelocity fields held by MultiFluidBase (as for now).

The call site is located after phaseFlux computation in isothermalCompositionalMultiphaseFVMKernel, as the reconstruction relies on this values.

The reconstruction is done as a 3d linear interpolation of the normal of the faces scaled by the phaseFlux value. In order to do that, in CellElementStencilTPFAWrapper::computeVelocity(...), after the flux values has been divided by the surface (which is recovered from the halfWeight), the distanceToFace is pulled from already existing vector and ratio-ed with the sum of the distances on this axis (which as been also memoized and pass as parameters).

On deadoil_2ph_staircase_gravity_segregation_3d.xml, this is per gas and water phase the kind of vector fields reconstructed velocity_staircase

Step to get there:

  • [x] Reconstruct a velocity vector field
  • [x] Discuss the reconstruction algorithm
  • [x] Opt. Refactor reconstruction in more appropriate place
  • [x] Introduce velocity vector as a field
  • [x] Opt. Attach it to a more appropriate object than MultiFluidBase
  • [x] Decide on the introduction derivatives or lagging the velocity field
  • [x] Write a unit test for reconstruction
  • [x] Test it in intergated Tests suite

The implementation of computeWeights() taking phase indexed 4d tensor for dispersivity's transmissivity computation is discussed more in #2918.

jafranc avatar Nov 07 '23 16:11 jafranc

Codecov Report

Attention: Patch coverage is 56.25000% with 126 lines in your changes missing coverage. Please review.

Project coverage is 56.01%. Comparing base (7cce9a0) to head (d98f2f6). Report is 7 commits behind head on develop.

Files Patch % Lines
...sSolvers/fluidFlow/CompositionalMultiphaseBase.cpp 29.41% 36 Missing :warning:
...ow/IsothermalCompositionalMultiphaseFVMKernels.hpp 30.76% 18 Missing :warning:
...Components/finiteVolume/CellElementStencilTPFA.hpp 65.90% 15 Missing :warning:
...stitutive/dispersion/LinearIsotropicDispersion.cpp 0.00% 12 Missing :warning:
...ponents/constitutive/dispersion/DispersionBase.cpp 0.00% 8 Missing :warning:
...ponents/constitutive/dispersion/DispersionBase.hpp 0.00% 7 Missing :warning:
...stitutive/dispersion/LinearIsotropicDispersion.hpp 0.00% 6 Missing :warning:
...ow/StabilizedCompositionalMultiphaseFVMKernels.hpp 0.00% 6 Missing :warning:
...dFlow/ThermalCompositionalMultiphaseFVMKernels.hpp 25.00% 6 Missing :warning:
...ents/finiteVolume/EmbeddedSurfaceToCellStencil.hpp 0.00% 2 Missing :warning:
... and 6 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2807      +/-   ##
===========================================
+ Coverage    55.99%   56.01%   +0.01%     
===========================================
  Files         1053     1055       +2     
  Lines        89157    89383     +226     
===========================================
+ Hits         49921    50064     +143     
- Misses       39236    39319      +83     

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

codecov[bot] avatar Jun 05 '24 15:06 codecov[bot]

@jafranc is https://github.com/GEOS-DEV/GEOS/pull/2918 a hard requirement here?

paveltomin avatar Dec 20 '24 22:12 paveltomin