[Gmsh] Beginner Gmsh Questions

chase sharmalay at gmail.com
Thu Jun 1 03:49:44 CEST 2017


Hello,


I have a few questions regarding gmsh usage.


What is the meaning of the mesh element size when supplied to points? 
Does this value provide a mapping between gmsh coordinates and physical 
units? If I would like to describe the geometry in thousandths of an 
inch, what value should be given to the fourth argument of elementary Point?


Also, the documentation describes Line Loops as being ordered and 
oriented. I assume ordered means the indices (IDs) of the lines are 
increasing in the expression list. What makes a Line Loop oriented? If I 
am manually creating geometry files, how can I ensure a Line Loop is 
oriented?


Also, the Extrude command can be used in an expression, where the 
results can be referred to by indexing into a variable. The 
documentation shows an example of an extrusion of a line to a surface, 
and how the indices map to the different lines and surface of the 
extrusion. What about an extrusion of a surface into a volume? What 
indices map to what surfaces when extruding a surface?


Ultimately the goal is to create an axisymmetric mesh that can be used 
with OpenFOAM. I am currently using the following simple geometry to try 
and understand gmsh (I am uncertain about the Physical Surfaces and Volume):


--------------------------------------------------------------------------------

meshSize = 1;

Point(1) = {0, 0, 0, meshSize};
Point(2) = {0, 266, 0, meshSize};
Point(3) = {266, 266, 0, meshSize};
Point(4) = {266, 15, 0, meshSize};

Point(5) = {5830, 15, 0, meshSize};
Point(6) = {5830, 645, 0, meshSize};
Point(7) = {10264, 645, 0, meshSize};
Point(8) = {10264, 0, 0, meshSize};

Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 5};
Line(5) = {5, 6};
Line(6) = {6, 7};
Line(7) = {7, 8};
Line(8) = {8, 1};

Line Loop(9) = {1, 2, 3, 4, 5, 6, 7, 8};

Plane Surface(1) = {9};

Coherence;

Rotate {{1, 0, 0}, {0, 0, 0}, -.04363323129985824} {
   Surface{1};
}

out[] = Extrude {{1, 0, 0}, {0, 0, 0}, .08726646259971647} {
   Surface{1};
};

Physical Surface("Front") = out[0];
Physical Surface("Back") = out[5];
Physical Surface("Atmos") = out[2];
Physical Surface("Vac") = out[3];
Physical Surface("Top") = out[4];

Physical Volume(1) = {out[1]};

--------------------------------------------------------------------------------


Thanks,

Chase Leslie




More information about the gmsh mailing list