GEOS icon indicating copy to clipboard operation
GEOS copied to clipboard

Improvement to TPFA

Open karimifard opened this issue 3 years ago • 7 comments

The discretization must provide accurate two-point flux approximation for PEBI and orthogonal grids. Provide approximation for mesh elements with nonplanar faces. Remain compatible with existing explicit and embedded discrete fracture representation. Approximate use of full tensor permeability for TPFA.

List of features/capabilities:

MPFA Cleaning:

  • [x] Merge https://github.com/GEOSX/GEOSX/pull/1925 @CusiniM
  • [ ] Clean up MPFA implementation: remove MPFA stencil and revisit all variables in stencil objects to make sure they are appropriate for the new goals. @CusiniM

Inputs (1/2):

  • [ ] Importing collocation points (for pressure, saturation, temperature, etc...). @francoishamon @karimifard
  • [ ] Define permeability as a 2nd order tensor in the code (as an intermediate step). @karimifard

Computational geometry tools:

  • [ ] Construction of the closest flat polygon to a nonplanar polygon (interfaces and fractures). @karimifard
  • [ ] Distance to plane and line. @karimifard
  • [ ] Computation of directional permeability using tensor permeability and interface normal. @karimifard
  • [ ] Unit tests @karimifard @TotoGaz

Discretization TPFA

  • [ ] Modify permeability to be a full tensor and refactor stencil's weights computations. @karimifard
  • [ ] Add unit and integrated tests for it. @karimifard @CusiniM @TotoGaz

Inputs (2/2):

  • [ ] Importing full scalar/vector/2nd order tensor property (Generate a second order tensor object and see how it behaves on GPU). Will be used for permeability field. Applicable to thermal conductivity... @CusiniM @TotoGaz @castelletto1
  • [ ] Upgrading the vtk input file format to better fit fracture needs (using multi-block or partitioned datasets)? @TotoGaz

Import of TPFA connectivities. (long term objective)

  • [ ] Importing TPFA connectivity and pore volume list (in case we bypass the TPFA discretization steps).
  • [ ] Graph based ghosting strategy.

karimifard avatar Nov 15 '22 23:11 karimifard

EDIT: merged into main issue description.

old comment

I propose the following path forward:

Step 1: stencil clean up and import of collocation points.

  • [ ] PR: stencil clean up. Remove MPFA stencil and revisit all variables in stencil objects to make sure they are appropriate for the new goals.
  • [ ] PR: import of collocation points. Seems to be urgent so I think it can be done independently to have a working capability soon that can then be adapted to the cleaned up stencils.

Step 2: Full tensor permeability and non planar faces.

  • [ ] PR: implement needed computational geometry tools to handle a full tensor permeability and non planar faces and add proper unit tests for them.
  • [ ] PR: modify permeability to be a full tensor and refactor stencil's weights computations + add unit and integrated tests for it.

Step 3: import of tpfa connectivities.

  • [ ] PR: import of tpfa connectivities.
  • [ ] PR: graph based ghosting strategy.
  • [ ] vtk upgrade (possibly multiple PRs)

CusiniM avatar Nov 16 '22 18:11 CusiniM

Btw, before starting on all this it would be better to merge this PR https://github.com/GEOSX/GEOSX/pull/1925

CusiniM avatar Nov 16 '22 19:11 CusiniM

@CusiniM Step 3 should be merged with step 2, since it has a direct impact on the computation of the stencil weights.

Hmm, I'm not 100% sure because we're reaching a point where the way we read the VTK is really decoupled from what we do with the digested data. Not to say that both ways are independent, nor that both ways are equally "easy", but depending on the resources and the priorities, we may want to willingly split those tasks.

TotoGaz avatar Nov 16 '22 19:11 TotoGaz

@CusiniM Step 3 should be merged with step 2, since it has a direct impact on the computation of the stencil weights.

Hmm, I'm not 100% sure because we're reaching a point where the way we read the VTK is really decoupled from what we do with the digested data. Not to say that both ways are independent, nor that both ways are equally "easy", but depending on the resources and the priorities, we may want to willingly split those tasks.

ahah, I have modified my comment after Nicola's one so 2 and 3 are not the same thing anymore and I have already merged my origin point 2 and 3 into a single one.

CusiniM avatar Nov 16 '22 19:11 CusiniM

When you're using the step, it implicitly means that there's an order. Is it what you mean? To which extent is this the case?

TotoGaz avatar Nov 16 '22 19:11 TotoGaz

When you're using the step, it implicitly means that there's an order. Is it what you mean? To which extent is this the case?

I have deleted nicola's comment to avoid confusion.

Yeah, I wrote it with the idea of doing these things in sequence. IMO the only step that is kind of independent is the vtk upgrade which, as you said, could be done in parallel and kind of live its own life.

CusiniM avatar Nov 16 '22 19:11 CusiniM

We may also need a backup plan for highly distorted elements.

karimifard avatar Nov 17 '22 18:11 karimifard