! TUTORIAL 3 ! Test case that demonstrates how to couple hierarchically the ! solver that computes currents in coils with magnetic field computation. ! The key factor for convergence is to use elemental current sources. ! ! P.R. 17 Jan 2019 Header CHECK KEYWORDS Warn Mesh DB "." End Simulation Coordinate System = Cartesian Coordinate Mapping(3) = 1 2 3 Angular Frequency = 6.28e3 Simulation Type = Steady Steady State Max Iterations = 2 Max Output Level = 6 End Constants Gravity(4) = 0 -1 0 9.82 Stefan Boltzmann = 5.67e-08 Permittivity of Vacuum = 8.8542e-12 Boltzmann Constant = 1.3807e-23 Unit Charge = 1.602e-19 End Body 1 Target Bodies(1) = 1 Name = "Box" Equation = 1 Material = 1 End Body 2 Target Bodies(1) = 2 Name = "Coil" Equation = 2 Material = 2 Body Force = 1 End Solver 1 Equation = "CoilSolver" Procedure = "CoilSolver" "CoilSolver" Linear System Solver = "Iterative" Linear System Preconditioning = None Linear System Max Iterations = 1000 Linear System Convergence Tolerance = 1e-6 Linear System Iterative Method = BiCGStab Linear System Residual Output = 10 Steady State Convergence Tolerance = 1e-06 Normalize Coil Current = Logical True Nonlinear System Consistent Norm = Logical True Coil Closed = Logical True Narrow Interface = Logical True Save Coil Set = Logical True Save Coil Index = Logical True Calculate Elemental Fields = Logical True End Solver 2 Equation = MGDynamics Procedure = "MagnetoDynamics" "WhitneyAVHarmonicSolver" Variable = P[P re:1 P im:1] !Angular Frequency = 1 ! Not active when using potential as source Fix Input Current density = True Steady State Convergence Tolerance = 1.0e-2 Nonlinear System Max Iterations = 1 Linear System Solver = iterative Linear System Iterative Method = BiCGStabl ! GCR / Idrs ! Linear System GCR Restart = 100 BiCGStabl Polynomial Degree = 2 !Idrs Parameter = Integer 2 Linear System Robust = Logical True Linear System Max Iterations = 50 Linear System Convergence Tolerance = 1.0e-2 Linear System Preconditioning = none Linear System Residual Mode = True Linear System Residual Output = 1 Linear System Abort Not Converged = False ! Optionally one can use different scaling. Sometimes gives better results. Linear System Row Equilibration = Logical True Nonlinear System Consistent Norm = Logical True End Solver 3 Equation = MGDynamicsCalc Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields" Potential Variable = String "P" Steady State Convergence Tolerance = 1.0e-5 Nonlinear System Convergence Tolerance = 1.0e-8 Nonlinear System Max Iterations = 20 Nonlinear System Newton After Iterations = 3 Nonlinear System Newton After Tolerance = 1.0e-3 Nonlinear System Relaxation Factor = 1 Linear System Solver = Iterative Linear System Symmetric = True Linear System Iterative Method = CG Linear System Max Iterations = 5000 Linear System Convergence Tolerance = 1.0e-8 Linear System Preconditioning = ILU0 Linear System ILUT Tolerance = 1.0e-3 Linear System Abort Not Converged = False Linear System Residual Output = 1 Linear System Precondition Recompute = 1 Calculate Current Density = True Nonlinear System Consistent Norm = Logical True Discontinuous Bodies = True End Solver 4 Exec Solver = after all Equation = "ResultOutput" Procedure = "ResultOutputSolve" "ResultOutputSolver" Output File Name = case Vtu format = Logical True Discontinuous Bodies = Logical True Save Geometry Ids = True End Equation 1 Name = "MGDyn for air" Active Solvers(2) = 2 3 End Equation 2 Name = "MGDyn for coils" Active Solvers(3) = 1 2 3 End Material 1 Name = "Space" Relative Permeability = 1.0 Relative Permittivity = 1.0 End Material 2 Name = "Conductor" Relative Permeability = 1.0 Relative Permittivity = 1.0 Electric Conductivity = 58e6 End ! The coils Component 1 Name = String "Coil" Coil Type = String "test" Master Bodies(1) = Integer 2 Desired Current Density = Real 31.8 !Coil Center(3) = Real 0 0 0 Coil Normal(3) = Real 0 0 1 End Body Force 1 Name = "Source" Current Density 1 = Equals "CoilCurrent 1" Current Density 2 = Equals "CoilCurrent 2" Current Density 3 = Equals "CoilCurrent 3" End Boundary Condition 1 Target Boundaries(1) = 1 Name = "far" P re {e} = real 0 P im {e} = real 0 End