[Getdp] GetDP-Postprocessing Question

Christophe Geuzaine geuzaine at acm.caltech.edu
Fri Jun 21 18:57:04 CEST 2002


Paul Fulmek wrote:
> 
> 1) How can I calculate the mean value of flux- and field-vector in some
> domain? I managed to calculate the area of my domain and the
> area-integral of field and flux; I don't know how to teach GetDP to
> print the simple quotient (integral field)/area.

It's a hack, but you can use "Print[a/b,...]" if a is a local and b an
integral post-processing quantity.

> 
> 2) I have defined a closed path around the magnet in the mesh, and want
> to calculate the force by doing a line-integral of Maxwells Stress
> Tensor on this path. I have no idea how to teach GetDP to do this
> calculation, how to find the normal-vector, and how to integrate!

Yes, it's "by design" :-) 

If you specify a region in a post-processing operation with
OnElementsOf,
getdp will interpolate the field on it, using the basis functions
defined on this region. For the magnetic field, you would thus just get
the tangential component, and this is not what you want. BTW, you cannot
use "OnGlobal" or an expression like "f[Region]" with a non integral
quantity. Moreover, "Print[b, OnElementsOf MPX]" will not work, since b
is not defined on MPX (you have to change the PostProcessing definition
of "b").

I know some people on this list already computed the force by doing a
line integral of Maxwell's Stress Tensor directly inside getdp, though. 

Patrick, a comment?

Christophe


PostProcessing {
>    { Name MyPostProc ; NameOfFormulation MyFormulation ;
>      Quantity {
>        { Name b   ;
>          Value {Local{[- mu[]*{d phi}]; In ALL; Jacobian MyJacobian;}
>                 Local{[- mu[]*hc[] ]  ; In MSU; Jacobian MyJacobian;}}}
>        { Name h   ;
>          Value{Local{[-{d phi}]       ; In ALL; Jacobian MyJacobian; }}}
> /** |B|-mean **/
>        { Name bm  ;
>          Value { Integral { [Norm[ - mu[] * {d phi} ]] ; In ALL;
>                    Integration MyIntegration; Jacobian MyJacobian; }
>                  Integral { [Norm[ - mu[] * hc[] ]]    ; In MSU;
>                    Integration MyIntegration; Jacobian MyJacobian; }}}
> /** |H|-mean **/
>        { Name hm  ;
>          Value { Integral { [Norm[ - {d phi} ]]        ; In ALL;
>                    Integration MyIntegration; Jacobian MyJacobian; }}}
>      }
>    }
> }
> 
> PostOperation {
> 
>    { Name phi ; NameOfPostProcessing MyPostProc;
>      Operation {
> // that does not work ??:
> //      Print[ b,   OnElementsOf MPX, File "b_mxp.pos", Depth 0 ] ;
> //      Print[ h,   OnElementsOf MPX, File "h_mxp.pos", Depth 0 ] ;
> // that does not work ??:
> //      Print[ b[MPX],   OnGlobal, File "b_mxp.pos", Depth 0 ] ;
> //      Print[ h[MPX],   OnGlobal, File "h_mxp.pos", Depth 0 ] ;
> // this works, not very elegant:
>        Print[ b, OnLine {{ 0.0115,-0.0040,0}{ 0.0115, 0.0040,0}}{50},
> 
>          File  "b_mxp.dat", Format Table ] ;

-- 
Christophe Geuzaine

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