[Gmsh] 3D stretched grid

Jozsef Bakosi jbakosi at gmu.edu
Wed Jun 28 23:24:39 CEST 2006


On Tue, Jun 20, 2006 at 10:22:40AM +0200, Emmanuel Chane wrote:
> 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.

I would think with attractors you would have more control on the spatial
distribution of element density. However, I only used this in 2d, with a
line attractor, I'm not sure if that is implemented in 3d, but I also would
be interested in it.

Jozsef
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20060628/9a513c0d/attachment.asc>