Group { Air = Region[1003]; Core = Region[1000]; Ind1 = Region[1001]; Ind2 = Region[1007]; OuterSurface = Region[1004]; SkinCore = Region[1005]; Ind = Region[{Ind1, Ind2}]; DomainS_Mag = Region[{Ind1, Ind2}]; Domain_Mag = Region[{Core, Air, Ind1, Ind2}]; } Function { mu0 = 4.e-7 * Pi; murCore = 2000.; nu [ Region[{Air, Ind1, Ind2}] ] = 1. / mu0; nu [ Region[{Core}]] = 1. / (murCore*mu0); Sc = 0.010*0.010; //cross section of coil Ns = 1000; //Number of turns of the inductor Ind Val_Current = 1.; //current in the inductor //calculation of current vectors xc = 0.*0.001; zc = 100.*0.001; js[ Ind1 ] = Ns/Sc * Val_Current * Vector[-Sin[Atan2[Z[]-zc,X[]-xc]], 0, Cos[Atan2[Z[]-zc,X[]-xc]]] ; //calculation of current vectors xc = 0.*0.001; yc = 0.*0.001; js[ Ind2 ] = Ns/Sc * Val_Current * Vector[-Sin[Atan2[Y[]-yc,X[]-xc]], Cos[Atan2[Y[]-yc,X[]-xc]], 0] ; //only for displaying the vectors: js[ Core] = Vector[0,0,0]; } Constraint { { Name MagneticVectorPotential_3D; Type Assign; Case { { Region OuterSurface ; Value 0.; } } } { Name Gauge; Type Assign; Case { { Region Domain_Mag; SubRegion #{OuterSurface,SkinCore}; Value 0.0; } } } } Jacobian { { Name Vol ; Case { { Region All ; Jacobian Vol ; } } } } Integration { { Name CurlCurl ; Case { {Type Gauss ; Case { { GeoElement Triangle ; NumberOfPoints 4 ; } { GeoElement Tetrahedron ; NumberOfPoints 4 ; } } } } } } Include "Magsta_a_3D.pro" PostOperation { { Name Map_a; NameOfPostProcessing MagSta_a_3D; Operation { Print[ a, OnElementsOf Domain_Mag, File "CoreSta_a.pos" ]; Print[ b, OnElementsOf Domain_Mag, File "CoreSta_b.pos" ]; Print[ j, OnElementsOf #{Ind, Core}, //OnElementsOf DomainS_Mag, File "CoreSta_j.pos" ]; } } }