[Getdp] Re: [Gmsh] length scale dependence

Christophe Geuzaine geuzaine at acm.caltech.edu
Thu May 30 17:58:39 CEST 2002


"ghather at uclink.berkeley.edu" wrote:
> 
> So I'm using gmsh and getdp to find the polarization inside a dialetric object.  The object is inside a uniform eletric field.  As a test, I put a sphere inside a box and the polarization was correct to within 4%.
> 
> But i've noticed that the results change with the length scale of the problem.  A 1m sphere in a 10m box gives a slightly different result than a 10m sphere in a 100m box (w/ characteristic lengths also scaled).

There is no guarantee that the mesh will be identical when you change
the scale (even if you change the characteristic length): Gmsh does not
use exact arithmetic, and the 2D algorithm uses random perturbations to
resolve complicated cases...

> 
> Also I tried to get a more accurate result by giving the sphere more points (so the sphere becomes more sphereical).  Somehow, the polarization error became greater and the field inside the sphere became less uniform.

This is strange. How do you compute the error? Remember that the
gradient is only constant by tet (and discontinuous from tet to tet). So
if you compute the error in only one point, you could just be
lucky/unlucky.

You may try using a higher interpolation order, i.e.

> Constraint{
    {Name pol0; Type Assign;
    Case{
      {Region face1; Value 0;}
      {Region face2; Value 0;}
      {Region face3; Value 0;}
      {Region face4; Value 0;}
      {Region face5; Value 0;}
      {Region face6; Value 0;}
    }}
>   {Name pol1; Type Assign;
>   Case{
>     {Region face1; Value $X;}
>     {Region face2; Value $X;}
>     {Region face3; Value $X;}
>     {Region face4; Value $X;}
>     {Region face5; Value $X;}
>     {Region face6; Value $X;}
>   }}
>   {Name pol2; Type Assign;
>   Case{
>     {Region face1; Value $Y;}
>     {Region face2; Value $Y;}
>     {Region face3; Value $Y;}
>     {Region face4; Value $Y;}
>     {Region face5; Value $Y;}
>     {Region face6; Value $Y;}
>   }}
> }
> 
> FunctionSpace{
>   {Name vspace; Type Form0;
>   BasisFunction{
>     {Name sn; NameOfCoef vn; Function BF_Node;
>      Support inside; Entity NodesOf[All];}
      {Name sn2; NameOfCoef vn2; Function BF_Node_2E;
       Support inside; Entity EdgesOf[All];}
>   }
>   Constraint{
>     {NameOfCoef vn; EntityType NodesOf;
>      NameOfConstraint pol1;}
      {NameOfCoef vn2; EntityType EdgesOf;
       NameOfConstraint pol0;}
>   }}
> }
> 
> Jacobian{
>   {Name jac1;
>   Case{
>     {Region inside; Jacobian Vol;}
>   }}
> }
> 
> Integration{
>   {Name int1;
>   Case{
>     {Type Gauss;
>     Case{
>       {GeoElement Triangle; NumberOfPoints 4;}
>       {GeoElement Quadrangle; NumberOfPoints 4;}
        {GeoElement Tetrahedron; NumberOfPoints 15;}
>       {GeoElement Hexahedron; NumberOfPoints 6;}
>       {GeoElement Prism; NumberOfPoints 9;}
>       {GeoElement Pyramid; NumberOfPoints 5;}
>     }}
>   }}
> }
> 

Christophe

-- 
Christophe Geuzaine

Tel: (626) 395-4552    http://www.geuz.org
Fax: (626) 578-0124    mailto:geuzaine at acm.caltech.edu