! 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 "." "fivecoils"
End
Simulation
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady
Steady State Max Iterations = 1
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 = "Air"
Equation = 1
Material = 1
End
Body 2
Target Bodies(1) = 2
Name = "Coil1"
Equation = 2
Material = 2
Body Force = 1
End
Body 3
Target Bodies(1) = 3
Name = "Coil2"
Equation = 2
Material = 2
Body Force = 1
End
Body 4
Target Bodies(1) = 4
Name = "Coil3"
Equation = 2
Material = 2
Body Force = 1
End
Body 5
Target Bodies(1) = 5
Name = "Coil4"
Equation = 2
Material = 2
Body Force = 1
End
Body 6
Target Bodies(1) = 6
Name = "Coil5"
Equation = 2
Material = 2
Body Force = 1
End
Solver 1
Equation = "CoilSolver"
Procedure = "CoilSolver" "CoilSolver"
Linear System Solver = "Iterative"
Linear System Preconditioning = ILU1
Linear System Max Iterations = 1000
Linear System Convergence Tolerance = 1e-10
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" "WhitneyAVSolver"
Variable = P
! Not active when using potential as source
Fix Input Current density = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Max Iterations = 1
Linear System Solver = iterative
Linear System Iterative Method = BiCGStabl ! GCR / Idrs
Linear System GCR Restart = 100
BiCGStabl Polynomial Degree = 6
Idrs Parameter = Integer 6
Linear System Robust = Logical True
Linear System Max Iterations = 1000
Linear System Convergence Tolerance = 1.0e-8
Linear System Preconditioning = none
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
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"
Permeability = 1.0
Relative Permittivity = 1.0
End
Material 2
Name = "Conductor"
Permeability = 1.0
Relative Permittivity = 1.0
Electric Conductivity = 1.0
End
! The coils
Component 1
Name = String "Coil1"
Coil Type = String "test"
Master Bodies(1) = Integer 2
Desired Current Density = Real 1.0
End
Component 2
Name = String "Coil2"
Coil Type = String "test"
Master Bodies(1) = Integer 3
Desired Current Density = Real 1.0
End
Component 3
Name = String "Coil3"
Coil Type = String "test"
Master Bodies(1) = Integer 4
Desired Current Density = Real 1.0
End
Component 4
Name = String "Coil4"
Coil Type = String "test"
Master Bodies(1) = Integer 5
Desired Current Density = Real 1.0
End
Component 5
Name = String "Coil5"
Coil Type = String "test"
Master Bodies(1) = Integer 6
Desired Current Density = Real 1.0
End
Body Force 1
Name = "Source"
Current Density 1 = Equals "CoilCurrent e 1"
Current Density 2 = Equals "CoilCurrent e 2"
Current Density 3 = Equals "CoilCurrent e 3"
End
Boundary Condition 1
Target Boundaries(1) = 1
Name = "far"
P {e} = real 0
End
!mesh dependent
!Solver 2 :: Reference Norm = 2.50642252E+02