Formulation { { Name stranded_sigma_formulation; Type FemEquation ; Quantity { { Name e0 ; Type Local ; NameOfSpace Hregion_u0_3D ; } //stranded conductor effective sigma computation { Name I0 ; Type Global ; NameOfSpace Hregion_u0_3D [I0] ; } { Name U0 ; Type Global ; NameOfSpace Hregion_u0_3D [U0] ; } If(Flag_MagTherm==3) { Name T; Type Local; NameOfSpace Hgrad_T; } EndIf } Equation { If(Flag_MagTherm==3) Galerkin { [ sigma[[{T}]] * Dof{e0} , {e0} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } Else Galerkin { [ sigma[] * Dof{e0} , {e0} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } EndIf GlobalTerm { [ - Dof{I0}, {U0} ] ; In Region[{SurStr_CURRENT_B_CH}]; } } } { Name cFormulation ; Type FemEquation ; Quantity { { Name ln ; Type Local ; NameOfSpace airLinSpace; } { Name a ; Type Local ; NameOfSpace Hcurl_a_3D ; } { Name e ; Type Local ; NameOfSpace Hregion_u_3D ; } If (#Sur_RESISTANCE_B_List()) { Name eResistance ; Type Local ; NameOfSpace Hregion_u_3D[eResistance] ; } EndIf { Name I ; Type Global ; NameOfSpace Hregion_u_3D [I] ; } { Name U ; Type Global ; NameOfSpace Hregion_u_3D [U] ; } { Name Istr ; Type Global ; NameOfSpace Hregion_u_3D [Istr] ; } { Name Ustr ; Type Global ; NameOfSpace Hregion_u_3D [Ustr] ; } { Name I_post ; Type Global ; NameOfSpace Hregion_u_3D_Post [I_post] ; } { Name estr ; Type Local ; NameOfSpace Hregion_uStrInd_3D ; } { Name Istr_ind ; Type Global ; NameOfSpace Hregion_uStrInd_3D [Istr_ind] ; } { Name Ustr_ind ; Type Global ; NameOfSpace Hregion_uStrInd_3D [Ustr_ind] ; } { Name e0 ; Type Local ; NameOfSpace Hregion_u0_3D ; } //stranded conductor effective sigma computation If(Flag_MagTherm==3) { Name T; Type Local; NameOfSpace Hgrad_T; } EndIf } Equation { If(Flag_MagTherm==3) 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 { [1.0/(Complex[1,1]* Sqrt[3.14*Freq/(nu_nu0[]*sigma[[{T}]])]) * Dof{e} , {a} ]; In Region[{Sur_SIBC_B}]; Jacobian JSur; Integration I1; } Galerkin { DtDof [ 1.0/(Complex[1,1]* Sqrt[3.14*Freq/(nu_nu0[]*sigma[[{T}]])]) * Dof{a} , {e} ]; In Region[{Sur_SIBC_B}]; Jacobian JSur; Integration I1; } Galerkin { [ 1.0/(Complex[1,1]* Sqrt[3.14*Freq/(nu_nu0[]*sigma[[{T}]])]) * Dof{e} , {e} ]; In Region[{Sur_SIBC_B}]; Jacobian JSur; Integration I1; } Galerkin { [ nu_nu0[Norm[{d a}], [{T}]] * Dof{d a} , {d a} ] ; In Region[{non_conducting_domain, conducting_domain, source_domain, stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } // Galerkin { [ - nu_nu0[Norm[{d a}], [{T}]] * br[] * Complex[ Vector[ orientx[], orienty[], orientz[]], Vector[ -Sign[direction[]]*orienty[], Sign[direction[]]*orientx[], orientz[]] ] , {d a} ]; In Region[{magnet_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 { DtDof[ sigma[[{T}]] * Dof{a} , {a} ] ; In Region[{conducting_domain, source_domain}] ; Jacobian JVol ; Integration I1 ; } Galerkin { [ sigma[[{T}]] * Dof{e} , {a} ] ; In Region[{conducting_domain, source_domain}] ; Jacobian JVol ; Integration I1 ; } Galerkin { DtDof[ sigma[[{T}]] * Dof{a} , {e} ] ; In Region[{conducting_domain, source_domain}] ; Jacobian JVol ; Integration I1 ; } Galerkin { [ sigma[[{T}]] * Dof{e} , {e} ] ; In Region[{conducting_domain, source_domain}] ; Jacobian JVol ; Integration I1 ; } Else 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 { [1.0/(Complex[1,1]* Sqrt[3.14*Freq/(nu_nu0[]*sigma[])]) * Dof{e} , {a} ]; In Region[{Sur_SIBC_B}]; Jacobian JSur; Integration I1; } Galerkin { DtDof [ 1.0/(Complex[1,1]* Sqrt[3.14*Freq/(nu_nu0[]*sigma[])]) * Dof{a} , {e} ]; In Region[{Sur_SIBC_B}]; Jacobian JSur; Integration I1; } Galerkin { [ 1.0/(Complex[1,1]* Sqrt[3.14*Freq/(nu_nu0[]*sigma[])]) * Dof{e} , {e} ]; In Region[{Sur_SIBC_B}]; Jacobian JSur; Integration I1; } Galerkin { [ nu_nu0[Norm[{d a}]] * Dof{d a} , {d a} ] ; In Region[{non_conducting_domain, conducting_domain, source_domain, stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } // Galerkin { [ - nu_nu0[Norm[{d a}]] * br[] * Complex[ Vector[ orientx[], orienty[], orientz[]], Vector[ -Sign[direction[]]*orienty[], Sign[direction[]]*orientx[], orientz[]] ] , {d a} ]; In Region[{magnet_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 { DtDof[ sigma[] * Dof{a} , {a} ] ; In Region[{conducting_domain, source_domain}] ; Jacobian JVol ; Integration I1 ; } Galerkin { [ sigma[] * Dof{e} , {a} ] ; In Region[{conducting_domain, source_domain}] ; Jacobian JVol ; Integration I1 ; } Galerkin { DtDof[ sigma[] * Dof{a} , {e} ] ; In Region[{conducting_domain, source_domain}] ; Jacobian JVol ; Integration I1 ; } Galerkin { [ sigma[] * Dof{e} , {e} ] ; In Region[{conducting_domain, source_domain}] ; Jacobian JVol ; Integration I1 ; } EndIf // surface contact resistance If (#Sur_RESISTANCE_B_List()) Galerkin { [ 1/resistance_electric[] * Dof{dInv eResistance} , {dInv eResistance} ] ; In Region[{Sur_RESISTANCE_B}] ; Jacobian JSur ; Integration I1 ; } EndIf // This part is for calculation of stranded coil in 3D. e0 calculated in stranded_sigma_formulation // is used to determine the effective sigma Galerkin { [ Nc[]^(1-a_litz[]) * I_str[$Time]/cross_section_area[]/(Norm[{e0}])* {e0}, {a} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } Galerkin { [ -Nc[]^(1-a_litz[])*I_str[$Time]/cross_section_area[]/(Norm[{e0}])* {e0}, {e} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } If(Flag_MagTherm==3) Galerkin { [ FillFactor[]/Fs[Sqrt[cross_section_area[]*4/3.14]*Sqrt[3.14*Freq*sigma[[{T}]]/(2*nu_nu0[{d a}, [{T}]])]] *sigma[[{T}]]* Dof{e}, {e} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } // This part if for calculation of induced EMF (estr, and global variable Ustr_ind) Galerkin { DtDof[ sigma[[{T}]] * Dof{a} , {estr} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } Galerkin { [ sigma[[{T}]]/(Nc[]^(1-a_litz[])) * Dof{estr} , {estr} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } Else Galerkin { [ FillFactor[]/Fs[Sqrt[cross_section_area[]*4/3.14]*Sqrt[3.14*Freq*sigma[]/(2*nu_nu0[])]] *sigma[]* Dof{e}, {e} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } // This part if for calculation of induced EMF (estr, and global variable Ustr_ind) Galerkin { DtDof[ sigma[] * Dof{a} , {estr} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } Galerkin { [ sigma[]/(Nc[]^(1-a_litz[])) * Dof{estr} , {estr} ] ; In Region[{stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } EndIf GlobalTerm { [ - Dof{I}, {U} ] ; In Region[{Sur_CURRENT_B_CH, Sur_POWER_B_CH, Sur_VOLTAGE_B_CH}]; } GlobalTerm { [ Dof{I_post}, {I_post} ]; In Region[{Sur_CURRENT_B_CH, Sur_POWER_B_CH, Sur_VOLTAGE_B_CH}]; } GlobalTerm { [ -{I}, {I_post} ]; In Region[{Sur_CURRENT_B_CH, Sur_POWER_B_CH, Sur_VOLTAGE_B_CH}]; } Integral { [ 0 * Dof{ln} , {ln} ] ; In Region[{non_conducting_domain, conducting_domain, source_domain, stranded_source_domain}] ; Jacobian JVol ; Integration I1 ; } } } }