[Getdp] Periodic Boundary Conditions

Francisco Jorge Santana Martín fsantana at die.ulpgc.es
Mon Jun 20 12:37:47 CEST 2005



-- 
Fecha:
Thu, 16 Jun 2005 12:01:18 +0100


De:
Francisco Jorge Santana Martín <fsantana at die.ulpgc.es>


Para:
getdp-announce at geuz.org


Asunto:
Answer_to_Constraint_.....

 --
 Francisco Jorge Santana Martín wrote:
  My name :Francisco Jorge Snatana Martin.
  email: fsantana at die.ulpgc.es
  Islas Canarias.


  Dear Christophe Geuzaine:



  Thanks very much for your quickly answer we want to say with "constraint of
binary type" this other "Periodic Boundary Conditions".
  These are our files of test.

  //file perio_Laplace.geo  *********************************
  Lc = 0.6 ;

  Point(1) = {0.,0.,0.,Lc};
  L = 0.045;
  R = 0.01085;
  Point(2) = {2*Pi,0.,0.,Lc};
  Point(3) = {2*Pi,2*Pi,0.,Lc};
  Point(4) = {0.,2*Pi,0.,Lc};
  Line(1) = {1,2};
  Line(2) = {2,3};
  Line(3) = {3,4};
  Line(4) = {4,1};
  Line Loop(1) = {1,2,3,4};

  Plane Surface(1) = {1};
  /*These two lines have periodic boundary conditons*/
  Physical Line(18) = {2};//Line_Right
  Physical Line(17) = {4};//Line_Left

  Physical Surface(1) = {1};//Domain_square

  //End .geo ***********************************************

  // file Laplace_periodic.pro *********************************

  Group {

  Line_Left=Region[17];//, Left and Right have periodic boundary condition
  Line_Right=Region[18];//,
  Domain_square=Region[1];



    /* */



  }

  Function {

    /* second member  of Laplace equation "periodic"*/

    f[Domain_square]=Sin[$X+Pi/4]*Cos[$Y+Pi/4];

  }



  Constraint {





  { Name periodic;Type Link ;//???????? here is our problem.

      Case {
       { Region Line_Left ;}//???????????  here is our problem.
       { Region Line_Right; }//????????????  here is our problem.

      }
    }


  }//cons




  Include "periodic.pro"





  PostOperation {
    { Name Map; NameOfPostProcessing Post_v;
       Operation {
         Print [ v, OnElementsOf Domain_square, File "Laplace_v.pos" ];
       }
    }


  }

  //End file Laplace_periodic.pro  *********************************




  //file periodic.pro



  Group {
    DefineGroup[Domain_square,Line_Left,Line_Right];
  }

  Function {
    DefineFunction[ f];

  }


  Include "Jacobian_Lib.pro"
  Include "Integration_Lib.pro"
  FunctionSpace {
    { Name potencial; Type Form0;
      BasisFunction {

        { Name vn; NameOfCoef vn; Function BF_Node;
          Support Region [{Domain_square}]; Entity NodesOf[All ]; }


      }



      Constraint {



  { NameOfCoef vn; EntityType NodesOf;
          NameOfConstraint periodic; }

      }//Cons
    }//name1


  }//funtion space


  Formulation {
    { Name Laplace_periodic; Type FemEquation;
      Quantity {
        { Name v; Type Local; NameOfSpace potencial; }




      }
      Equation {
        Galerkin { [ Dof{d v} , {d v} ]; In Region [{Domain_square}];
                   Jacobian Vol; Integration GradGrad; }

  Galerkin { [ -f[] , { v} ]; In Region [{Domain_square}];
                   Jacobian Vol; Integration GradGrad; }


      }
    }
  }


  Resolution {
    { Name Laplace_Resol;
      System {
        { Name Sys_Ele; NameOfFormulation Laplace_periodic; }
      }
      Operation {
        Generate[Sys_Ele]; Solve[Sys_Ele]; SaveSolution[Sys_Ele];
      }
    }//name1




  }//resolucion



  PostProcessing {
    { Name Post_v; NameOfFormulation Laplace_periodic;
      Quantity {
        { Name v;
          Value {
            Local { [ {v} ]; In Domain_square; Jacobian Vol; }
          }
        }
        { Name e;
          Value {
            Local { [ -{d v} ]; In Domain_square; Jacobian Vol; }
          }
        }

      }
    }
  }

  //End file periodic.pro

Thanks.