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

[Other] Generating a unstructured grids from STL files

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 10, 2005, 16:02
Default There was once a solid edge or
  #21
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
There was once a solid edge origin which was free but it works in windows and I don't know if they distribute it now. It allowed 3D modelling and output as STL files.

You can also use OpenCascade to import models and export STL files. I think there are some opensource CAD applications based on OpenCascade but I don't know if they are really useful.

If you find anything please let me know.
billy is offline   Reply With Quote

Old   August 18, 2005, 05:30
Default Hello everyone, I managed t
  #22
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18
sita is on a distinguished road
Hello everyone,

I managed to compile stlToGmsh and also converting an stl-file to a msh-file works fine, but then using gmshToFoam gives a fatal error (FOAM FATAL IO ERROR : Attempt to get back from bad stream etc....) What did I do wrong???

Sita
sita is offline   Reply With Quote

Old   August 18, 2005, 06:34
Default Your .msh file is probably emp
  #23
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Your .msh file is probably empty. Did you actually generate a (3D) mesh in gmsh?
mattijs is offline   Reply With Quote

Old   August 18, 2005, 13:12
Default Open the mesh file in an edito
  #24
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
Open the mesh file in an editor and check if it created something. You can also open it in gmsh and see if it is OK.
billy is offline   Reply With Quote

Old   August 23, 2005, 02:29
Default I don't have gmsh (yet), but I
  #25
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18
sita is on a distinguished road
I don't have gmsh (yet), but I viewed the msh-files I created in a text editor; it seems to consist of a list of nodes ($NOD) and a list of elements ($ELM), looks ok to me...
sita is offline   Reply With Quote

Old   August 30, 2005, 02:12
Default Anyone? Please?
  #26
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18
sita is on a distinguished road
Anyone? Please?
sita is offline   Reply With Quote

Old   August 30, 2005, 04:54
Default You started off from a surface
  #27
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
You started off from a surface description in the form of an STL file, right? So stlToGmsh probably converts it to the gmsh surface format.

At what point did you generate tetrahedra (volume elements) from the surface description?

The gmshToFoam converter only converts the volume elements in the gmsh file.
mattijs is offline   Reply With Quote

Old   August 30, 2005, 05:22
Default Uhm... in fact I don't really
  #28
Senior Member
 
Sita Drost
Join Date: Mar 2009
Location: Arnhem, The Netherlands
Posts: 227
Rep Power: 18
sita is on a distinguished road
Uhm... in fact I don't really know from what I started off; I used the lever.stl file that Billy posted together with the stlToGmsh
sita is offline   Reply With Quote

Old   August 30, 2005, 12:40
Default I used the lever.stl and succe
  #29
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
I used the lever.stl and successfully built a gmsh file. It depends on a lot of things the number of divisions on x, y and z axis, etc. How many divisions are you using? How many cells are generated?
The best would be to open it using gmsh before using gmshToFoam.
billy is offline   Reply With Quote

Old   September 2, 2005, 06:02
Default Forget my last post, forgot
  #30
Senior Member
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26
mattijs is on a distinguished road
Forget my last post,

forgot that stlToGmsh is a mesh generator, thought it was only a surface format converter. Still helps to have a look at the gmsh file and check for elements with element type (2nd column) 4,5,6,7 (tet,pyr,prism,hex)
mattijs is offline   Reply With Quote

Old   September 4, 2005, 07:32
Default Hi, First of all: Thanks a
  #31
unoder
Guest
 
Posts: n/a
Hi,

First of all: Thanks a lot for the stlToGmsh code which seem to make me able to import a geometry from pro engineer (exported in stl) for a cast gating system. At least I can view it with patchTool and it looks nice. With patchtool I've chosen the inlet, called the rest something with "default patch" - as I remember it (wall) and saved it.

This is a beginner's question, but it seems to me like I have to handcode the blockMeshDict file or something, before the mesh can be generated with blockmesh?

I can't view the geometry in paraview but since my experience with Foam is mostly restricted to what's in the users guide I probably missed something and will appreciate any help/guidance.

Later on, I'll find out how to do a simple calculation with any solver (icoFoam?) on the cast gating system. Any help?
  Reply With Quote

Old   September 4, 2005, 23:24
Default Hi, I am also interested i
  #32
Senior Member
 
Billy
Join Date: Mar 2009
Posts: 167
Rep Power: 17
billy is on a distinguished road
Hi,

I am also interested in the casting and mold filling applications so if you have any developments please share with us. When I made stlToGmsh I also had these applications in mind.

What I did to view the mesh in paraFoam was to use the gmshToFoam program. The gmshToFoam program will create points, cells, faces files and then you should be able to open it in paraFoam as you would do to open any other case.
billy is offline   Reply With Quote

Old   September 5, 2005, 15:24
Default Hi Billy, I just started wi
  #33
unoder
Guest
 
Posts: n/a
Hi Billy,

I just started with the project last week, so I'll share the final report with anyone interested in it in some months (I think I put the report on my homepage download section). It's not a fulltime project and I didn't even start to write anything yet...

A ph.d. student at my university would like to help me with OpenFoam. I will then try to compare results from a real casting experiment (video recording of mould filling with glass plates in front of one mould part) and with the commercial program Magmasoft and our own 2D code written in Matlab with ADI-method. We also have temperature recordings of known geometry experiments. The comparison of mould filling between real casting experiment, Magmasoft and OpenFoam should be interesting because OpenFoam takes surface tension into consideration. I think Magmasoft takes wall friction into consideration but not surface tension. That's what I've been told numerous times...

Our own Matlab code will only calculate temperature changes based on heat conduction equation (no filling). Temperature distribution could be compared with Magmasoft and perhaps Foam?

I still need to take some fluid-courses so don't expect I'll figure out anything revolutionary. Actually I would like to hear comments from anyone later (if you have any)... There's a good change that I later on also might even ask "stupid" questions here, since I'm a beginner - only taking basic "fluid mechanics" at this moment :-)

But I think it should be interesting and I think I'll learn a lot from
it... If anyone else thinks this should be interesting, I would be happy to share anything later on, as the project progresses.
  Reply With Quote

Old   November 2, 2007, 18:20
Default Hi, Billy, I am just curiou
  #34
Senior Member
 
Pei-Ying Hsieh
Join Date: Mar 2009
Posts: 317
Rep Power: 18
hsieh is on a distinguished road
Hi, Billy,

I am just curious whether you are still active on the cartesian mesher.

I am working on a conjugate heat transfer problem with very complex geometries. I need to include solid elements for conduction + fluid elements for convection. Cartesian grid will be the ideal method to generate the mesh. There is no need to body-fitted mesh in my case. Can your mesh handle local refinements (where the solid boundaries are)?

Thanks!

Pei
hsieh is offline   Reply With Quote

Old   June 9, 2009, 13:07
Default
  #35
New Member
 
Join Date: Mar 2009
Posts: 27
Rep Power: 17
jugghead is on a distinguished road
Look at:

http://www.ccad.uiowa.edu/mimx/IA-FEMesh/
jugghead 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
[Other] OpenFOAM - structured or unstructured Grids ? thomasduerr OpenFOAM Meshing & Mesh Conversion 22 November 25, 2018 00:18
On the diffusion term discretization on unstructured grids sbaffini Main CFD Forum 33 November 10, 2017 04:20
[snappyHexMesh] Convert stl files and multi region abrunet OpenFOAM Meshing & Mesh Conversion 1 July 1, 2014 11:15
Reading in and Manipulating STL files prapanj Mesh Generation & Pre-Processing 0 December 9, 2013 06:37
TVD/NVD in unstructured grids m.s. darwish Main CFD Forum 0 August 24, 1999 14:44


All times are GMT -4. The time now is 14:43.