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

[Gmsh] Structured mesh in gmsh without Extrude function

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 5 Post By ericnutsch
  • 1 Post By gmazanakis

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 5, 2010, 15:24
Default Structured mesh in gmsh without Extrude function
  #1
Senior Member
 
Eric Nutsch
Join Date: Sep 2009
Location: Eugene, Oregon USA
Posts: 113
Rep Power: 17
ericnutsch is on a distinguished road
Send a message via Skype™ to ericnutsch
Hey everyone,

I have had good luck meshing tetras and prisms with gmsh. However now I am wanting to created a structured hex mesh.

Here is what I currently can do. It requires two extrude functions and can only be controlled by the first parameter:

______________________________________
Point(1) = {0,0,0,0.1};
Point(2) = {1,0.2,0,0.1};
Point(3) = {2,0,0,0.1};
Spline(1) = {1,2,3} ;

Extrude {0,1,0} {
Line{1}; Layers{5}; Recombine;
}
Extrude {0,0,.1} {
Surface{5}; Layers{1}; Recombine;
}


______________________________________


Here is what I want to do. This shape requires the mesh to be controlled by two parameters, and allows you to do much much more with it. Is it possible to do this?

______________________________________
Point(1) = {0,0,0,0.1};
Point(2) = {1,0.2,0,0.1};
Point(3) = {2,0,0,0.1};
Spline(1) = {1,2,3} ;

Point(4) = {-.5,1,0,0.1};
Point(5) = {1,1.2,0,0.1};
Point(6) = {2.5,1,0,0.1};
Spline(2) = {4,5,6} ;

Line(3)={1,4};
Line(4)={3,6};

Line Loop(5) = {1,4,-2,-3} ;
Plane Surface(6) = {5}


______________________________________

Thanks for your help!
Attached Images
File Type: jpg CanMesh.jpg (41.0 KB, 1669 views)
File Type: jpg WantToMesh.jpg (12.8 KB, 1629 views)
ericnutsch is offline   Reply With Quote

Old   January 6, 2010, 19:38
Talking Got it to work!
  #2
Senior Member
 
Eric Nutsch
Join Date: Sep 2009
Location: Eugene, Oregon USA
Posts: 113
Rep Power: 17
ericnutsch is on a distinguished road
Send a message via Skype™ to ericnutsch
Persistence is victorious again...

A big thanks to dolfyn.net or I may never have figured it out:

Here is my script:
Code:
// Kudos to dolfyn for an awesome tutorial
// http://www.dolfyn.net/dolfyn/gmsh/tutorial06.html

 Point(1) = {0,0,0,0.1};
 Point(2) = {1,0.2,0,0.1};
 Point(3) = {2,0,0,0.1};
Spline(1) = {1,2,3} ;

 Point(4) = {-0.5,1,0,0.1};
 Point(5) = {1,1.2,0,0.1};
 Point(6) = {2.5,1,0,0.1};
Spline(2) = {4,5,6} ;

Line(3)={1,4};
Line(4)={3,6};

 Line Loop(1) = {1,4,-2,-3} ;
 Plane Surface(1) = {1};

// Tell Gmsh how many cells you want per edge
Transfinite Line{3,4} = 10;
Transfinite Line{1,2} = 15;

// Tell Gmsh what the corner points are(going clockwise or counter-clockwise):
Transfinite Surface{1} = {1,3,6,4};

// Recombine the triangles into quads:
Recombine Surface{1};

// Havent tested this yet, but doesnt seem to hurt:
Mesh.Smoothing = 100;

// Extrued for a psudo 2D mesh :)
Extrude {0,0,0.15} {Surface{1}; Layers{1}; Recombine; }
Attached Images
File Type: jpg HexWorks.jpg (42.5 KB, 1653 views)
lhcamilo, riesotto, Hisham and 2 others like this.
ericnutsch is offline   Reply With Quote

Old   December 6, 2013, 08:52
Default structured mesh: transfinite surface with more than 6 corners
  #3
New Member
 
Join Date: Dec 2013
Posts: 3
Rep Power: 13
gmazanakis is on a distinguished road
Hello,

I need to create a mesh in a wind blade for my phd. I want to use hex element with structured mesh.

I will get the geometry in a .stp file (see the attach please) so I can not interfere in the geometry.

I merge the stp with a scrip (see the attach please) to recombine and transfinite but I have problems with the surface which has more than 5 corners....

the files are in this link https://dl.dropboxusercontent.com/u/...RightBlade.zip

Any ideas please?
binband likes this.
gmazanakis 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
[Gmsh] GMSH : structured mesh issue bibiboom OpenFOAM Meshing & Mesh Conversion 0 May 17, 2017 19:49
[ICEM] Problem making structured mesh on a surface froztbear ANSYS Meshing & Geometry 4 November 10, 2011 09:52
Structured Mesh in GMSH vitor Main CFD Forum 4 April 28, 2010 09:15
Problem with compile the setParabolicInlet ivanyao OpenFOAM Running, Solving & CFD 6 September 5, 2008 21:50
Droplet Evaporation Christian Main CFD Forum 2 February 27, 2007 07:27


All times are GMT -4. The time now is 18:45.