[Getdp] material property defined in each element

Ruth V. Sabariego r.sabariego at ulg.ac.be
Tue Apr 5 16:12:33 CEST 2011


You could fill a function space with the values of sigma by means of a 
constraint.
You start reading the values from a text file "mysigma.txt" with the 
following structure:
TotalNumberOfNodes
numberOfNode SigmaValue
.                         .
.                         .
numberOfNode SigmaValue


// get (nodal values of) sigma from .txt file:
listsigma = ListFromFile["mysigma.txt"];
mysigma[] = ValueFromIndex[]{listsigma{}};

============================================
Constraint {
   // completely fix sigma function space
   { Name MySigma ; Type Assign ;
     Case {
       { Region MyDomain  ; Value mysigma[] ; }
     }
   }

============================================
FunctionSpace {
   { Name BF_sigma ; Type Form0 ;
     BasisFunction {
       // interpolate each component of sigma using standard nodal
       // shape functions; you could also define other fuction space
       { Name sn ; NameOfCoef s ; Function BF_Node ;
         Support Region[{MyDomain}] ; Entity NodesOf[ All] ; }
     }
     SubSpace {
       // make subspaces available in formulation
       { Name sub ; NameOfBasisFunction sn; }
     }
     Constraint {
       { NameOfCoef s ;
         EntityType NodesOf ; NameOfConstraint MySigma; }
     }
   }
}
============================================
And then you can use it in a formulation as:

Formulation {
   { Name Electrostatics_vf ; Type FemEquation ;
     Quantity {
       { Name v ; Type Local  ; NameOfSpace Hgrad_vf_Ele ; }
       // get each sigma tensor component
       { Name sig ; Type Local  ; NameOfSpace BF_sigma[sub] ; }

     }
     Equation {

       Galerkin { [ {sig} * Dof{Grad v} , {Grad v} ] ;
                  In MyDomain ; Jacobian Vol ; Integration GradGrad ; }

       // hack: null terms necessary to force initialization of fully
       // fixed function space
       Galerkin { [ Dof{sig} * 0 , {v} ] ;
                  In MyDomain ; Jacobian Vol ; Integration GradGrad ; }
     }
   }
}

Regards,
Ruth



On 05/04/11 14:44, Jens Trommler wrote:
> Hi,
>
> I have the conductivity of each element given from another simulation
> and now want to use this conductivity in GetDP for some
> quasistationary simulations.
> Is there an easy way to set the conductivity element-wise?
> I guess that I need to write an .res file but don't really know how
> exactly it should look like and how I can use it in a GetDP script.
> Looked already in the examples but couldn't find any similar problem.
>
> Thank you for any help.
> Regards,
> Jens.
>
> _______________________________________________
> getdp mailing list
> getdp at geuz.org
> http://www.geuz.org/mailman/listinfo/getdp
>

-- 
Dr. Ir. Ruth V. Sabariego
University of Liege, Dept. of Electrical Engineering&  Computer Science,
Applied&  Computational Electromagnetics (ACE),
phone: +32-4-3663737 - fax: +32-4-3662910 - http://ace.montefiore.ulg.ac.be/