CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[Other] vtk mesh or Abaqus mesh to OpenFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree11Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 2, 2009, 06:20
Default vtk mesh or Abaqus mesh to OpenFOAM
  #1
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi,

Does anybody know how to get a vtk mesh or an Abaqus mesh into OpenFOAM?


The reason I ask is that I was trying out the freely available meshing software IA-FEMesh:
http://www.ccad.uiowa.edu/mimx/IA-FEMesh/

IA-FEMesh lets you hex mesh complex geometries like bones. But you can only export the mesh as a '.inp' file (Abaqus) or save it as a '.vtk' mesh.

So does anybody know how I might convert these to OpenFOAM?


Thanks in advance,
Philip

Some info:
I am wanting to entirely hex mesh a bone in OpenFOAM.
snappyHexMesh works fine to produce a hex dominated mesh, with a few polyhedra, and I will probably use these meshes for my simulations.

Also, if you entirely tet mesh the bone (in Gambit for example), then you can use the 'polyDualMesh' utility to create an entirely polyhedral mesh. I will have to do some mesh analysis to see if these meshes are suitable for my simulations.
elvis and hogsonik like this.
bigphil is offline   Reply With Quote

Old   September 29, 2009, 12:58
Default Eureka
  #2
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Just in case someone else is trying to do the same thing, I achieved it in the following (long way around) way:
  • From IA-FEMesh, I exported the mesh in the Abaqus format
  • In Fluent 6.3.26, go File->Import->Abaqus->Input file then, once the mesh is loaded, File->write->case
  • In Gambit, this case file can be imported via File->Import->Mesh->Fluent5/6 and pick mesh type to be 3D.
  • The mesh can then be exported in the gambit neutral format '.neu'. Set solver to generic, then File->export->mesh.
  • This mesh file can then be converted in OpenFOAM using the 'gambitToFoam' command.

And there you go,
the next step is figuring out how to define patches...

Philip
skuznet, Noraa and hogsonik like this.
bigphil is offline   Reply With Quote

Old   September 30, 2009, 06:36
Default
  #3
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 256
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Thank you, Philip, very much for your guide line!
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   September 30, 2009, 06:47
Default
  #4
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
You're welcome,

I trying out the OF-1.4 utility 'patchTool' to define patches on this imported geometry, if you come up with a better way, I'd love to know.

Best Regards,
Philip Cardiff
bigphil is offline   Reply With Quote

Old   September 30, 2009, 07:07
Default
  #5
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 256
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Philip,
do you have any ideas how to produce either STL or VTK files from FLUENT cas data or gambit mesh? I haven't check yet, if there is such export function in GAMBIT.
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   September 30, 2009, 07:16
Default
  #6
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Dr. VAKHRUSHEV,

I am not very familiar with Fluent, in fact I only installed it for this conversion!

But as far as I know, I don't think Gambit can export STL files, although I could be wrong.

The STL files I use were generated from CT scans using Mimics, which is a program for reconstructing 3D models from CT/MRI scans.

Possibly Rhino (http://www.rhino3d.com/) might be able to create STL files from your data, but once again I am not certain.

You could check the forum for how other people do it.

Philip Cardiff
bigphil is offline   Reply With Quote

Old   October 3, 2009, 04:12
Smile Abaqus to Foam software
  #7
Member
 
Fran
Join Date: Sep 2009
Location: Buenos Aires
Posts: 37
Rep Power: 17
lfbarcelo is on a distinguished road
Hello, I have worked several weeks on a software that converts abaqus meshes into a gmsh mesh, which can then be converted with the command gmshToFoam that comes with the openFoam package.

After making the mesh, when you create a job in abaqus you can write the input for that job, the mesh is then written as a .inp file like 'job-1.inp' in the abaqus temp folder . This software runs in windows and takes a '.inp' file and gives a '.msh' file.

I can't upload it because it exceeds te max filesize but if anyone is interested send an E-mail to lfbarcelo@gmail.com and I will sen it to you as a .zip with all the necessary libraries to install it.
skuznet likes this.
lfbarcelo is offline   Reply With Quote

Old   October 3, 2009, 04:19
Default
  #8
Member
 
Fran
Join Date: Sep 2009
Location: Buenos Aires
Posts: 37
Rep Power: 17
lfbarcelo is on a distinguished road
This software defines patches, you only havo to asign a different bondary condition to each patch in abaqus and then you foam mesh will have different patches, you only have to name them by editing the boundary file.
lfbarcelo is offline   Reply With Quote

Old   May 16, 2010, 11:51
Default gambit-fortran
  #9
New Member
 
ines
Join Date: May 2010
Posts: 9
Rep Power: 16
noussa is on a distinguished road
hi,
does any ones know how to export mesh from gambit into fortran.
thank a lot for your help.
noussa is offline   Reply With Quote

Old   May 17, 2010, 05:19
Default
  #10
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Hi,

What do you mean by fortran?

Fortran is just a language, not a mesh format.

Philip
bigphil is offline   Reply With Quote

Old   May 17, 2010, 16:55
Default
  #11
New Member
 
ines
Join Date: May 2010
Posts: 9
Rep Power: 16
noussa is on a distinguished road
hi,
I schould prepare my code with FORTRAN, I want to use a nonregular grid

, this is why it is easier to export the grid from Gambit. I want to know how

to export the grid?
thanks..
noussa is offline   Reply With Quote

Old   May 18, 2010, 03:49
Default
  #12
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 256
Blog Entries: 1
Rep Power: 19
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
There is no general export tools from Gambit to FORTRAN:-)
I wonder is today the 1st of April???
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   May 18, 2010, 04:27
Default
  #13
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
Quote:
Originally Posted by makaveli_lcf View Post
Philip,
do you have any ideas how to produce either STL or VTK files from FLUENT cas data or gambit mesh? I haven't check yet, if there is such export function in GAMBIT.
What about CGNS = "CFD General Notation System"?
This should be supported by FLUENT or GAMBIT for sure!

And OF has http://openfoamwiki.net/index.php/Si...GNS_Converters
CGNS Converters as well. Thanks to Martin Beaudoin

Then you could use foamToVtk if that is still nescessary

elvis
elvis is offline   Reply With Quote

Old   July 11, 2010, 12:09
Wink rapid help
  #14
New Member
 
mobin's Avatar
 
mobin
Join Date: Jul 2010
Posts: 2
Rep Power: 0
mobin is on a distinguished road
Quote:
Originally Posted by lfbarcelo View Post
Hello, I have worked several weeks on a software that converts abaqus meshes into a gmsh mesh, which can then be converted with the command gmshToFoam that comes with the openFoam package.

After making the mesh, when you create a job in abaqus you can write the input for that job, the mesh is then written as a .inp file like 'job-1.inp' in the abaqus temp folder . This software runs in windows and takes a '.inp' file and gives a '.msh' file.

I can't upload it because it exceeds te max filesize but if anyone is interested send an E-mail to lfbarcelo@gmail.com and I will sen it to you as a .zip with all the necessary libraries to install it.
hi ifbarcelo
thank you for your trying and works
i need your software and i will send my email to you please send it
thanks
mobin is offline   Reply With Quote

Old   September 14, 2010, 12:27
Default From IA-FEMesh 1.0 to FOAM without any commercial code?
  #15
New Member
 
Bertrand Delvaux
Join Date: Apr 2010
Posts: 29
Rep Power: 16
Bertrand is on a distinguished road
Hello,

I am a new user of OpenFOAM, using it for my PhD. I manipulate human body structures from MRI data, mesh them, but I would like to use it in OpenFOAM to run some case. Do you know wether there is an alternative to the Fluent - Gambit commercial code of use?

Best regards,

Bertrand
Bertrand is offline   Reply With Quote

Old   September 14, 2010, 13:36
Default
  #16
Super Moderator
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,093
Rep Power: 34
bigphil will become famous soon enoughbigphil will become famous soon enough
Quote:
Originally Posted by Bertrand View Post
Hello,

I am a new user of OpenFOAM, using it for my PhD. I manipulate human body structures from MRI data, mesh them, but I would like to use it in OpenFOAM to run some case. Do you know wether there is an alternative to the Fluent - Gambit commercial code of use?

Best regards,

Bertrand
Hi Bertrand,

Unfortunately I have not come across any other software to convert vtk/abaqus to OpenFOAM.
You could write a program to convert them but this may be a lot of effort.

Another possible option is to use a free meshing program that tet meshes your geometry, then import to OpenFOAM and then convert this geometry into polyhedral using polyDualMesh.

Philip
bigphil is offline   Reply With Quote

Old   September 14, 2010, 17:06
Default
  #17
New Member
 
Bertrand Delvaux
Join Date: Apr 2010
Posts: 29
Rep Power: 16
Bertrand is on a distinguished road
Hi Philip,

Thank you very much for your very quick answer! So I actually use ItkSnap to get a segmentation of some part of the human body, out of MRI images : I can save this mesh as .stl or .vtk format. But which free software would you advise to transfer one of those two formats to OpenFOAM? Knowing that I don't think I can use SnappyHexMesh, since I want to have a mesh inside the .stl and not outside... Or can I?

Bertrand
Bertrand is offline   Reply With Quote

Old   September 14, 2010, 20:01
Default
  #18
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Greetings to all!

Bertrand: you can use snappyHexMesh to generate a mesh inside a closed 3D STL surface... as long as that surface isn't simply flat (2D in 3D)!

Additionally, you could take a look to the surfaceMesh* utilities that provide ways to convert surface meshes between (both ways) OpenFOAM format and various others (which I'm not sure who they are ).

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   September 15, 2010, 06:08
Default
  #19
Senior Member
 
Elvis
Join Date: Mar 2009
Location: Sindelfingen, Germany
Posts: 620
Blog Entries: 6
Rep Power: 24
elvis will become famous soon enough
Hello Bertrand,

perhaps you should take a look at Mevislab http://www.mevislab.de/ to get an STL-file from your MRI Data. Of course ITK Snap does the job as well (all based on Kitware´s VTK).
After that you can use SnappyHexMesh as bruno said before, just make sure that your locationInMesh looks really on the inside of your STL. Therefore a visual aid to assure this, like it is tried in http://www.discretizer.org/files/boxdialog.jpg discretizer Setup


Of course you can take IA-FEMesh as well and convert VTK-Files into STL-Files with a short VTK-Program, I can post my python Program that converts VTK-Data to STL-files if you prefer IA-FEMesh.

elvis

Last edited by elvis; September 15, 2010 at 06:24.
elvis is offline   Reply With Quote

Old   August 16, 2011, 05:14
Default
  #20
New Member
 
Caleb Miles
Join Date: Jun 2011
Posts: 13
Rep Power: 15
calebamiles is on a distinguished road
Hi Bertrand,

I don't know if this reply will still be of use to you, but the open source program enGrid can import vtk meshes and it has the ability to export directly to OpenFoam, however, I don't have any direct experience importing vtk meshes using enGrid. You can find the software at http://engits.eu/en/engrid.

Cheers,

Caleb
calebamiles is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Salome] Script for converting a mesh from Salome-Platform to OpenFOAM nsf OpenFOAM Meshing & Mesh Conversion 86 February 8, 2023 11:30
OpenFOAM course for beginners Jibran OpenFOAM Announcements from Other Sources 2 November 4, 2019 09:51
[Commercial meshers] OpenFoam Mesh to Fluent Mesh in parallel case DominicTNC OpenFOAM Meshing & Mesh Conversion 3 November 22, 2017 10:19
OpenFOAM Foundation releases OpenFOAM 2.2.2 opencfd OpenFOAM Announcements from ESI-OpenCFD 0 October 14, 2013 08:18
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 11:19.