# [Gmsh] Unsure about gmsh file's cell size

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

 June 28, 2016, 13:20 Unsure about gmsh file's cell size #1 New Member   Caleb Join Date: Jun 2016 Posts: 1 Rep Power: 0 I am trying to create a mesh to do 2-D testing on an airfoil using OpenFOAM. While I am understanding the process of creating the mesh, I am very confused on how gmsh defines the size of the mesh. I have a couple of questions. Is there a way for me to control the amount of cells in an unstructured mesh? When I run gmshToFoam, why am I still getting undefined faces? I thought I have defined all of mine. I am very new to all of this and would love your help. Here is my gmsh .geo file data: // Boundary Points Point(1) = {0, 0, 0, 1}; Point(2) = {-150, 0, 0, 1}; Point(3) = {0, 150, 0, 1}; Point(4) = {225, 150, 0, 1}; Point(5) = {225, -150, 0, 1}; Point(6) = {0, -150, 0, 1}; Point(7) = {225, 0, 0, 1}; // Airfoil Points Point(8) = {-3.75,0,0,1}; Point(9) = {.755,0.900,0,1}; Point(10) = {11.25,0.019,0,1}; Point(11) = {11.25, 0, 0, 1}; Point(12) = {11.25, -.019,0,1}; Point(13) = {.755,-.900,0,1}; Point(14) = {-2.523,.651,0,1}; Point(15) = {7.71,.45,0,1}; Point(16) = {7.71,-.45,0,1}; Point(17) = {-2.523,-.651,0,1}; // Boundary Lines Circle(6) = {3, 1, 6}; Line(7) = {3, 4}; Line(8) = {4, 7}; Line(9) = {7, 5}; Line(10) = {5, 6}; Line(21) = {7,11}; // Airfoil Lines Spline(11) = {8,14,9}; Spline(12) = {9,15,10}; Spline(13) = {12,16,13}; Spline(14) = {13,17,8}; Line(19) = {10,11}; Line(20) = {11,12}; // Sharper Mesh Transfinite Line {11,14} = 100 Using Progression 1.05; Transfinite Line {-12,-13} = 100 Using Progression 1.05; Transfinite Line {-21} = 100 Using Progression 1.05; // Surfaces Line Loop(15) = {7, 8, 9, 10, -6}; Line Loop(16) = {11,12,19,20,13,14}; Plane Surface(17) = {15, 16}; Plane Surface(18) = {16}; Extrude {0, 0, 1} { Surface{17, 18}; Layers{1}; Recombine; } Extrude {0,0,1} { Line{21}; } // Naming Boundary Surfaces Physical Surface("frontAndBack") = {77, 17}; Physical Surface("upperWall") = {36}; Physical Surface("lowerWall") = {48}; Physical Surface("inlet") = {52}; Physical Surface("outlet") = {44,40}; //Naming Airfoil Surfaces Physical Surface("frontAndBackFoil") = {109, 18}; Physical Surface("upperFoil") = {76}; Physical Surface("lowerFoil") = {60}; Physical Surface("trailingedge") = {68, 64}; //Naming Volumes Physical Volume("fluid") = {1}; Physical Volume("foil") = {2};

 June 29, 2016, 01:03 #2 Member   OpenFoam Join Date: Jun 2016 Posts: 82 Rep Power: 10 Have a look at this video; https://www.youtube.com/watch?v=1A-b84kloFs Please let me know if you are still struggling...

 Tags airfoil, cell, gmsh, mesh, size