Formulation { { Name cFormulation; Type FemEquation; Quantity { { Name ln ; Type Local ; NameOfSpace airLinSpace; } { Name a ; Type Local ; NameOfSpace Hcurl_a_Mag_2D; } { Name ur; Type Local ; NameOfSpace Hregion_u_Mag_2D; } { Name I ; Type Global; NameOfSpace Hregion_u_Mag_2D [I]; } { Name U ; Type Global; NameOfSpace Hregion_u_Mag_2D [U]; } { Name istr ; Type Local ; NameOfSpace Hregion_i_Mag_2D ; } { Name Ustr ; Type Global ; NameOfSpace Hregion_i_Mag_2D [Ustr] ; } { Name Istr ; Type Global ; NameOfSpace Hregion_i_Mag_2D [Istr] ; } { Name Uz; Type Global; NameOfSpace Hregion_Circ [Uz]; } { Name Iz; Type Global; NameOfSpace Hregion_Circ [Iz]; } { Name Iz_post; Type Global; NameOfSpace Hregion_Circ_Post [Iz_post]; } If(Flag_MagTherm==2) { Name T; Type Local; NameOfSpace Hgrad_T; } EndIf } Equation { If(Flag_MagTherm==2) Galerkin { [ nu_nu0[{d a}, [{T}]] * Dof{d a} , {d a} ]; In Region[{non_conducting_domain, conducting_domain, source_domain, stranded_source_domain}]; Jacobian JVol; Integration I1; } If(bhNLFlag==1) Galerkin { JacNL[ dhdb_NL[{d a}, [{T}] ] * Dof{d a} , {d a} ]; In Region[{NL_domain}]; Jacobian JVol; Integration I1; } EndIf //Galerkin { [ - nu_nu0[{d a}, [{T}]] * br[] * Complex[ Vector[ orientx[], orienty[], 0], Vector[ -Sign[direction[]]*orienty[], Sign[direction[]]*orientx[], 0] ] , {d a} ]; In Region[{magnet_domain}]; // Jacobian JVol; Integration I1; } Galerkin { DtDof [ sigma[[{T}]] * Dof{a} , {a} ]; In Region[{conducting_domain, source_domain}]; Jacobian JVol; Integration I1; } Galerkin { [ sigma[[{T}]] * Dof{ur} / GeomCoeff[] , {a} ]; In Region[{conducting_domain, source_domain}]; Jacobian JVol; Integration I1; } Galerkin { DtDof [ sigma[[{T}]] * Dof{a} , {ur} ]; In Region[{conducting_domain, source_domain}]; Jacobian JVol; Integration I1; } Galerkin { [ sigma[[{T}]] * Dof{ur} / GeomCoeff[] , {ur} ]; In Region[{conducting_domain, source_domain}]; Jacobian JVol; Integration I1; } Galerkin { DtDof [ 1.0/(Complex[1,1]* Sqrt[3.14*Freq/(nu_nu0[]*sigma[[{T}]])]) * Dof{a} , {a} ]; In Region[{Sur_SIBC_B}]; Jacobian JSur; Integration I1; } Galerkin { [ Fs[Sqrt[area[]*4/3.14]*Sqrt[3.14*Freq*sigma[[{T}]]/(2*nu_nu0[])]] * Nc[]^(1-a_litz[])*Nc[]/(FillFactor[]*area[]^2*sigma[[{T}]]) * Dof{istr} , {istr} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol; Integration I1; } Else Galerkin { [ nu_nu0[{d a}] * Dof{d a} , {d a} ]; In Region[{non_conducting_domain, conducting_domain, source_domain, stranded_source_domain}]; Jacobian JVol; Integration I1; } If(bhNLFlag==1) Galerkin { JacNL[ dhdb_NL[{d a} ] * Dof{d a} , {d a} ]; In Region[{NL_domain}]; Jacobian JVol; Integration I1; } EndIf // Galerkin { [ - nu_nu0[{d a}] * br[] * Complex[ Vector[ orientx[], orienty[], 0], Vector[ -Sign[direction[]]*orienty[], Sign[direction[]]*orientx[], 0] ] , {d a} ]; In Region[{magnet_domain}]; // Jacobian JVol; Integration I1; } Galerkin { DtDof [ sigma[] * Dof{a} , {a} ]; In Region[{conducting_domain, source_domain}]; Jacobian JVol; Integration I1; } Galerkin { [ sigma[] * Dof{ur} / GeomCoeff[] , {a} ]; In Region[{conducting_domain, source_domain}]; Jacobian JVol; Integration I1; } Galerkin { DtDof [ sigma[] * Dof{a} , {ur} ]; In Region[{conducting_domain, source_domain}]; Jacobian JVol; Integration I1; } Galerkin { [ sigma[] * Dof{ur} / GeomCoeff[] , {ur} ]; In Region[{conducting_domain, source_domain}]; Jacobian JVol; Integration I1; } Galerkin { DtDof [ 1.0/(Complex[1,1]* Sqrt[3.14*Freq/(nu_nu0[]*sigma[])]) * Dof{a} , {a} ]; In Region[{Sur_SIBC_B}]; Jacobian JSur; Integration I1; } Galerkin { [ Fs[Sqrt[area[]*4/3.14]*Sqrt[3.14*Freq*sigma[]/(2*nu_nu0[])]] * Nc[]^(1-a_litz[])*Nc[]/(FillFactor[]*area[]^2*sigma[]) * Dof{istr} , {istr} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol; Integration I1; } EndIf Galerkin { [ - Nc[]^(1-a_litz[])/area[] * Dof{istr} , {a} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol; Integration I1; } Galerkin { DtDof [ Nc[]/area[] * Dof{a} , {istr} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol; Integration I1; } GlobalTerm { [ Dof{I} , {U} ]; In Region[{conducting_domain, source_domain}]; } GlobalTerm { [ Dof{Ustr}/GeomCoeff[] , {Istr} ] ; In Region[{stranded_source_domain}] ; } Integral { [ 0 * Dof{ln} , {ln} ] ; In Region[{non_conducting_domain, conducting_domain, source_domain, stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } GlobalTerm { [ 0 * Dof{Uz}, {Iz} ]; In circuit_domain; } GlobalTerm { [ 0 * Dof{Iz}, {Iz} ]; In circuit_domain; } GlobalEquation { Type Network; NameOfConstraint ElectricalCircuit; { Node {I}; Loop {U}; Equation {I}; In Region[{source_domain}]; } { Node {Istr}; Loop {Ustr}; Equation {Ustr}; In Region[{stranded_source_domain}]; } { Node {Iz}; Loop {Uz}; Equation {Uz}; In circuit_domain; } } GlobalTerm { [ Dof{Iz_post}, {Iz_post} ]; In circuit_domain; } GlobalTerm { [ -{Iz}, {Iz_post} ]; In circuit_domain; } } } }