/* MagDyn_hphi Magnetodynamics - Magnetic field and magnetic scalar potential h-phi formulation with source magnetic field hs uses MagSta_hs_js0 Magnetostatics - hs formulation (for computation of source magnetic fields associated with inductors) References : P. Dular, C. Geuzaine, W. Legros "A natural method for coupling magnetostatic h-formulations and circuit equations", IEEE Transactions on Magnetics, Vol. 35, No. 3, May 1999, pp. 1626-1629 P. Dular et al. "Dual magnetodynamic formulations and their source fields associated with massive and stranded inductors", IEEE Transactions on Magnetics, Vol. 36, No. 4, July 2000, pp. 1293-1299 */ /* I N P U T --------- GlobalGroup : (Extension '_Mag' is for Magnetic problem) ----------- Domain_Mag Whole magnetic domain DomainCC_Mag Nonconducting regions DomainC_Mag Conducting regions (including massive inductors) SkinDomainC_Mag Skin of conducting regions (surfaces) SurfaceCut_Mag All cuts for multiply connected regions (for magnetic scalar potential phi) DomainB_Mag All stranded inductor regions + see in file `MagSta_hs_js0.pro' DomainV_Mag All regions in movement (for speed term) DomainCC2_Mag Nonconducting regions (simulation OnOneSide ...) SkinDomainC2_Mag Skin of conducting regions (surfaces) (OnOneSide ...) Function : -------- mu[] Magnetic permeability ro[] Electric resistivity Constraint : ---------- MagneticScalarPotential Fixed magnetic scalar potential (classical boundary condition) MagneticField Fixed magnetic field SourceCurrentDensityZ Fixed source current density (in Z direction) Voltage Fixed voltage Current Fixed Current Parameters : ---------- Freq Frequency (Hz) CoefGeo Parameters for time loop with theta scheme : Mag_Time0, Mag_TimeMax, Mag_DTime Initial time, Maximum time, Time step (s) Mag_Theta Theta (e.g. 1. : Implicit Euler, 0.5 : Cranck Nicholson) */ /* --------------------------------------------------------------------------*/ Group { DefineGroup[ Domain_Mag, DomainCC_Mag, DomainC_Mag, SkinDomainC_Mag, SurfaceCut_Mag, DomainCC2_Mag, SkinDomainC2_Mag, DomainS_Mag, SkinDomainS_Mag, DomainB_Mag, SkinDomainB_Mag, SurfaceCutB_Mag, DomainV_Mag ] ; } Function { DefineFunction[ mu, ro ] ; DefineFunction[ Velocity ] ; DefineFunction[ Ns, Sc ] ; DefineVariable[ Freq ] ; DefineVariable[ Mag_Time0, Mag_TimeMax, Mag_DTime, Mag_Theta ] ; DefineVariable[ CoefGeo = 1. ] ; } /* --------------------------------------------------------------------------*/ /* MagSta_hs_js0: Magnetostatics - hs formulation */ Include "MagSta_hs_js0.pro" /* --------------------------------------------------------------------------*/ Group { _TransitionLayer_SkinDomainC_ = ElementsOf[SkinDomainC2_Mag, OnOneSideOf SurfaceCut_Mag] ; } FunctionSpace { { Name Hcurl_hphi_Mag ; Type Form1 ; BasisFunction { /* h = h s + v s + I s e e n n c c */ { Name se ; NameOfCoef he ; Function BF_Edge ; Support DomainC_Mag ; Entity EdgesOf[ All, Not SkinDomainC_Mag ] ; } { Name sn ; NameOfCoef vn ; Function BF_GradNode ; Support DomainCC_Mag ; Entity NodesOf[ All ] ; } { Name sn ; NameOfCoef vnc ; Function BF_GroupOfEdges ; Support DomainC_Mag ; Entity GroupsOfEdgesOnNodesOf[ SkinDomainC_Mag ] ; } { Name sc ; NameOfCoef Ic ; Function BF_GradGroupOfNodes ; Support ElementsOf[DomainCC2_Mag, OnOneSideOf SurfaceCut_Mag] ; Entity GroupsOfNodesOf[ SurfaceCut_Mag ] ; } { Name sc ; NameOfCoef Icc ; Function BF_GroupOfEdges ; Support DomainC_Mag ; Entity GroupsOfEdgesOf[ SurfaceCut_Mag, InSupport _TransitionLayer_SkinDomainC_ ] ; } { Name sb ; NameOfCoef ib ; // Global Basis Function Function BF_Global { Quantity hs ; Formulation Magnetostatics_hs {#Nbr_DomainB} ; Group DomainBref_Mag ; Resolution MagSta_hs {} ; } ; Support Domain_Mag ; Entity Global [DomainBref_Mag] ; } } SubSpace { { Name hcut ; NameOfBasisFunction sc ; } { Name hb ; NameOfBasisFunction sb ; } } GlobalQuantity { { Name I ; Type AliasOf ; NameOfCoef Ic ; } { Name U ; Type AssociatedWith ; NameOfCoef Ic ; } { Name Ib ; Type AliasOf ; NameOfCoef ib ; } { Name Ub ; Type AssociatedWith ; NameOfCoef ib ; } } Constraint { { NameOfCoef vn ; EntityType NodesOf ; NameOfConstraint MagneticScalarPotential ; } { NameOfCoef vnc ; EntityType NodesOf ; NameOfConstraint MagneticScalarPotential ; } { NameOfCoef he ; EntityType EdgesOf ; NameOfConstraint MagneticField ; } { NameOfCoef Ic ; EntityType GroupsOfNodesOf ; NameOfConstraint Current ; } { NameOfCoef Icc ; EntityType GroupsOfNodesOf ; NameOfConstraint Current ; } { NameOfCoef U ; EntityType GroupsOfNodesOf ; NameOfConstraint Voltage ; } { NameOfCoef Ib ; EntityType Region ; NameOfConstraint Current ; } { NameOfCoef Ub ; EntityType Region ; NameOfConstraint Voltage ; } } } } Formulation { { Name Magnetodynamics_hphi ; Type FemEquation ; Quantity { { Name h ; Type Local ; NameOfSpace Hcurl_hphi_Mag ; } { Name hb ; Type Local ; NameOfSpace Hcurl_hphi_Mag [hb] ; } { Name U ; Type Global ; NameOfSpace Hcurl_hphi_Mag [U] ; } { Name I ; Type Global ; NameOfSpace Hcurl_hphi_Mag [I] ; } { Name Ub; Type Global ; NameOfSpace Hcurl_hphi_Mag [Ub] ; } { Name Ib; Type Global ; NameOfSpace Hcurl_hphi_Mag [Ib] ; } } Equation { Galerkin { Dt [ mu[] * Dof{h} , {h} ] ; In Domain_Mag ; Jacobian Vol ; Integration CurlCurl ; } Galerkin { [ ro[] * Dof{d h} , {d h} ] ; In #{DomainC_Mag, DomainB_Mag} ; Jacobian Vol ; Integration CurlCurl ; } GlobalTerm { [ Dof{U} / CoefGeo , {I} ] ; In SurfaceCut_Mag ; } GlobalTerm { [ Dof{Ub} / CoefGeo , {Ib} ] ; In DomainB_Mag ; } /* Attention: CoefGeo = 2*Pi for Axi */ } } } Resolution { { Name MagDyn_hphi ; System { { Name Sys_Mag ; NameOfFormulation Magnetodynamics_hphi ; Type ComplexValue ; Frequency Freq ; } } Operation { Generate Sys_Mag ; Solve Sys_Mag ; SaveSolution Sys_Mag ; } } // Time domain resolution to be added... } PostProcessing { { Name MagDyn_hphi ; NameOfFormulation Magnetodynamics_hphi ; PostQuantity { { Name b ; Value { Term { [ mu[] * {h} ] ; In Domain_Mag ; } } } { Name h ; Value { Term { [ {h} ] ; In Domain_Mag ; } } } { Name j ; Value { Term { [ {d h} ] ; In DomainC_Mag ; } } } { Name jz ; Value { Term { [ CompZ[{d h}] ] ; In DomainC_Mag ; } } } { Name phi ; Value { Term { [ -{dInv h} ] ; In DomainCC_Mag ; } } } { Name U ; Value { Term { [ {U } ] ; In SurfaceCut_Mag ; } Term { [ {Ub} ] ; In DomainB_Mag ; } } } { Name I ; Value { Term { [ {I } ] ; In SurfaceCut_Mag ; } Term { [ {Ib} ] ; In DomainB_Mag ; } } } { Name mj ; Value { Term { [ Norm[{d h}] ] ; In DomainC_Mag ; } } } } } } /* --------------------------------------------------------------------------*/