[Getdp] Simple (?) magnetostatics

Jasper funkybob at gmail.com
Wed Feb 8 13:46:49 CET 2006


Hello,

I'm new to GetDP and I intend to use it for 3D magnostatic modelling. As a
start I took the demo/example from the wiki for 2D magnetostatics and put a
small square magnet in a square of air. This all worked OK as far as I can
tell.
My next attempt was to take this very simple example and extend it to three
dimensions, thus a small magnetic cube in a cube of air. Using examples from
the presentation/wiki/mailing list I tried to adapt the problem definition
file to three dimensions.
But with the 3D example GetDP does not converge to a solution. From what I
gather from the examples it might have something to do with a Gauge
condition, which I need in 3D but I wasn't able to find any links explaining
this...
I've attached the files for the 2D and 3D example. Any help would be very
much appreciated! Thanks in advance,

Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geuz.org/pipermail/getdp/attachments/20060208/9f65c384/attachment.htm 
-------------- next part --------------
/* --------------------------------------------------------------------------
    This is a sample gmsh geometry file
   --------------------------------------------------------------------------*/

/* defining some parameters */

w = 1e-3;			// Width of square ( x )
h = w;				// Height of square ( y )
p = w / 5;			// Mesh size
r = 5e-3;			// Air ``radius''

/* defining the points */

Point(1) = {  w/2,  h/2,  0, p };
Point(2) = {  w/2, -h/2,  0, p };
Point(3) = { -w/2, -h/2,  0, p };
Point(4) = { -w/2,  h/2,  0, p };

Point(5) = {  r/2,  r/2,  0, p };
Point(6) = {  r/2, -r/2,  0, p };
Point(7) = { -r/2, -r/2,  0, p };
Point(8) = { -r/2,  r/2,  0, p };


/* defining the lines */

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 };

/* defining the surfaces */

Line Loop(10) = { 1, 2, 3 ,4 };
Plane Surface(1) = { 10 };
Line Loop(11) = { 5, 6, 7, 8 };
Plane Surface(2) = { 11, 10 };

/* defining the physical entities (for which elements will be saved) */
Physical Surface(100) = { 1 };					// Magnet
Physical Surface(101) = { 2 }; 					// Air
Physical Line(1000) = { 5, 6, 7, 8 } ;			// System boundaries


-------------- next part --------------
A non-text attachment was scrubbed...
Name: square.pro
Type: application/octet-stream
Size: 1881 bytes
Desc: not available
Url : http://www.geuz.org/pipermail/getdp/attachments/20060208/9f65c384/attachment.pro 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: square_ms.pro
Type: application/octet-stream
Size: 2516 bytes
Desc: not available
Url : http://www.geuz.org/pipermail/getdp/attachments/20060208/9f65c384/attachment-0001.pro 
-------------- next part --------------
/* --------------------------------------------------------------------------
    This is a sample gmsh geometry file
   --------------------------------------------------------------------------*/

/* defining some parameters */

w = 1e-3;			// Width ( x-direction )
h = w;				// Height ( y-direction )
d = w;				// Depth ( z-direction )
p = w / 10;			// Characteristic length for meshing
r = 5e-3;			// ``Radius'' of air

/* defining the points */

Point(1) = {  w/2,  h/2,  d/2, p };
Point(2) = {  w/2, -h/2,  d/2, p };
Point(3) = {  w/2, -h/2, -d/2, p };
Point(4) = {  w/2,  h/2, -d/2, p };
Point(5) = { -w/2,  h/2,  d/2, p };
Point(6) = { -w/2, -h/2,  d/2, p };
Point(7) = { -w/2, -h/2, -d/2, p };
Point(8) = { -w/2,  h/2, -d/2, p };


/* defining the lines */

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 };


/* defining the surfaces */

Line Loop(13) = { 1, 2, 3 ,4 };
Plane Surface(1) = { 13 };

Line Loop(14) = { 5, 6, 7, 8 };
Plane Surface(2) = { 14 };

Line Loop(15) = { 1, 10, -5, -9 };
Plane Surface(3) = { 15 };

Line Loop(16) = { -3, 11, 7, -12 };
Plane Surface(4) = { 16 };

Line Loop(17) = { 4, 9, -8, -12 };
Plane Surface(5) = { 17 };

Line Loop(18) = { -2, 10, 6, -11 };
Plane Surface(6) = {18};


/* defining the volumes */

Surface Loop(7) = { 1, 2, 3, 4, 5, 6 };
Volume(1) = { 7 };


/* define the air cube */

/* defining the points */

Point(101) = {  r/2,  r/2,  r/2, 4*p };
Point(102) = {  r/2, -r/2,  r/2, 4*p };
Point(103) = {  r/2, -r/2, -r/2, 4*p };
Point(104) = {  r/2,  r/2, -r/2, 4*p };
Point(105) = { -r/2,  r/2,  r/2, 4*p };
Point(106) = { -r/2, -r/2,  r/2, 4*p };
Point(107) = { -r/2, -r/2, -r/2, 4*p };
Point(108) = { -r/2,  r/2, -r/2, 4*p };


/* defining the lines */

Line(101) = { 101, 102 };
Line(102) = { 102, 103 };
Line(103) = { 103, 104 };
Line(104) = { 104, 101 };
Line(105) = { 105, 106 };
Line(106) = { 106, 107 };
Line(107) = { 107, 108 };
Line(108) = { 108, 105 };
Line(109) = { 101, 105 };
Line(110) = { 102, 106 };
Line(111) = { 103, 107 };
Line(112) = { 104, 108 };


/* defining the surfaces */

Line Loop(113) 	 	= { 101, 102, 103 ,104 };
Plane Surface(101)  = { 113 };
Line Loop(114) 	 	= { 105, 106, 107, 108 };
Plane Surface(102) 	= { 114 };
Line Loop(115) 	 	= { 101, 110, -105, -109 };
Plane Surface(103) 	= { 115 };
Line Loop(116) 	 	= { -103, 111, 107, -112 };
Plane Surface(104) 	= { 116 };
Line Loop(117) 	 	= { 104, 109, -108, -112 };
Plane Surface(105) 	= { 117 };
Line Loop(118) 	 	= { -102, 110, 106, -111 };
Plane Surface(106) 	= { 118 };


/* defining the volumes */

Surface Loop(107) = { 101, 102, 103, 104, 105, 106 };
Volume(2) = { 107, 7 };


/* defining the physical entities (for which elements will be saved) */

Physical Volume(101) = { 1 }; 			// Cube
Physical Volume(102) = { 2 }; 			// Air

Physical Surface(1000) = { 101, 102, 103, 104, 105, 106 };		// Boundary
Physical Surface(1001) = { 1, 2, 3, 4, 5, 6 };					// Gauge
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cube.pro
Type: application/octet-stream
Size: 1568 bytes
Desc: not available
Url : http://www.geuz.org/pipermail/getdp/attachments/20060208/9f65c384/attachment-0002.pro 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cube_ms.pro
Type: application/octet-stream
Size: 2645 bytes
Desc: not available
Url : http://www.geuz.org/pipermail/getdp/attachments/20060208/9f65c384/attachment-0003.pro 


More information about the getdp mailing list