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

[Gmsh] gmsh STL

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 13, 2013, 12:43
Default gmsh STL
  #1
New Member
 
David Doose
Join Date: Jan 2013
Posts: 5
Rep Power: 13
huitetquatre is on a distinguished road
Hi,

I want to generate a mesh around an object using gmsh. This object is defined using a STL file.
My current geo file is organised as follow:
1/ importing the STL object;
2/ creating the bounding box around the object;
3/ physical surface definition.

I've got different problems:
- I don"t know how to link the surface of the object with the different surfaces of the box. Consequently, the generated mesh with gmsh is not taking into account the STL object.
- How can determine the physical entities (surface and volume) ?

The geo file is the following one:
// --------------------------------------------------
// STL Object
// --------------------------------------------------
// merge a surface mesh
Merge "cone.stl";

// add a geometrical volume
Surface Loop(1) = {1};
Volume(1) = {1};

// --------------------------------------------------
// Bounding Box
// --------------------------------------------------
l = 1;

xmin = -10;
xmax = 10;
ymin = -10;
ymax = 10;
zmin = -10;
zmax = 10;

Point(1000) = {xmin, ymin, zmin, l};
Point(1001) = {xmin, ymin, zmax, l};
Point(1010) = {xmin, ymax, zmin, l};
Point(1011) = {xmin, ymax, zmax, l};

Line(2001) = {1000, 1001};
Line(2002) = {1001, 1011};
Line(2003) = {1011, 1010};
Line(2004) = {1010, 1000};

Line Loop (2005) = {2001, 2002, 2003, 2004};
Plane Surface(10006) = {2005};
box[] = Extrude {(xmax-xmin), 0, 0}{
Surface{10006};
// Layers{1};
};
Delete { Volume{box[1]}; }

// TODO
// Volume(4000) = {?};

// --------------------------------------------------
// Physics
// --------------------------------------------------
// Physical Surface("back") = {?};
// Physical Surface("front") = {?};
// Physical Surface("top") = {?};
// Physical Surface("bottom") = {?};
// Physical Surface("left") = {?};
// Physical Surface("right") = {?};
// Physical Surface("object") = {?};
// Physical Volume("internal") = {?};
huitetquatre is offline   Reply With Quote

Old   January 16, 2013, 09:46
Default
  #2
New Member
 
David Doose
Join Date: Jan 2013
Posts: 5
Rep Power: 13
huitetquatre is on a distinguished road
Problem solved.
huitetquatre is offline   Reply With Quote

Old   December 5, 2013, 02:07
Default
  #3
New Member
 
Albert Pinto
Join Date: May 2013
Posts: 16
Rep Power: 12
Abracurcix is on a distinguished road
Hello David,
Could you please share with us as to how you solved this problem?

Thanks,
Albert
Abracurcix is offline   Reply With Quote

Old   December 13, 2013, 01:56
Default
  #4
New Member
 
Albert Pinto
Join Date: May 2013
Posts: 16
Rep Power: 12
Abracurcix is on a distinguished road
Anyone else has any suggestions regarding generating meshes around STL objects with GMSH? Any examples would be helpful. Please?

Albert

Quote:
Originally Posted by Abracurcix View Post
Hello David,
Could you please share with us as to how you solved this problem?

Thanks,
Albert
Abracurcix is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[CAD formats] Creating waterproof STL using snappyHexMesh or salome Tobi OpenFOAM Meshing & Mesh Conversion 58 May 13, 2020 07:01
[Gmsh] Gmsh STL import error me3840 OpenFOAM Meshing & Mesh Conversion 9 October 9, 2016 21:52
[Gmsh] boundary conditions with Gmsh stl Bercht OpenFOAM Meshing & Mesh Conversion 1 July 10, 2012 12:04
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 11:56
STL to gmsh nomad OpenFOAM 2 August 10, 2009 05:09


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