Geomechanics - Mapping and documentation

129 views
Skip to first unread message

Jens Eckel

unread,
May 11, 2023, 10:07:17 AM5/11/23
to pflotran-users
Hi all,
I am working for the Federal Office for the Safety of Nuclear Waste Management in Germany and we want to take part in the international BenVaSim II project with a focus on TH^2M processes. For this purpose we are planning to use PFLOTRAN and there are some open questions concerning the geomechanical part:
  • Is there any script to create the mapping file to map the unstructured grid (geomechanics) on the structured grid (flow)? For the benchmark examples, it is possible to create a mapping file manually, but as soon as one wants to modify the discretization of one of the grids it starts to become difficult.
  • The documentation of the geomechanical part of PFLOTRAN is quite short. Is there a more detailed desription of the underlying concept avaiable (e.g. some details on the coupling of flow/transport and geomechanical part of the program)?
Thank you in advance
Jens

_____________________________________________________________
Dr. Jens Eckel
Division F4 "Research for Safety Analyses and Methodology"
Federal Office for the Safety of Nuclear Waste Management
Schwertnergasse 1
50667 Cologne, Germany
Phone +49(0)3018 4321 6413

www.base.bund.de

 

Luke Skywalker

unread,
May 11, 2023, 2:48:05 PM5/11/23
to pflotra...@googlegroups.com
Jens,

- No there is no script shared in the repository. Since there are many mesh generation tools, we leave it to the users to build their own scripts.
- What details would you like to see specifically?

Satish

--
You received this message because you are subscribed to the Google Groups "pflotran-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pflotran-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pflotran-users/31ef7d04-3e7d-40fc-a393-f75acb226e64n%40googlegroups.com.

Hammond, Glenn E

unread,
May 11, 2023, 2:58:16 PM5/11/23
to pflotra...@googlegroups.com

Satish,

 

I believe that the first bullet assumes that we do not use the same grid/mesh for flow and geomechancs, but we do. It is just a matter of where the unknowns are located (cell centers versus corners). Or am I wrong?

 

Glenn

 

From: pflotra...@googlegroups.com <pflotra...@googlegroups.com> On Behalf Of Luke Skywalker
Sent: Thursday, May 11, 2023 11:48 AM
To: pflotra...@googlegroups.com
Subject: Re: [pflotran-users: 7026] Geomechanics - Mapping and documentation

 

Check twice before you click! This email originated from outside PNNL.

 

Jens Eckel

unread,
May 12, 2023, 6:34:05 AM5/12/23
to pflotran-users
Hi Satish,
my hope was that there are scripts which may not be found in the repo but could be distributed among users. I am using Salome to create the unstructured PFLOTRAN grid, but have not yet discovered an easy way to construct the mapping file to the structured grid.
From the documentation it is not obvious to me that the same mesh is used for flow and geomechanics. The only constraint is that vertices of the geomechanical mesh coincide with the the cell centers of the finite volume mesh (the unstructured mesh could e.g. contain tetrahedrons). Moreover, it is not clear to me at which vertices coupling between geomechanics and flow takes place: Only at the vertices coinciding with the cell centers of the finite volume mesh? More details on these questions would be helpful.
Is there a document on the verification of the implementation of the geomechanical part of PFLOTRAN (e.g. comparison with (semi-)analytical solutions)?
Best, Jens

Hammond, Glenn E

unread,
May 12, 2023, 4:38:01 PM5/12/23
to pflotra...@googlegroups.com

Satish,

 

Can you confirm the following:

 

  • Flow and geomechanics are performed on the same exact mesh.
  • Flow uses the finite volume method where the solution is calculated at the cell center.
  • Geomechanics uses the finite element method where the solution is calculated at the cell vertices (or nodes of each element).
  • There  is no need for mapping between cell centers and vertices/nodes.

 

I am hoping this will answer Jens’ questions.

 

Thanks,


Glenn

 

Kris Kuhlman

unread,
May 12, 2023, 5:40:04 PM5/12/23
to pflotra...@googlegroups.com
I have used the geomechancs capability, but am not an expert. 

You need to specify the mapping file between the two solution meshes (there is a text file you need to give this in). Given the center/node difference most of the mesh may be the same, but the edges of the domains will be different (by at least half an element), which maybe matters, given the nature of the problem and the boundary conditions being applied.


Peter Lichtner

unread,
May 12, 2023, 5:48:56 PM5/12/23
to pflotran-users
If you look at the regression tests there is a file flow_geomech_mapping.dat that needs to be specified. There is also a file fort.15 file that shouldn’t be there.
…Peter

Luke Skywalker

unread,
May 12, 2023, 6:13:48 PM5/12/23
to pflotra...@googlegroups.com
Kris and Peter are correct. 

- The flow side uses cell-centered two-point flux finite volume and obtains pressures at the cell center. The mechanics side uses the finite element method and the displacements are evaluated at the vertices. You must provide a flow_geomech_mapping.dat file that essentially maps the flow to the mechanics side of things. 
- Consider a square cell below (for simplicity, PFLOTRAN only does 3D, so the 3D equivalent will be hex cell). Then, the zeroth order mapping would look like f1 -> g1, f1 -> g2, f1 -> g3, f1 -> g4, which needs to be provided in the flow_geomechanics_mapping.dat. 
g1--------g2
|     f1      |
|              |
g4--------g3
- As Peter suggested, https://bitbucket.org/pflotran/pflotran/src/master/regression_tests/geomech/  is a good place to look at some examples.

Satish

Peter Lichtner

unread,
May 12, 2023, 6:30:07 PM5/12/23
to pflotran-users
Satish: can this print statement be removed:


  call PrintMsg(this%option,'GeomechanicsSimulationStrip()')


Seems to be causing the file fort.15 to be created.
Peter

Hammond, Glenn E

unread,
May 12, 2023, 6:51:41 PM5/12/23
to pflotra...@googlegroups.com

What prevents us from calculating this mapping automatically for the user?

 

Jens Eckel

unread,
May 16, 2023, 8:12:17 AM5/16/23
to pflotran-users
Thanks for your comments. I had been aware of the examples in the regression test before and they were helpful to create my own input.
My question was, if there is any script among the users to calculate the mapping file automatically. Unfortunately this seems not to be the case.
To proceed I edited the mapping file for my meshes by hand and PFLOTRTAN crashes with the errors below. I cannot find an error in the input, but may be some of the experienced users/developers can help, the input is attached below. The Richards problem standalone works well and also the regression tests work well on my machine.
Komplett.dat
flow_geomech_mapping.dat
Links_zentral.dat
Hinten.dat
Vorne.dat
Unten.dat
Modell_1.1.in
Links_zwischen_Ecken.dat
gitter_pflotran.ugi
Rechts.dat
Oben.dat
Links_Ecken.dat

Jens Eckel

unread,
May 16, 2023, 8:41:18 AM5/16/23
to pflotran-users
These are the error messages:
0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0]PETSC ERROR: Argument out of range
[0]PETSC ERROR: Scatter indices in iy are out of range
[0]PETSC ERROR: See https://petsc.org/release/faq/ for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.16.2, unknown  
[0]PETSC ERROR: /home/anwender/Programme/pflotran/src/pflotran/pflotran on a arch-linux-c-opt named SI0013-SZ by anwender Tue May 16 14:05:09 2023
[0]PETSC ERROR: Configure options --CFLAGS=-O3 --CXXFLAGS=-O3 --FFLAGS=-O3 --with-debugging=no --download-mpich=yes --download-hdf5=yes --download-hdf5-fortran-bindings=yes --downl
oad-fblaslapack=yes --download-metis=yes --download-parmetis=yes --download-sowing=yes
[0]PETSC ERROR: #1 VecScatterCreate() at /home/anwender/Programme/petsc/src/vec/is/sf/interface/vscat.c:767
[0]PETSC ERROR: #2 User provided function() at User file:0
TODO(geh): add DatasetPrint()
TODO(geh): add DatasetPrint()
TODO(geh): add DatasetPrint()
TODO(geh): add DatasetPrint()
TODO(geh): add DatasetPrint()
TODO(geh): add DatasetPrint()
TODO(geh): add DatasetPrint()
  Beginning setup of GEOMECH SNES
Solver: bcgs
Preconditioner:
  Finished setting up GEOMECH SNES
[0]PETSC ERROR: #3 VecScatterCreate() at /home/anwender/Programme/petsc/src/vec/is/sf/interface/vscat.c:767
[0]PETSC ERROR: #4 User provided function() at User file:0
[0]PETSC ERROR: #5 PetscCommDuplicate() at /home/anwender/Programme/petsc/src/sys/objects/tagm.c:117
[0]PETSC ERROR: #6 PetscHeaderCreate_Private() at /home/anwender/Programme/petsc/src/sys/objects/inherit.c:63
[0]PETSC ERROR: #7 PetscSFCreate() at /home/anwender/Programme/petsc/src/vec/is/sf/interface/sf.c:93
[0]PETSC ERROR: #8 PetscSFDuplicate() at /home/anwender/Programme/petsc/src/vec/is/sf/interface/sf.c:738
[0]PETSC ERROR: #9 VecScatterCopy() at /home/anwender/Programme/petsc/src/vec/is/sf/interface/vscat.c:521
[0]PETSC ERROR: #10 User provided function() at User file:0
[0]PETSC ERROR: #11 PetscCommDuplicate() at /home/anwender/Programme/petsc/src/sys/objects/tagm.c:117
[0]PETSC ERROR: #12 PetscHeaderCreate_Private() at /home/anwender/Programme/petsc/src/sys/objects/inherit.c:63
[0]PETSC ERROR: #13 PetscSFCreate() at /home/anwender/Programme/petsc/src/vec/is/sf/interface/sf.c:93
[0]PETSC ERROR: #14 PetscSFDuplicate() at /home/anwender/Programme/petsc/src/vec/is/sf/interface/sf.c:738
[0]PETSC ERROR: #15 VecScatterCopy() at /home/anwender/Programme/petsc/src/vec/is/sf/interface/vscat.c:521
[0]PETSC ERROR: #16 User provided function() at User file:0
Simulation%InitializeRun()

GEOMECHANICS Time Stepper (steady state)

GEOMECHANICS Newton Solver
atol: 1.000000E-50
rtol: 1.000000E-08
stol: 1.000000E-08
dtol: 1.000000E+04
maxnorm: 1.000000E+20
inftolres: -9.990000E+02
inftolupd: -9.990000E+02
inftolrelupd: -9.990000E+02
inftolsclres: -9.990000E+02
max iter: 50
min iter: 1
maxf: 10000
matrix type: baij
precond. matrix type: baij
inexact newton: off
print convergence: on
print detailed convergence: off
check infinity norm: on

GEOMECHANICS Linear Solver
solver: bcgs
preconditioner: ilu
atol: 1.000000E-50
rtol: 1.000000E-05
dtol: 1.000000E+04
maximum iteration: 10000

FLOW Time Stepper
acceleration: on
acceleration threshold: 5
number of ramp entries: 5
ramp entry #1: 2.0000
ramp entry #2: 2.0000
ramp entry #3: 2.0000
ramp entry #4: 2.0000
ramp entry #5: 2.0000
ramp entry #6: 1.8000
ramp entry #7: 1.6000
ramp entry #8: 1.4000
ramp entry #9: 1.2000
ramp entry #10: 1.0000
ramp entry #11: 1.0000
ramp entry #12: 1.0000
ramp entry #13: 1.0000
maximum number of steps: 999999
constant time steps threshold: 5
maximum number of cuts: 16
reduction factor: 5.000000E-01
maximum growth factor: 2.000000E+00

FLOW Newton Solver
atol: 1.000000E-50
rtol: 1.000000E-08
stol: 1.000000E-08
dtol: 1.000000E+04
maxnorm: 1.000000E+20
inftolres: -9.990000E+02
inftolupd: -9.990000E+02
inftolrelupd: -9.990000E+02
inftolsclres: -9.990000E+02
max iter: 50
min iter: 1
maxf: 10000
matrix type: baij
precond. matrix type: baij
inexact newton: off
print convergence: on
print detailed convergence: off
check infinity norm: on

FLOW Linear Solver
solver: bcgs
preconditioner: ilu
atol: 1.000000E-50
rtol: 1.000000E-05
dtol: 1.000000E+04
maximum iteration: 10000
--> write tecplot output file: Modell_1.1-000.tec
--> write tecplot velocity output file: Modell_1.1-vel-000.tec
      0.00 Seconds to write to Tecplot file(s)
 
  Finished Initialization
GeomechanicsSimulationExecuteRun()
[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind
[0]PETSC ERROR: or try http://valgrind.org on GNU/linux and Apple Mac OS X to find memory corruption errors
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run  
[0]PETSC ERROR: to get more information on the crash.
[0]PETSC ERROR: #17 User provided function() at unknown file:0
[0]PETSC ERROR: Run with -malloc_debug to check if memory corruption is causing the crash.
Abort(59) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0


Luke Skywalker

unread,
May 16, 2023, 8:22:15 PM5/16/23
to pflotra...@googlegroups.com
Jens,

It turns out your mapping is off. For example, vertex 102 in geomech does not have a corresponding flow cell. We are fixing the error messaging to catch this. 




Jens Eckel

unread,
May 17, 2023, 7:50:59 AM5/17/23
to pflotran-users
Thanks, Satish. Now the program at least doesn't crash anymore. Striking argument against editing files by hand...

Satish Karra

unread,
May 17, 2023, 11:49:53 AM5/17/23
to pflotran-users
Agreed. Glenn and I are discussing adding some of this internally, especially for structured grids. It's on our TODO. I need to find a funding source to cover this development. 

For now, you have to write your own scripts. Sorry. 

that take lagrit mesh files and convert to geomech files, if you'd like to re-use and modify them. 
Reply all
Reply to author
Forward
0 new messages