[Gmsh] Volume Meshing a sphere with reasonably homogenous edgelengths

Neilen Marais nmarais at sun.ac.za
Tue Feb 13 12:47:37 CET 2007


 Hi.

I'm trying to mesh a sphere with a radius of 1m and a tetrahedral edge
length around 1/6 (i.e 0.166666666666667), but I'm having real trouble
getting a nice mesh. 

At the moment I get the longest and shortes edgelenghts like this:

max:  0.48267512213
min:  0.055869461987

The minimum edge lenght is kinda OK, but the max is way off from what is
acceptable. Is there any way I can force gmsh to generate a more
homogenous mesh? I have tried the mesh-optimisation commands, but they
seem to consider only individual elment quality, rather than the global
min / max edge lengths.

The surface mesh seems to be very nice and homogenous, it's only the
volume mesh that is inhomogenous.

I'm using this geometry file with gmsh 2.0, but have also tried
variations with more surfaces:

lc = 1/6;
radius = 1;
Point(1) = {0.0,0.0,0.0,lc};
Point(2) = {radius,0.0,0.0,lc};
Point(3) = {0,radius,0.0,lc};
Circle(1) = {2,1,3};
Point(4) = {-radius,0,0.0,lc};
Point(5) = {0,-radius,0.0,lc};
Circle(2) = {3,1,4};
Circle(3) = {4,1,5};
Circle(4) = {5,1,2};
Point(6) = {0,0,-radius,lc};
Point(7) = {0,0,radius,lc};
Circle(5) = {3,1,6};
Circle(6) = {6,1,5};
Circle(7) = {5,1,7};
Circle(8) = {7,1,3};
Circle(9) = {2,1,7};
Circle(10) = {7,1,4};
Circle(11) = {4,1,6};
Circle(12) = {6,1,2};
Line Loop(13) = {2,8,-10};
Ruled Surface(14) = {13};
Line Loop(15) = {10,3,7};
Ruled Surface(16) = {15};
Line Loop(17) = {-8,-9,1};
Ruled Surface(18) = {17};
Line Loop(19) = {-11,-2,5};
Ruled Surface(20) = {19};
Line Loop(21) = {-5,-12,-1};
Ruled Surface(22) = {21};
Line Loop(23) = {-3,11,6};
Ruled Surface(24) = {23};
Line Loop(25) = {-7,4,9};
Ruled Surface(26) = {25};
Line Loop(27) = {-4,12,-6};
Ruled Surface(28) = {27};
Surface Loop(29) = {28,26,16,14,20,24,22,18};
Volume(30) = {29};

Thanks
Neilen