|
[Sponsors] |
[Gmsh] GmshToFoam: Problem meshing a circle in a square |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 9, 2016, 13:13 |
GmshToFoam: Problem meshing a circle in a square
|
#1 |
New Member
Paul
Join Date: Jun 2016
Posts: 21
Rep Power: 9 |
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]; Cheers. |
|
|
|
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 |