Tutorial/Example for Creating Realistic Mesh?

543 views
Skip to first unread message

Spencer Whitman

unread,
Dec 9, 2020, 7:10:02 PM12/9/20
to pflotran-users
Hello All,

I am very new to pflotran, and am wondering if there are some examples for creating a realistic computational mesh that is bounded on the upper end by a topographic surface, and on the lower end by a groundwater table.

I am interested in the possibility of using pflotran to simulate a coupled surface-subsurface simulation that would also simulate reactive transport.

I found the following paper which looks to have done what I am interested in, but so far have not found much in the way of documenting creating of anything other than simple block domains.

Painter, S.L., 2016. Integrated Surface/subsurface flow modeling in PFLOTRAN (No. ORNL/TM--2016/575, 1329771). https://doi.org/10.2172/1329771

Thanks!

Moise Rousseau

unread,
Dec 9, 2020, 7:45:01 PM12/9/20
to pflotra...@googlegroups.com
Hi Spencer,

You could have a look at the GemPy software (https://docs.gempy.org/ ; https://github.com/cgre-aachen/gempy) which can be used to create a conceptual model and a block mesh of your problem. I created a piece of code on this software (currently waiting for approval before integration) which permits export in PFLOTRAN readable format (ugi and h5 grid).

Cheers,
Moise

--
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/739eced6-a40e-4a1f-9566-17a9bd91576cn%40googlegroups.com.

Hammond, Glenn E

unread,
Dec 10, 2020, 12:04:46 AM12/10/20
to pflotra...@googlegroups.com

Spencer,

 

I would reach out to Scott Painter or Nathan Collier at Oak Ridge and ask for the input decks that they used in preparing the report.  Nate implemented the capability and to my knowledge, they are the only individuals who have used it.  I admit that this is the first time that I have seen this report.  Let me know if you have difficulty reaching them.

 

I have no advice on the meshing, but there are many users who have developed terrain-conforming unstructured grids.

 

Glenn

 

--

paolo trinchero

unread,
Dec 10, 2020, 11:25:44 AM12/10/20
to pflotran-users
Hi,

for meshing you might want to take a look at GiD


We are using it routinely for PFLOTRAN modelling. It is not free though.
Best regards
Paolo

Spencer Whitman

unread,
Dec 15, 2020, 3:24:47 PM12/15/20
to pflotran-users
Thanks Moise, 

Looks like a very useful option (once integrated).  I'll keep an eye on it.

Spencer Whitman

unread,
Dec 15, 2020, 3:38:59 PM12/15/20
to pflotran-users
Thanks Glenn.

I will reach out to them if/when I get to the stage of constructing a simulation.

Right now, just gathering intel to figure out what the process would look like, and what tools/methods  I would need to employ.

Cheers,

Moise Rousseau

unread,
Dec 15, 2020, 3:42:58 PM12/15/20
to pflotran-users
Spencer,

If you want to start playing with gempy and pflotran, I attached you the export script. You need to copy it on your gempy installation (i.e. /home/.local/share/pythonX/site_package/gempy/ on Ubuntu) in the "utils" folder. You could then export your geomodel to pflotran with the command "export_pflotran_input(geomodel, filename="mesh.ugi")".

Have a nice day,
Moise
export.py

Anne Schulz

unread,
Feb 23, 2022, 5:32:05 AM2/23/22
to pflotran-users
Hello to all and in particular to Moise,
I am currently learning gempy and would like to use it to create a grid for Pflotran. For this I have already followed your previously described steps (copy the file and paste in 'utils'). I think it works. For a first test I used the following example https://docs.gempy.org/integrations/gempy_export_MOOSE.html and replaced the line "export.export_moose_input(geo_model, path='')" with "export.export_pflotran_input(geo_model, path='')". This gives me the following error message:

---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/tmp/ipykernel_8316/1264546133.py in <module> 1
1 # sphinx_gallery_thumbnail_path = '_static/GemPy_model_combined.png' 2
2 import gempy.utils.export as export
----> 3 export.export_pflotran_input(geo_model, path='')

~/anaconda3/lib/python3.9/site-packages/gempy/utils/export.py in export_pflotran_input(geo_model, path, filename, mesh_format)
175 if mesh_format == 'ascii': #export as ugi 176
176 out = open(path+filename, 'w')
--> 177 out.write(f"{n_elements} {n_vertices}") 178
178 for element in elements: 179
179 out.write('\nH')

NameError: name 'n_elements' is not defined

Moise do you possibly have another example and description for me, which specifically refers to exporting to a Pflotran input? That way I can better understand the use of this tool.
Thanks for your help
Anne
Message has been deleted

Moise Rousseau

unread,
Feb 23, 2022, 9:47:15 AM2/23/22
to pflotran-users
Hi Anne,

It's probably an error in this old script. However, this capability was recently upgraded and merged into GemPy development version. You can install it following https://docs.gempy.org/installation.html under "manual installation". Also, there is a tutorial not yet uploaded on GemPy documentation (see attachment).

Let me know you experience,
Moise

Moise Rousseau

unread,
Feb 23, 2022, 9:50:23 AM2/23/22
to pflotran-users
Sorry, the attachment was not sent... To open it in your web browser, first rename the extension with .html.
Simulation of the Perth Basin model with PFLOTRAN — GemPy 2.2.9 documentation.txt

mohammad masoudi

unread,
Feb 25, 2022, 6:33:05 AM2/25/22
to pflotran-users
Hi All,

Does anyone know if it is possible to export geological model from commercial software (Like PETREL) to use in PFLOTRAN (in PFLOTRAN readable format)?

Regards,

Spencer Whitman

unread,
Feb 25, 2022, 10:29:07 AM2/25/22
to pflotra...@googlegroups.com
Hi Mohammad,

This isn't a very specific answer, but I looked into doing this using Leapfrog Geo a year or so ago.  I ended up having to move on from pflotran due to time constraints, but I do remember after spending some time on it, it looked feasible.  Others here may have a better answer, but most likely you'll have to do some processing of your own to get it to work properly.

Spencer

--
You received this message because you are subscribed to a topic in the Google Groups "pflotran-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pflotran-users/5qBqLtYwDro/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pflotran-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pflotran-users/f79e756e-b7d2-4ef4-bdf3-addb7a7976e0n%40googlegroups.com.

LaForce, Tara

unread,
Feb 25, 2022, 10:49:54 AM2/25/22
to pflotra...@googlegroups.com

Hi Mohammad and Spencer,

 

Look into the EXPLICIT_UNSTRUCTURED mesh format.  All it requires is cell centers, volumes, and connection information. 

 

It should be possible to write up a python script to do the conversion from PETREL.  We were able to convert some relatively simple ANSYS-Fluent hexahedral meshes in Section 6 of:

Laforce, T., Chang, K.W., Perry, F.V., Lowry, T.S., Basurto, E., Jayne, R., Brooks, D., Jordan, S., Stein, E.R., Leone, R., Nole, M. (2020) GDSA Repository Systems Analysis Investigations in FY 2020. SAND2020-12028 R

Which you can download off of https://pa.sandia.gov/technical-reports/

 

Feel free to contact me individually for more information if you find this useful.

 

Tara

--

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/CAH0_b68YbQZNZU-NY8rhn-3esx4TVw5eKYvNjGzu0-wQGeivYA%40mail.gmail.com.

Anne Schulz

unread,
Feb 28, 2022, 3:10:06 AM2/28/22
to pflotran-users
Hello Moisse,
thanks for your help, it works fabulously. However, some questions still arose for me:
For my model I need to specify boundary conditions for the east, west, north, south and bottom sides. I tried to intervene in the export.py file, unfortunately I did not succeed to output the corresponding *.ss files. Can you help me with this?
I also wanted to ask if it is possible to output corresponding elements for the faults that are specified as surfaces in gempy, in order to be able to assign material properties to them in Pflotran!
Have a nice week and thanks for your efforts.
Anne

mohammad masoudi

unread,
Feb 28, 2022, 3:55:04 AM2/28/22
to pflotran-users
Thank you Tara. I will look into the report and contact you if I needed additional information. 

Cheers,
Mohammad

Vasileios Tsitsopoulos

unread,
Mar 1, 2022, 7:14:22 AM3/1/22
to pflotran-users

Hi Spencer,

In the near future I will be looking at a similar problem (coupled surface-subsurface simulation) so I will be interested if you find any additional information.

In terms meshing, I am currently trying to use OpenGeoSys (for the first time) for the creation of the mesh and then load it into PFLOTRAN.
OpenGeoSys  is an open source THMC  tool that comes with a GUI  (i.e. DataExplorer) that is straightforward to use. 
The DataExplorer uses GMSH (mesh generation) which is also an open source tool but you will need to install it.
From my experience so far, the process of generating  a mesh  in DataExplorer,  by utilising  ESRI asc files (defining the geological layers of your model) and appropriate shape files (i.e. model boundary, rivers etc) is straight forward.
I have not yet moved to exporting the model to PFLOTRAN. I suspect some coding might be required but it should be straight-forward. 

Thanks 
Vasileios

Anne Schulz

unread,
Mar 1, 2022, 7:48:45 AM3/1/22
to pflotran-users

Hey Moise sorry for the misspelling of your name. I hope you help me anyway. ;)

Moise Rousseau

unread,
Mar 2, 2022, 3:55:14 PM3/2/22
to pflotran-users
Anne,

I didn't see the misspell, so not a big deal :)

Regarding the boundary conditions (east, west, north, south and bottom side), since GemPy model is rectangular, you can create a region for each boundary within PFLOTRAN using REGION / COORDINATES.

However, retreiving fault element is not yet implemented in the export script, best would be a GemPy fonction which create a fault formation (handled by the export script as any other formation), maybe you can create an issue on the GemPy github page (https://github.com/cgre-aachen/gempy) to ask them how to do that.

Moise
Reply all
Reply to author
Forward
0 new messages