[Gmsh] 3D stretched grid

Emmanuel Chane Emmanuel.Chane at wis.kuleuven.be
Tue Jun 20 10:22:40 CEST 2006


Hello,

I am trying to create a simple 3D stretched grid with GMSH but I
experienced some problems. I would like to have a simple cube with a
small spherical hole in the middle. It works fine. Then, in the .geo
file, I give a small density to the elements on the sphere and a big
density to the elements on the cube. The goal is to have a good grid
close to the sphere and a coarse grid far to the sphere. The size of the
cells should increase progressively between the two boundaries. But when
I generate the grid, I have small cells close to the sphere and suddenly
big cells.

To solve the problem, I decided to use a background grid. The .pos file
look like this:

View "background mesh" {
...
SP(-20,-20,-20){1.5}; #big density far awy from the sphere
SP(-1,-1,-1){0.1}; #small density close to the sphere
...
};
with a lot of lines.
It work more or less: the size of the cells increase progressively but
if I look exactly on the sphere boundary, I have huge cells.

I am sure I missed something and I am sure there is a simple solution,
but I really cannot find it.

Best regards,
Emmanuel Chané.

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm