GEOS
GEOS copied to clipboard
Refactoring diffusion and tpfa weights calculation to enable phase indexed arrays (4d)
Like what was discuss here about allowing phase-indexed tensor in the tpfa transmissivities/weights calculation to be able to keep consistency with usual transmissivity computed on intrinsinc permeability.
This is also used in #2807 to enable phase indexed dispersivity.
For now it refactor main steps of weights computation into computeWeightBase()
and averageWeights()
refactor weights blending between harmonic and arithmetic average. This makes it easy to refactor further if physical phenomenon ( convection vs diffusion or dipersion) requires other blending rules.
Eventually, as commented in the code, the main stride manipulation that occurs in the new overload of computeWeights()
taking 4d-arrays, should be refactored once @klevzoff 's LvArray refactorization PR is merged in.
Re-booting this PR as useful to #3026 and #2807,
Making an intermediate abstraction ToCell
on the way to FaceToCellElement
and EmbeddedElementToCell
as most of them can be factored.
For now I am unsure though how to factor up this
https://github.com/GEOS-DEV/GEOS/blob/6919bfb04393cae7ff7a336a5ae635dbd2118f59/src/coreComponents/finiteVolume/FaceElementToCellStencil.hpp#L244-L263
As unlinke halfWeight in TPFA, the treatment is non-symmetrical for t0
and t1
?
Another question is there still a use of MPFA sources ?
For now I am unsure though how to factor up this
https://github.com/GEOS-DEV/GEOS/blob/6919bfb04393cae7ff7a336a5ae635dbd2118f59/src/coreComponents/finiteVolume/FaceElementToCellStencil.hpp#L244-L263
As unlinke halfWeight in TPFA, the treatment is non-symmetrical for
t0
andt1
? Another question is there still a use of MPFA sources ?
is that ever used? I am not sure what for... It would just return the harmonic average of the geometric weights? I really don't remember much. Maybe @karimifard ?
No, I think the conclusion was that we would use mimetic to do mpfa. It also means we could simplify a bit our stencil classes if we accept some loss of generality.
For now I am unsure though how to factor up this https://github.com/GEOS-DEV/GEOS/blob/6919bfb04393cae7ff7a336a5ae635dbd2118f59/src/coreComponents/finiteVolume/FaceElementToCellStencil.hpp#L244-L263
As unlinke halfWeight in TPFA, the treatment is non-symmetrical for
t0
andt1
? Another question is there still a use of MPFA sources ?is that ever used? I am not sure what for... It would just return the harmonic average of the geometric weights? I really don't remember much. Maybe @karimifard ?
No, I think the conclusion was that we would use mimetic to do mpfa. It also means we could simplify a bit our stencil classes if we accept some loss of generality.
I also recall that the plan was to remove MPFA and use only mimetic.
For now I am unsure though how to factor up this https://github.com/GEOS-DEV/GEOS/blob/6919bfb04393cae7ff7a336a5ae635dbd2118f59/src/coreComponents/finiteVolume/FaceElementToCellStencil.hpp#L244-L263
As unlinke halfWeight in TPFA, the treatment is non-symmetrical for
t0
andt1
? Another question is there still a use of MPFA sources ?is that ever used? I am not sure what for... It would just return the harmonic average of the geometric weights? I really don't remember much. Maybe @karimifard ? No, I think the conclusion was that we would use mimetic to do mpfa. It also means we could simplify a bit our stencil classes if we accept some loss of generality.
I also recall that the plan was to remove MPFA and use only mimetic.
Great :-) I would then restart with that in mind and propose a refactoring that can unlock #2807 and #3026 :)