[Getdp] enquiry about the use of GetDP

raul conejeros rconejer at ucv.cl
Mon Mar 3 18:45:56 CET 2003


Dear Dr Geuzaine,

I am new in the use of GetDP and i intend to use in the solution of a 
problem involving an integro partial differential equation for a media with 
non-isotropic characteristics.

Up to now i managed to assemble a very basic archive in order to solve the 
heat equation in a square plate. The files .pro and  .geo are at the end of 
this e-mail.


I have tried to trace some of the how to´s from the reference maula and the 
mailing list, but there are still some things which are unclear to me and i 
hope you could help me.

The first concerns the definition of  boundary conditions:

I understood, a Dirichlet boundary condition is defined as i use it in the 
constrant Fronteras of my file, but that case i fail to understand why it 
seems not to work for the region tue indicated in the same constraint which 
i fixed to 1.0.

On the other hand i defined a Neumann BC as indicated in some of the cases 
of the mailing list as :
.



  Equation {
  Galerkin {  Dt [  rho[]*Dof{Tmp}, {Tmp}];
           In todo ; Integration TmpInt; Jacobian TmpJacSur; }
  Galerkin {[  epsil[] * Dof{Grad Tmp}, {Grad Tmp} ];
           In todo ; Integration TmpInt; Jacobian TmpJacSur; }
  Galerkin {[  - nbc , {Tmp} ];
           In Pro ; Integration TmpInt; Jacobian TmpJacLin; }


          }
}
}

where nbs is fixed to a value of 10


In this case it seems that it does not matter how much i change the value 
of nbc, the temperature does not seem to vary more around the boundary Pro. 
The same happens if i try to convert the region tue into a source or into a 
sink region.

Please could you throw you some light into this.

As a last point i would like to ask about the way to define an anisotropic 
parameter epsil with a value in the x direction and a different one in the 
y direction and use it in the equation to indicate a different themal 
condution in each axis direction.

Thanks in advance,


Raul Conejeros
Escuela de Ingenieria Bioquimica
Universidad Catolica de valparaiso
Chile
e-mail: rconejer at ucv.cl








-------------------.pro file

Group {

Inj  = Region[11];
Pro  = Region[12];
Supe = Region[100];
todo = Region[{Inj,Pro,Supe}];
tue = Region[17];
}

Function {
epsil[todo] =0.01;
rho[todo] = 1.0;
fac[]=($Y < 0.02) ? 1.0 : 0.0;

zbc =0.0;
nbc = 10.0;

   TmeStt = 0.0;
   TmeStp = 1.0;
   TmeDel = 0.05;

   SveFct[] = !($TimeStep % 10);
}

Constraint {
{ Name Fronteras ; Type Assign;
Case {
{Region Inj; Value 5.0 ; }

{Region tue; Value 1.0 ;}
}
}

{ Name Inicial ; Type Init ;
Case {
{Region Supe; Value 0.0*fac[] ; }
}
}

}

//
// --- Jacobian --------------------------------------------------------
//
Jacobian {
   {Name TmpJacSur;
     Case {
       {Region All; Jacobian Sur;}
          }
    }
   {Name TmpJacLin;
     Case {
       {Region All; Jacobian Lin;}
     }
    }
           }



//
// --- Integration -----------------------------------------------------
//
Integration {
   {Name TmpInt;
     Case {
       {Type Gauss;
         Case {
           {GeoElement Point      ; NumberOfPoints 1;}
           {GeoElement Line       ; NumberOfPoints 3;}
           {GeoElement Triangle   ; NumberOfPoints 4;}
           {GeoElement Quadrangle ; NumberOfPoints 4;}
           {GeoElement Tetrahedron; NumberOfPoints 4;}
           {GeoElement Hexahedron ; NumberOfPoints 6;}
           {GeoElement Prism      ; NumberOfPoints 6;}
         }
       }
     }
   }
}





// Functionspace



FunctionSpace {
   {Name TmpSpc; Type Form0;
     BasisFunction {
       {Name sn; NameOfCoef Tmpn; Function BF_Node; Support Supe; Entity 
NodesOf[All];}
     }
     Constraint {
       {NameOfCoef Tmpn; EntityType NodesOf; NameOfConstraint Fronteras;}
       {NameOfCoef Tmpn; EntityType NodesOf; NameOfConstraint Inicial;}
     }
   }
}




// Formulation


Formulation {
   {Name Heatfrm; Type FemEquation;
    Quantity {
    {Name Tmp; Type Local; NameOfSpace TmpSpc;}
             }


  Equation {
  Galerkin {  Dt [  rho[]*Dof{Tmp}, {Tmp}];
           In todo ; Integration TmpInt; Jacobian TmpJacSur; }
  Galerkin {[  epsil[] * Dof{Grad Tmp}, {Grad Tmp} ];
           In todo ; Integration TmpInt; Jacobian TmpJacSur; }
  Galerkin {[  - nbc , {Tmp} ];
           In Pro ; Integration TmpInt; Jacobian TmpJacLin; }


          }
}
}

// resolution

Resolution {
{Name Solucion;
System {
{Name Tmp; NameOfFormulation Heatfrm;}
}
Operation{
InitSolution Tmp ; SaveSolution Tmp;
TimeLoopTheta {
Time0 TmeStt; TimeMax TmeStp; DTime TmeDel; Theta 1.0;
Operation {
Generate Tmp; Solve Tmp;
Test[SveFct[]] {SaveSolution Tmp;}
}
}
}
}
}
// Postprocessing

PostProcessing {
{Name TmpPst; NameOfFormulation Heatfrm;
Quantity {
    {Name Tmp; Value{ Local{[{Tmp}]; In Supe; }
}
}
}
}
}

// Postoperation

PostOperation {
{Name HeatOps; NameOfPostProcessing TmpPst;
Operation {
Print[Tmp, OnElementsOf Supe, File "Sol.pos"];
}
}
}


------------------------geo file




lc = 0.007 ;

Point(1) = {0,  0,  0, 9.e-1 * lc} ;
Point(2) = {0.15, 0, 0, lc} ;
Point(3) = {0.25, 0, 0, lc} ;
Point(4) = {0.4, 0,  0, lc} ;
Point(5) = {.4, .1, 0, lc} ;
Point(6) = {.3, .1, 0 , lc} ;
Point(7) = {.2, .1, 0, lc} ;
Point(8) = {0,  .1, 0, lc} ;

Point(14)={0.1,0.05,0,lc};
Point(15)={0.15,0.05,0,lc};


Line(1) = {1,2} ;
Line(2) = {2,3} ;
Line(3) = {3,4} ;
Line(4) = {4,5} ;
Line(5) = {5,6} ;
Line(6) = {6,7} ;
Line(7) = {7,8} ;
Line(8) = {8,1} ;

Line(16) = {14,15};


Line Loop(9) = {1,2,3,4,5,6,7,8} ;


Plane Surface(10) = {9} ;


//Physical Point(1) = {1,2} ;

Physical Line(13)={1,3,4,5,7,8};
Physical Line(11) = {2} ;
Physical Line(12) = {6} ;

Physical Line(17)={16};


MySurface = 100;
Physical Surface(MySurface) = {10} ;