[Getdp] [GetDP] Calculation of an Integral quantity

Christophe Geuzaine cgeuzaine at ulg.ac.be
Tue Apr 24 15:17:05 CEST 2007


Olivier Castany wrote:
> Hello,
> 
> I would like to compute a magnetic field in two ways :
> - by FEM Galerkin 
> - by integration (Biot and Savart law)
> 
> I am trying these calculations on a simple geometry (a troidal coil) and 
> want to compare the results (hoping they will be the same).
> 
> I can solve the Galerkin equations with a vector potential formulation 
> (gauged by a spanning tree) and the result is perfect. However I have 
> problems with GetDP's integral quantities...
> 
> The .geo and .pro files are attached and here are my questions :
> 
>                    -----------
> On the gmsh mailing list Christophe Geuzaine wrote (Sun, Apr 22, 2007) :
> 
>> In an "Integral" quantity the coordinates of the "source" integration 
>> point are denoted by XS[], YS[] and ZS[]. X[], Y[] and Z[] will give you 
>> the coordinates of the "observation" point.
> 
> OK, I managed to do something with $XS (I thought the source point 
> would be implicitly taken, but this is not the case), but : 
> 
> GetDP   : Error ('torus.pro' line 130): Unknown Function: XS
> 
> are you really sure you have implemented XS[] ? or how can it be used ? 

Yes. Both XS[] and $XS can normally be used, but I recommend using XS[], 
as $XS has not been tested and is not guaranteed to be valid in all 
expressions.

The "sign reversal" in D_inf comes from the fact that the elements in 
your mesh are reversed in that region... Be careful to create your mesh 
with normals pointing in the correct direction.





> (I have seen no example of $XS or XS[] on the web, the wiki or the GetDP 
> mailing list) 
>                    -----------
> 
> There are several results which are weird or simply wrong :
> 
> - as a test, I tried to calculate \int_{Coil} J_s : the result should be
>   \vec 0 but something very different and weird is obtained (see a2.pos)
>  
>  (I think this point should really be clarified, because if it doesn't
>   work, there is few chance that the rest will)
> 
> - the direction of B2Z is reversed (although I think I carefully checked 
>   the signs of GradLaplace and the cross products)
> 
> - B2Z should be equal to B1
> 
> - does the integral quantity result depend on the FunctionSpace basis 
>   type used (BF_Edge or BF_Facet) ? it seems it does not.
> 
>                    -----------
> 
> It would be quite encouraging if someone could tell the correction which 
> would make the file torus.pro work properly.
> 
> Have a nice day,
> 
> O.C.
> 


-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine