[Gmsh] generate a "regular" mesh for a simple cylinder
OSHIMA Takuya
oshima at eng.niigata-u.ac.jp
Wed Sep 12 02:15:38 CEST 2007
Hi Shi,
Afaik Gmsh version 2.0.8 (and later) removes this kind of unused
points if you define any physical regions and set Mesh.SaveAll =
0;. So, for your case defining physical resions for whatever part you
need (e. g. by modifying the last part of cylinder.geo to
// extrude in third direction
e1[] = Extrude { 0 , 0 , length }
{
Surface{ 1 };
Layers
{
{ extrusion_number },
{ 1. }
};
};
Physical Surface("Surfaces") = {1,e1[0],e1[2],e1[3],e1[4],e1[5]};
Physical Volume("Volume") = {e1[1]};
) and generating mesh with the 2.0.8 version should solve the problem.
Hope this helps,
Takuya Oshima
oshima at eng.niigata-u.ac.jp
From: Shi Jin <jinzishuai at yahoo.com>
Subject: [Gmsh] generate a "regular" mesh for a simple cylinder
Date: Tue, 11 Sep 2007 16:31:19 -0700 (PDT)
> Hi there,
>
> I have a quite simple task: generate a unstructured
> 1st order tetrahedral grid for a cylinder. There is
> nothing fancy in the domain however I have a
> requirement that the generated mesh should look a bit
> "regular", meaning that it should be well structured
> as "layers" along the axis direction. I want this
> feature since it is then easy for me to divide the
> domain into simple chunks for parallel computation.
>
> I found a almost working solution: use extrusion with
> layers. First I create a circle on a plane (by
> rotating a quarter of circle arc 3 times) and then
> extrude it with layers. The resulting mesh looks
> exactly like what I have in mind. However, there is
> one issue: in the node list, there is a point for the
> center of the circles (at each layer after extrusion).
> However, these points are not used in the mesh. In the
> example I provide below, a new point very close the
> the center (1e-15,1e-15) is created rather using the
> (0,0) point. I guess this shouldn't be a big deal for
> most solvers but the particular package I am using
> does not allow the number of nodes to be different
> from the total number of nodes computed from
> connectivity table.
> I am wondering if you can help solve the problem.
>
> I can think of two ways to overcome the issue:
> 1. Remove the center point. However, I found that I am
> not able to remove this point with the circle arc
> defined.
> 2. Enforce the mesh to use the center points but I
> don't know how to either.
>
> In the attachment, I am providing a simple .geo file
> that demonstrate the problem and its corresponding
> .msh file. Note that in the node list of the
> cylinder.msh file, point 3 and 7 are never used while
> point 19 and 20 are actually just O(1e-15) close by.
>
> Your help is greatly appreciated.
> Thanks.
> Shi