Abaqus to pflotran format

306 views
Skip to first unread message

Romain P.

unread,
Sep 11, 2013, 2:26:56 PM9/11/13
to pflotra...@googlegroups.com

  Hi All,

I wonder if anyone among the pflotran users already has any script to generate boundary conditions in .ss format from an abaqus file that he or she would be willing to share.

I managed to convert my .inp into .mesh using python, but it looks a lot more demanding to get boundaries out of it. 

Thanks in advance for your help.

Best regards
    /Romain

Gautam Bisht

unread,
Sep 12, 2013, 12:05:22 PM9/12/13
to pflotra...@googlegroups.com
Hi Romain,

I'm not familiar with abaqus file format, so I can't answer your question directly. What types of control volumes are present in your mesh (hexahedrons, wedge, etc)? Can you identify from your abaqus mesh, the control volumes in PFLOTRAN *.mesh that are on boundary and the face of each control volume on which you want to apply BC?

-Gautam.

Glenn

unread,
Sep 12, 2013, 11:36:00 PM9/12/13
to pflotra...@googlegroups.com
Create a simple mesh with a couple cells/elements and a BC in Abaqus format.  Then, we could hopefully provide some pointers.  A python script should be able to knock this out.  

Can Abaqus export ExodusII meshes?  I use python to convert ExodusII meshes to a PFLOTRAN format in a round about way.

Glenn

gastonphoebus8 .

unread,
Sep 13, 2013, 4:44:39 AM9/13/13
to pflotra...@googlegroups.com
  Hi Gautam and Glenn,

Thank you for your answers.


What types of control volumes are present in your mesh (hexahedrons, wedge, etc)?
- The mesh consists only in hexahedra.

Can you identify from your abaqus mesh, the control volumes in PFLOTRAN *.mesh that are on boundary and the face of each control volume on which you want to apply BC?
- No, I  don't. This is why it may be hard to create a script to format the BC the way PFLOTRAN wants it.
For vertical and horizontal surfaces I could identify vertices on a particular face by searching for a constant value in a given column.
This gets harder to identify which vertices belong to a inclined plane with no constant x,y or z.



Create a simple mesh with a couple cells/elements and a BC in Abaqus format.  Then, we could hopefully provide some pointers.  A python script should be able to knock this out. 
- I attached an example Abacus .inp file and the equivalent .mesh as I converted it using python. (pflotran can run with this grid, but I have no way to specify BC:s)

Can Abaqus export ExodusII meshes?
- As I understand it Abaqus file that i created with cubit respects the exodusII format.


Best regards
            /Romain



















2013/9/13 Glenn <ghamm...@gmail.com>
grid.inp
grid.mesh

Gautam Bisht

unread,
Sep 13, 2013, 11:15:09 AM9/13/13
to pflotra...@googlegroups.com
Hi Romain,

The grid.mesh for PFLOTRAN is not in correct format. The mesh has 96 hexahedrons with 264 vertices; but ids of vertices forming each hexahedron exceeds 264. The mesh in Abaqus format has vertices ids from 264-528; which will need to be renumbered from 1-264. Did PFLOTRAN run successfully with your grid.mesh file? If yes, could you send your inputfile and we need to add an error check in the code.

Secondly, you may consider reordering vertices forming a control volume. The exodus format is available at http://wikikrause.ins.uni-bonn.de/cgi-bin/viewfile/Main/ExodusII-Format?rev=1;filename=exodusII.pdf
Exodus format for hex: 1-2-3-4-5-6-7-8; while your format has 8-5-1-4-7-6-2-3. Both ordering are correct, but vertices forming top-face of hex are different between to two ordering (2-6-5-1 vs 5-6-7-8)

Regarding identifying boundary for your mesh: It appears to me that control volumes(CV) in your mesh are arranged in a well-defined order: CVs 1,4,7, etc are on the top; CVs 2,5,8, etc are in the middle; and CVs 3,6,9 etc are on the bottom. Thus, for generating top boundary .ss file, you would traverse only CVs 1,4,7,.. and find vertices forming the top face. For bottom .ss file traverse only CVs 3,6,9 etc; For, north/south boundary traverse all CVs. West boundary is formed by only CVs 1-3; and East boundary is formed by CVs 262-264.

-Gautam.
grid_romain.pdf

Glenn Hammond

unread,
Sep 13, 2013, 11:22:25 AM9/13/13
to pflotra...@googlegroups.com
Romain,

Was this mesh generated with Sandia's Cubit?  The header of the grid.inp file suggests cubit....  If so, set up the sidesets for the boundaries, export in ExodusII, and send that file.

Glenn


On Fri, Sep 13, 2013 at 1:44 AM, gastonphoebus8 . <romain.pa...@gmail.com> wrote:

Gardner, William Payton

unread,
Sep 13, 2013, 11:46:01 AM9/13/13
to pflotra...@googlegroups.com

Romain,

 

Make sure you overwrite the cubit ID’s (uncheck export cubit Id’s if you’re using the GUI).  Then the abaqus .inp file appears to exactly follow exodus format.

 

Payton

 

From: pflotra...@googlegroups.com [mailto:pflotra...@googlegroups.com] On Behalf Of Gautam Bisht
Sent: Friday, September 13, 2013 9:15 AM
To: pflotra...@googlegroups.com
Subject: [EXTERNAL] Re: [pflotran-users: 904] Re: Abaqus to pflotran format

 

Hi Romain,

 

The grid.mesh for PFLOTRAN is not in correct format. The mesh has 96 hexahedrons with 264 vertices; but ids of vertices forming each hexahedron exceeds 264. The mesh in Abaqus format has vertices ids from 264-528; which will need to be renumbered from 1-264. Did PFLOTRAN run successfully with your grid.mesh file? If yes, could you send your inputfile and we need to add an error check in the code.

 

Secondly, you may consider reordering vertices forming a control volume. The exodus format is available at http://wikikrause.ins.uni-bonn.de/cgi-bin/viewfile/Main/ExodusII-Format?rev=1;filename=exodusII.pdf

Exodus format for hex: 1-2-3-4-5-6-7-8; while your format has 8-5-1-4-7-6-2-3. Both ordering are correct, but vertices forming top-face of hex are different between to two ordering (2-6-5-1 vs 5-6-7-8)

 

Regarding identifying boundary for your mesh: It appears to me that control volumes(CV) in your mesh are arranged in a well-defined order: CVs 1,4,7, etc are on the top; CVs 2,5,8, etc are in the middle; and CVs 3,6,9 etc are on the bottom. Thus, for generating top boundary .ss file, you would traverse only CVs 1,4,7,.. and find vertices forming the top face. For bottom .ss file traverse only CVs 3,6,9 etc; For, north/south boundary traverse all CVs. West boundary is formed by only CVs 1-3; and East boundary is formed by CVs 262-264.

 

-Gautam.

On Fri, Sep 13, 2013 at 1:44 AM, gastonphoebus8 . <romain.pa...@gmail.com> wrote:

  Hi Gautam and Glenn,

Thank you for your answers.



What types of control volumes are present in your mesh (hexahedrons, wedge, etc)?

- The mesh consists only in hexahedra.


Can you identify from your abaqus mesh, the control volumes in PFLOTRAN *.mesh that are on boundary and the face of each control volume on which you want to apply BC?

- No, I  don't. This is why it may be hard to create a script to format the BC the way PFLOTRAN wants it.

For vertical and horizontal surfaces I could identify vertices on a particular face by searching for a constant value in a given column.

This gets harder to identify which vertices belong to a inclined plane with no constant x,y or z.




Create a simple mesh with a couple cells/elements and a BC in Abaqus format.  Then, we could hopefully provide some pointers.  A python script should be able to knock this out. 

- I attached an example Abacus .inp file and the equivalent .mesh as I converted it using python. (pflotran can run with this grid, but I have no way to specify BC:s)


Can Abaqus export ExodusII meshes?

- As I understand it Abaqus file that i created with cubit respects the exodusII format.

 

Best regards

            /Romain

















Romain P.

unread,
Sep 16, 2013, 3:04:01 PM9/16/13
to pflotra...@googlegroups.com
   Thank you all for your answers,

Gautam, this was really detailed and pedagogic. It helped a lot!

Unticking the "export cubit id:s" solved the problem with the numbering of vertices.
This is what I did when I first tested my script. So the example that "worked" with my own .mesh file did not suffer from the same problem. I tried running a pflotran simulation using "grid.mesh", and it failed, so there is no need for an error check there. My bad.

Using the periodicity of the hexahedra numbering was a great idea. I could extract some of the boundary conditions with no need to export additional shapes from cubit. I will post the script when I have finished it, in case someone else has a use for it.

Alan Stagg

unread,
Sep 18, 2013, 4:11:12 PM9/18/13
to pflotra...@googlegroups.com
Glenn,

Would it be possible to get a copy of your ExodusII to PFLOTRAN python script?  We are starting a project with Richard Mills and would like to explore generating unstructured meshes with CUBIT.

Alan

Glenn Hammond

unread,
Sep 19, 2013, 1:40:01 AM9/19/13
to pflotra...@googlegroups.com
I won't have access to these scripts until I return from travel on Friday, but Jitu has a copy.

Glenn

Alan Stagg

unread,
Sep 19, 2013, 9:31:00 AM9/19/13
to pflotra...@googlegroups.com
Thank you very much, Glenn.  I contacted Jitu and he emailed me the scripts.

Glenn Hammond

unread,
Sep 19, 2013, 9:38:50 AM9/19/13
to pflotra...@googlegroups.com
Make sure you get the terse instructions that I provided to Jitu with the scripts. It isn't as simple as converting directly from ExodusII to HDF5.

Glenn

From: Alan Stagg <sta...@ornl.gov>
Date: Thu, 19 Sep 2013 06:31:00 -0700 (PDT)
Subject: Re: [pflotran-users: 919] Re: Abaqus to pflotran format

Jitendra Kumar

unread,
Sep 19, 2013, 9:42:18 AM9/19/13
to pflotra...@googlegroups.com
Glenn, I have shared the instructions with Alan. And he is welcome to call me if he has any trouble.

Romain P.

unread,
Oct 1, 2013, 12:30:36 PM10/1/13
to pflotra...@googlegroups.com
   Hi,

thanks to your explanations, I was able to figure out how to create the unstructured grid I wanted.
I decided to shortcut cubit and do everything in the same script, so I am posting it here, hoping someone finds it helpful.
It should work for domains looking like parallelepipeds but with the top face leaning in the direction and with the angle of your choice.

Regards
           /Romain
 
create_mesh.py

Hammond, Glenn E

unread,
Oct 1, 2013, 12:44:55 PM10/1/13
to pflotra...@googlegroups.com
Very nice.  If you want to send a brief explanation regarding what the script provides, we can either place it on the wiki or within the repo attributing credit to you.

Glenn

From: pflotra...@googlegroups.com [pflotra...@googlegroups.com] on behalf of Romain P. [romain.pa...@gmail.com]
Sent: Tuesday, October 01, 2013 9:30 AM
To: pflotra...@googlegroups.com
Subject: [EXTERNAL] Re: [pflotran-users: 983] Re: Abaqus to pflotran format

auk...@gmail.com

unread,
Jul 2, 2018, 8:38:15 PM7/2/18
to pflotran-users
Hi there,

It looks like this email thread was active sometime in 2013, but it's still relevant to me! I would similarly like to generate an unstructured mesh given a CUBIT hex mesh. While I'm less concerned with bringing over the boundary conditions, the hex mesh itself has already been created with CUBIT and is fairly 'intricate' if you will. I was curious if the ExodusII to PFLOTRAN scripts and relevant instructions discussed by Glenn, Jitu, Romain, etc. above could be sent over to jump start this process? It would be greatly appreciated!

Thanks,
Steve

Hammond, Glenn E

unread,
Jul 2, 2018, 8:53:00 PM7/2/18
to pflotra...@googlegroups.com

Steve,

 

Take a look at PFLOTRAN_DIR/src/python/abaqus2pflotran.py.  You have to export from CUBIT in abaqus format.

 

Otherwise, Emily Stein converts CUBIT meshes to PFLOTRAN format all the time.  She is out until next week, but ping this email list if you don’t hear back from her by next Monday.  I am unsure whether she uses abaqus2pflotran.py or something else.


Glenn

Reply all
Reply to author
Forward
0 new messages