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

[Gmsh] GmshToFoam: Problem meshing a circle in a square

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By alexeym
  • 1 Post By alexeym

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   July 9, 2016, 13:13
Default GmshToFoam: Problem meshing a circle in a square
  #1
New Member
 
Paul
Join Date: Jun 2016
Posts: 21
Rep Power: 9
ChasingNeutrons is on a distinguished road
Hi guys,

I'm trying to make a simple 2D (well, 3D in OpenFOAM!) mesh using Gmsh. Here's how I've written it:

Code:
//Inputs
w=1;//m
h=1;//m
r=0.3;//m
gridsize=w/20;

Point(1) = {0, 0, 0, gridsize};
Point(2) = {w, 0, 0, gridsize};
Point(3) = {w, h, 0, gridsize};
Point(4) = {0, h, 0, gridsize};
Point(5) = {w/2, h/2, 0, gridsize};
Point(6) = {(r+w/2), h/2, 0, gridsize};
Point(7) = {w/2, (r+h/2), 0, gridsize};
Point(8) = {(-r+w/2), h/2, 0, gridsize};
Point(9) = {w/2, (-r+h/2), 0, gridsize};
Line(1) = {4, 3};
Line(2) = {3, 2};
Line(3) = {2, 1};
Line(4) = {1, 4};
Circle(5) = {8, 5, 7};
Circle(6) = {7, 5, 6};
Circle(7) = {6, 5, 9};
Circle(8) = {9, 5, 8};
Line Loop(1) = {5, 6, 7, 8};
Line Loop(2) = {4, 1, 2, 3};
Ruled Surface(1) = {1};
Plane Surface(2) = {2, 1};
surfaceVector[] = Extrude {0, 0, 0.1} {
Surface{1,2};
Layers{1};
Recombine;};
Physical Volume("internal") = surfaceVector[1];
Physical Surface("LeftWall")=surfaceVector[2];
Physical Surface("RightWall")=surfaceVector[4];
Physical Surface("BottomWall")=surfaceVector[5];
Physical Surface("TopWall")=surfaceVector[3];
It seems to mesh all right when I run gmsh -3. However, when I run gmshToFoam I get a seg fault immediately after 'Create Time'. Does anyone have any suggestions on getting this thing working? I'm optimistic that such a simple geometry shouldn't pose too much of a challenge!

Cheers.
ChasingNeutrons is offline   Reply With Quote

 


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
[ANSYS Meshing] ANSYS Meshing Problem Saikat_FM ANSYS Meshing & Geometry 1 September 15, 2016 02:25
[ICEM] Problem with meshing half NACA0009 in 3D Eizo ANSYS Meshing & Geometry 30 February 17, 2013 02:40
[snappyHexMesh] snappyHexMesh: problem meshing baffle (surface with zero thickness) julien.decharentenay OpenFOAM Meshing & Mesh Conversion 7 June 16, 2012 08:12
[GAMBIT] 3D boundary layer and meshing problem in GAMBIT 2.4.6 prashanthreddyh ANSYS Meshing & Geometry 1 December 20, 2011 00:35
GAMBIT meshing problem Gauthier Lambert Main CFD Forum 1 August 3, 2000 09:22


All times are GMT -4. The time now is 07:41.