FunctionSpace { { Name Hgrad_T; Type Form0; BasisFunction { { Name sn; NameOfCoef Tn; Function BF_Node; Support Tot_The; Entity NodesOf[Tot_The]; } For i In {0:#Sur_RESISTANCE_T_List()-1} ThermRes_OneSideVol_i = ThermRes_OneSideVol_List(i); Sur_RESISTANCE_T_i = Sur_RESISTANCE_T_List(i); { Name sdn ; NameOfCoef Tdn~{i} ; Function BF_Node ; Support ElementsOf[{ThermRes_OneSideVol_i, Sur_RESISTANCE_T_i}, OnOneSideOf {Sur_RESISTANCE_T_i}] ; Entity NodesOf[ {Sur_RESISTANCE_T_i}] ; } EndFor } If (#Sur_RESISTANCE_T_List()) SubSpace { { Name Tresistance ; NameOfBasisFunction { sdn } ; } } EndIf Constraint { { NameOfCoef Tn; EntityType NodesOf ; NameOfConstraint temperature; } } } } FunctionSpace { // Magnetic vector potential a (b = curl a) { Name Hcurl_a_Mag_2D; Type Form1P; BasisFunction { // a = a s // e e { Name se; NameOfCoef ae; Function BF_PerpendicularEdge; Support Region[{non_conducting_domain, conducting_domain, source_domain, Sur_SIBC_B, Sur_INTERFACE_B, stranded_source_domain}]; Entity NodesOf[ All ]; } } Constraint { { NameOfCoef ae; EntityType NodesOf; NameOfConstraint MagneticVectorPotential_2D; } } } // Gradient of Electric scalar potential (2D) { Name Hregion_u_Mag_2D; Type Form1P; BasisFunction { { Name sr; NameOfCoef ur; Function BF_RegionZ; Support Region[{conducting_domain, source_domain, Sur_SIBC_B}]; Entity Region[{conducting_domain, source_domain, Sur_SIBC_B}]; } } GlobalQuantity { { Name U; Type AliasOf ; NameOfCoef ur; } { Name I; Type AssociatedWith; NameOfCoef ur; } } Constraint { { NameOfCoef U; EntityType Region; NameOfConstraint VoltageLoad_2D; } { NameOfCoef I; EntityType Region; NameOfConstraint CurrentLoad_2D; } } } /* Stranded coil functionspace */ { Name Hregion_i_Mag_2D ; Type Vector ; BasisFunction { { Name sr ; NameOfCoef istr ; Function BF_RegionZ ; Support Region[{stranded_source_domain}] ; Entity Region[{stranded_source_domain}] ; } } GlobalQuantity { { Name Istr ; Type AliasOf ; NameOfCoef istr ; } { Name Ustr ; Type AssociatedWith ; NameOfCoef istr ; } } Constraint { { NameOfCoef Ustr ; EntityType Region; NameOfConstraint VoltageLoad_2D ; } { NameOfCoef Istr ; EntityType Region; NameOfConstraint CurrentLoad_2D ; } } } /* Dummy fspace for air */ { Name airLinSpace ; Type Form0 ; BasisFunction { { Name sn ; NameOfCoef ln ; Function BF_GroupOfNodes ; Support Region[{non_conducting_domain}] ; Entity GroupsOfNodesOf[ Sur_INTERFACE_B ] ; } } Constraint { { NameOfCoef ln ; EntityType GroupsOfNodesOf ; NameOfConstraint Lin2D ; } } } /* For circuits 2D */ { Name Hregion_Circ ; Type Scalar ; BasisFunction { { Name sr ; NameOfCoef ir ; Function BF_Region ; Support circuit_domain; Entity circuit_domain ; } } GlobalQuantity { { Name Iz ; Type AliasOf ; NameOfCoef ir ; } { Name Uz ; Type AssociatedWith ; NameOfCoef ir ; } } Constraint { { NameOfCoef Uz ; EntityType Region ; NameOfConstraint Voltage_2D ; } { NameOfCoef Iz ; EntityType Region ; NameOfConstraint Current_2D ; } } } }