/* Team7 benchmark */ Include "Team7.inc"; Group { Air = # AIR; Core = # CORE; // Coil = Region [{COIL}]; Coil = #{COIL_SW,COIL_S,COIL_SE,COIL_E,COIL_NE,COIL_N,COIL_NW,COIL_W}; Plate = # PLATE; Crack = # CRACK; SkinCoil = # SKINCOIL; SurfaceGh0 = # SURFACEGH0; DomainCC_Mag = Region[ {Air, Coil, Core, Crack} ]; DomainC_Mag = Region[ {Plate} ]; DomainB_Mag = Region[ {Coil} ]; SkinDomainC_Mag = Region[ {SKINPLATE} ] ; // For h-phi formulation CutCoil = # CUTCORE ; Nbr_DomainB = 1 ; // Number of stranded inductors // ... data for inductor 1 DomainBref_Mag = Region[ {1} ];//reference numbers gathered in one Group DomainBref_Mag~{1} = Region[ {1} ];//reference number DomainB_Mag~{1} = Region[ {Coil} ] ; SurfaceCutB_Mag~{1} = Region[ {CutCoil} ] ; // Cut of the Coil SkinDomainB_Mag~{1} = Region[ {SkinCoil} ] ; SkinDomainB2_Mag~{1} = Region[ {SKINCOIL2} ] ; // Simulation of OnOneSideOf ... DomainCC2_Mag~{1} = Region[ {CORE} ] ; // Simulation of OnOneSideOf ... // (SKINCOIL2 and CORE must be defined on the same side of the cut) // ... data for inductor 2... DomainB_Mag {2} = ... // And at last, the studied domain is: Domain_Mag = Region[ {DomainCC_Mag, DomainC_Mag} ] ; } // -------------------------------------------------------------------------- Function { mu0 = 4.e-7 * Pi ; murCore = 1000. /* 1000.*/ ; sigmaPlate = 3.526e7 /*Al*/ /* 1.e7 steel */ ; sigmaCoil = 5.9e7 /*Cu*/ ; // For h-phi formulation mu [ #{Air, Coil} ] = mu0 ; mu [ #{Plate, Crack} ] = mu0 ; mu [ Core ] = murCore * mu0 ; ro [ Plate ] = 1/sigmaPlate ; ro [ Crack ] = 1/sigmaPlate ; ro [ Coil ] = 1/sigmaCoil ; Ns[ #{Coil, CutCoil} ] = 2742 ; // Number of turns of the inductor Ind Sc[ Coil ] = tInd*hInd ; // Section of the inductor Ind Freq = 50 ; /* Freq = 200 ; */ Val_Current = 1. ; // Unit source current density (for computation of source field hs) /* js0[ Coil ] = Ns[]/Sc[] * Vector[-Sin[Atan2[Y[]-yInd, X[]-xInd]], Cos[Atan2[Y[]-yInd, X[]-xInd]], 0] ; */ js0[ #{COIL_SW} ] = Ns[]/Sc[] * Vector[-Sin[Atan2[Y[]-yInd+wInd/2.-rInd, X[]-xInd+wInd/2.-rInd]], Cos[Atan2[Y[]-yInd+wInd/2.-rInd, X[]-xInd+wInd/2.-rInd]], 0] ; js0[ #{COIL_SE} ] = Ns[]/Sc[] * Vector[-Sin[Atan2[Y[]-yInd+wInd/2.-rInd, X[]-xInd-wInd/2.+rInd]], Cos[Atan2[Y[]-yInd+wInd/2.-rInd, X[]-xInd-wInd/2.+rInd]], 0] ; js0[ #{COIL_NE} ] = Ns[]/Sc[] * Vector[-Sin[Atan2[Y[]-yInd-wInd/2.+rInd, X[]-xInd-wInd/2.+rInd]], Cos[Atan2[Y[]-yInd-wInd/2.+rInd, X[]-xInd-wInd/2.+rInd]], 0] ; js0[ #{COIL_NW} ] = Ns[]/Sc[] * Vector[-Sin[Atan2[Y[]-yInd-wInd/2.+rInd, X[]-xInd+wInd/2.-rInd]], Cos[Atan2[Y[]-yInd-wInd/2.+rInd, X[]-xInd+wInd/2.-rInd]], 0] ; js0[ #{COIL_S} ] = Ns[]/Sc[] * Vector[1,0,0] ; js0[ #{COIL_E} ] = Ns[]/Sc[] * Vector[0,1,0] ; js0[ #{COIL_N} ] = Ns[]/Sc[] * Vector[-1,0,0] ; js0[ #{COIL_W} ] = Ns[]/Sc[] * Vector[0,-1,0] ; } // -------------------------------------------------------------------------- Constraint { // For h-phi formulation { Name MagneticScalarPotential ; Case { { Region SurfaceGh0 ; Value 0. ; } } } { Name MagneticField ; Case { { Region SurfaceGh0 ; Value 0. ; } } } // For a massive inductor: associated with a region in SurfaceCut_Mag // For a stranded inductor: associated with a region in DomainB_Mag // Either the voltage or the current can be fixed: { Name Current ; Case { { Region Coil ; Value Val_Current ; } } } { Name Voltage ; Case { } } // Only for a stranded inductor: associated with a region in SurfaceCutB_Mag{.} // (used for computation of source field hs) // Warning: sign to be coherent with js0[]! { Name Current_Unit ; Case { { Region CutCoil ; Value -Ns[] ; } } } } Include "Jacobian_Lib.pro" Include "Integration_Lib.pro" // Include "MagSta_hs_js0.pro" // to check source field and source current density Include "MagDyn_hphi_Bob.pro" PostOperation Section_j UsingPost MagDyn_hphi { Print [ j, OnGrid {$A, $B, $C} { {-wPlate/2. : wPlate/2. : wPlate/50.}, {-wPlate/2. : wPlate/2. : wPlate/50.}, {tPlate/2. : tPlate : tPlate/2.} }, File "j_sec.pos" ]; } PostOperation U_hphi UsingPost MagDyn_hphi { Print[ U, OnRegion #{Coil}] ; Print[ I, OnRegion #{Coil}] ; } PostOperation Map_hs UsingPost MagSta_hs~{1} { Print[ hs, OnElementsOf #{Domain_Mag/*,-DomainB_Mag*/}, /*Depth 0,*/ File "hs.pos"] ; Print[ js, OnElementsOf DomainB_Mag, Depth 0, File "js.pos"] ; Print[ js0, OnElementsOf DomainB_Mag, Depth 0, File "js0.pos"] ; }