[Getdp] Magnetodynamics a-v formulation 3D ?

Thomas Jung Thomas.Jung at iisb.fraunhofer.de
Wed Apr 5 10:54:02 CEST 2006


On Tuesday 04 April 2006 21:26, Gilles Grégoire wrote:
> Hello Thomas,
>
> first , as far as I know, the error "Warning   : Iterative solver is facing
> a break-down" is usually something related to a problem in the geometry
> definition. In fact it often means that your geometry file is readable and
> meaningfull for Gmsh, but it doesn't make sense for GetDP.
>
>
> Therefore, I did have a look at your geometry file "InductionTestBox.geo",
> and also at your Group definition in the file "InductionTestBox.pro".
> The Group definition must match the physical entities
> defined in your geometry file.
>
> I see that in the pro file, you write:
>       Air = Region[1];
> this means that Air is the Group which contains the Physical elements
> defined with the index 1 in the geometry file.
> Therefore, if you look in the geometry file, this refers to the two
> following lines:
> line 288>       Physical Surface (1) = {1,2};
> line 314>       Physical Volume (1) = {1};
> This means that the group Air will contain the elements of the Physical
> Surface 1, and those of the physical volume 1.
> I think this is not what you intend to do, and there is the same problem
> for index 2 and 3.
>
> Moreover, in the pro file, you write:
>       OuterBoundary = Region[{101,102,103,104,5,6}];
> But you have no Physical regions with index 101, 102, 103, 104.
>
> You have to know that the only thing GetDP knows about the geometry are the
> numbers of the physical entities. These numbers can be considered as names.
>
> GetDP does not know about the other indices you use in the geometry file.
>
> I hope know you can see the difference between Physical and others.
>
> The solution is to allways use different numbers for Physical entities, and
> only refers to the number you use for Physical entities in your *.pro file.
>
> IMaybe you could also begin with a much simpler and smaller geometry,
> just to see if your formulation is good.
>
> I hope you will succeed in making this code work. If you face other
> problems, don't hesitate to post!
>
> Good luck!


Sorry, I forgot: I am using another program in between, the ID's of the 
surfaces are different in the msh-file from the geo-file, and are fine.
To reduce confusion, I have created a new, simpler .geo file, and use directly 
the msh-file produced by gmsh. Its just a cube (Air), with a conducting rod 
inside. Problems remain the same ...

In resolution "current", I prescribe potential on two faces of the rod, and 
can successfully compute an E-field and a current.
For the resolution "MagStat_a_3D", I prescribe a current js[] in that rod, and 
try to compute vector potential in rod and air, but does not converge with 
any combination of solvers/preconditioners I tried out, which makes me 
believe that there is something wrong in my formulation. Especially I am not 
sure about boundary conditions/gauging for the vector potential, right now 
its just set to 0 on the outer boundary, as in the 2D Magnetostatics example 
from the getdp documentation. 

In short, I have this constraint: 

  { Name MagneticVectorPotential_3D; Type Assign;
    Case {
      { Region OuterBoundary ; Value 0.; }
    }
  }

this function space:

  { Name Hcurl_a_Mag_3D; Type Form1;
    BasisFunction {
	{ Name se; NameOfCoef ae; Function BF_Edge;
        Support Domain_Mag; Entity EdgesOf[ All ]; }
    }
    Constraint {
	{ NameOfCoef ae; EntityType EdgesOf;
        NameOfConstraint MagneticVectorPotential_3D; }
    }
  }

and this formulation:

  { Name Magnetostatics_a_3D; Type FemEquation;
    Quantity {
      { Name a ; Type Local; NameOfSpace Hcurl_a_Mag_3D; }
    }
    Equation {
      Galerkin { [ nu[] * Dof{d a} , {d a} ]; In Domain_Mag;
                 Jacobian Vol; Integration CurlCurl; }
      Galerkin { [ - js[] , {a} ]; In DomainC_Mag;
                 Jacobian Vol; Integration CurlCurl; }
 
    }
  }


if everything else would be o.k., would that be correct for the magnetostatic 
problem ?

Thanks again !


-- 
Thomas Jung
Fraunhofer-Institut IISB
D-91058 Erlangen, Schottkystr. 10
+49 9131 761264
-------------- next part --------------
lc1 = 0.3;
lc2=0.02;
Point(1) = {1, 0, 0, lc1};
Point(2) = {1, 1, 0, lc1};
Point(3) = {0, 1, 0, lc1};
Point(4) = {0, 0, 0, lc1};
Point(5) = {1, 0, 1, lc1};
Point(6) = {1, 1, 1, lc1};
Point(7) = {0, 1, 1, lc1};
Point(8) = {0, 0, 1, lc1};
Point(9) = {0.55, 0.3, 0.45, lc2};
Point(10) = {0.55, 0.7, 0.45, lc2};
Point(11) = {0.45, 0.7, 0.45, lc2};
Point(12) = {0.45, 0.3, 0.45, lc2};
Point(13) = {0.55, 0.3, 0.55, lc2};
Point(14) = {0.55, 0.7, 0.55, lc2};
Point(15) = {0.45, 0.7, 0.55, lc2};
Point(16) = {0.45, 0.3, 0.55, lc2};
Line(1) = {1,2};
Line(2) = {2,3};
Line(3) = {3,4};
Line(4) = {4,1};
Line(5) = {5,6};
Line(6) = {6,7};
Line(7) = {7,8};
Line(8) = {8,5};
Line(9) = {1,5};
Line(10) = {2,6};
Line(11) = {3,7};
Line(12) = {4,8};
Line(13) = {9,10};
Line(14) = {10,11};
Line(15) = {11,12};
Line(16) = {12,9};
Line(17) = {13,14};
Line(18) = {14,15};
Line(19) = {15,16};
Line(20) = {16,13};
Line(21) = {9,13};
Line(22) = {10,14};
Line(23) = {11,15};
Line(24) = {12,16};
Line Loop(1) = {1,10,-5,-9};
Line Loop(2) = {2,11,-6,-10};
Line Loop(3) = {-3,11,7,-12};
Line Loop(4) = {4,9,-8,-12};
Line Loop(5) = {-1,-4,-3,-2};
Line Loop(6) = {5,6,7,8};
Line Loop(7) = {13,22,-17,-21};
Line Loop(8) = {14,23,-18,-22};
Line Loop(9) = {15,24,-19,-23};
Line Loop(10) = {16,21,-20,-24};
Line Loop(11) = {-13,-16,-15,-14};
Line Loop(12) = {17,18,19,20};
Plane Surface(1) = {1};
Plane Surface(2) = {2};
Plane Surface(3) = {3};
Plane Surface(4) = {4};
Plane Surface(5) = {5};
Plane Surface(6) = {6};
Plane Surface(7) = {7};
Plane Surface(8) = {8};
Plane Surface(9) = {9};
Plane Surface(10) = {10};
Plane Surface(11) = {11};
Plane Surface(12) = {12};
Surface Loop(1) = {1,2,3,4,5,6};
Surface Loop(2) = {7,8,9,10,11,12};
Volume(101)={1,2};
Volume(102)={2};
Physical Surface (1) = {1};
Physical Surface (2) = {2};
Physical Surface (3) = {3};
Physical Surface (4) = {4};
Physical Surface (5) = {5};
Physical Surface (6) = {6};
Physical Surface (7) = {7};
Physical Surface (8) = {8};
Physical Surface (9) = {9};
Physical Surface (10) = {10};
Physical Surface (11) = {11};
Physical Surface (12) = {12};
Physical Volume (101) = {101};
Physical Volume (102) = {102};
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MagDyn_av_3D.pro
Type: text/x-objcsrc
Size: 5370 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/getdp/attachments/20060405/d2b3c3ff/attachment.pro>
-------------- next part --------------
Integration {
    { Name CurlCurl ;
    Case { {Type Gauss ;
    Case { { GeoElement Triangle    ; NumberOfPoints  4 ; }
    { GeoElement Quadrangle  ; NumberOfPoints  4 ; }
    { GeoElement Tetrahedron ; NumberOfPoints  4 ; }
    { GeoElement Hexahedron  ; NumberOfPoints  6 ; }
    { GeoElement Prism       ; NumberOfPoints  9 ; } }
    }
    }
    }
}
-------------- next part --------------
/* Jacobian_Lib.pro */

Jacobian {
  { Name Vol ;
    Case { { Region All; Jacobian Vol; }
    }
  }
  { Name Sur ;
    Case { { Region All ; Jacobian Sur ; }
    }
  }
}

-------------- next part --------------
A non-text attachment was scrubbed...
Name: InductionTestBox2.pro
Type: text/x-objcsrc
Size: 1938 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/getdp/attachments/20060405/d2b3c3ff/attachment-0001.pro>