I'm trying to solve for the magnetic field in a 3D electric motor using mortar BCs but I can't make the solver converge. Please find below the details of the model.
This is an overview of the mesh, you can see the motor model with the energised coil (it is immersed in air) and the simmetry plane used to further decrease meshing domain And these are the mortar BCs the sif file is here
Code: Select all
!------ Skeleton for body section -----
!Body 1 = stator
!Body 2 = rotor
!Body 3 = 3Dcoil
!Body 4 = air
!BC 01 = current in
!BC 02 = current out
!BC 03 = surface top
!BC 04 = surface bottom
!BC 05 = lateral surface simmetry top
!BC 06 = lateral surface simmetry top
!BC 07 = radial open air
Header
Check Keywords "Warn"
Mesh DB "." "GMSH_geometry_V17_6_central_coil_addded_physical_surface_m_coarse_mesh_s"
Include Path ""
Results Directory ""
End
Simulation
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
! Coordinate Scaling=0.001
Simulation Type = Steady
Steady State Max Iterations = 1
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) = 4
Name = "Air"
Equation = 2
Material = 1
End
Body 2
Target Bodies(1) = 3
Name = "3D Coil"
Equation = 1
Material = 2
Body Force = 1
End
Body 3
Target Bodies(1) = 1
Name = "Stator"
Equation = 2
Material = 3
End
Body 4
Target Bodies(1) = 2
Name = "Rotor"
Equation = 2
Material = 3
End
Material 1
Name = "Air (room temperature)"
Viscosity = 1.983e-5
Heat expansion Coefficient = 3.43e-3
Heat Conductivity = 0.0257
Sound speed = 343.0
Density = 1.205
Heat Capacity = 1005.0
Relative Permittivity = Real 1
Relative Permeability = Real 1
Electric Conductivity = Real 0
End
Material 2
Name = "Copper (generic)"
Heat expansion Coefficient = 16.5e-6
Heat Conductivity = 401.0
Sound speed = 3810.0
Heat Capacity = 385.0
Density = 8960.0
Mesh Poisson ratio = 0.34
Poisson ratio = 0.34
Youngs modulus = 115.0e9
Relative Permittivity = Real 1
Relative Permeability = Real 1
Electric Conductivity = Real 5.96e7
End
Material 3
Name = "Iron (generic)"
Poisson ratio = 0.29
Heat expansion Coefficient = 11.8e-6
Youngs modulus = 193.053e9
Heat Conductivity = 80.2
Sound speed = 5000.0
Heat Capacity = 449.0
Mesh Poisson ratio = 0.29
Density = 7870.0
relative Permittivity = 1.0
Relative Permeability = 1000
Electric Conductivity = 10.30e6
End
Equation 1
Name = "Equation A"
Active Solvers(2) = 1 2 3
End
Equation 2
Name = "Equation magnetic field"
Active Solvers(2) = 2 3
End
!==STATIC CURRENT SOLVER==============================
!=====================================================
Solver 1
Equation = Static Current Conduction
Variable = Potential
Procedure = "StatCurrentSolve" "StatCurrentSolver"
Calculate Volume Current = True
Current Control = 40
Exec Solver = Always
Stabilize = True
Bubbles = False
Lumped Mass Matrix = False
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-8
Nonlinear System Max Iterations = 1
Nonlinear System Newton After Iterations = 3
Nonlinear System Newton After Tolerance = 1.0e-3
Nonlinear System Relaxation Factor = 1
Linear System Abort Not Converged = True
Linear System Residual Output = 1
!===============================================
! iterative method and options
Linear System Solver = Iterative
Linear System Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-8
Linear System Preconditioning = ILU0
! Linear System Preconditioning = none
Linear System ILUT Tolerance = 1.0e-3
Linear System Precondition Recompute = 1
!===============================================
End
!==MAGNETIC FIELD SOLVER==============================
!=====================================================
Solver 2
Equation = "MGDynamics"
Variable = P
Procedure = "MagnetoDynamics" "WhitneyAVSolver"
Fix Input Current Density = Logical True
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1e-09
Nonlinear System Convergence Tolerance = 1.0e-8
Nonlinear System Max Iterations = 1
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 Preconditioning = ILU2
Linear System Residual Output = 20
Linear System Max Iterations = 5000
! Linear System Iterative Method = BiCGStab2
! Linear System Iterative Method = GCR
! BicGStabL Polynomial Degree = 4
! Linear System GCR Restart = 600
Linear System Convergence Tolerance = 1e-9
! Linear System Normwise Backward Error = Logical True
Linear System Abort Not Converged = False
Apply Mortar BCs = Logical True
Edge Basis = Logical True
End
!=====================================================
!=====================================================
Solver 3
Equation = "MGDynamicsCalc"
Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
! Linear System Symmetric = True
Potential Variable = P
! Calculate Current Density = Logical True
! Calculate Electric Field = Logical True
Calculate Magnetic Field Strength = Logical True
Calculate Magnetic Field Density = Logical True
! Calculate Field Energy = Logical True
! Calculate Current Density E = Logical True
! Calculate Electric Field E = Logical True
! Calculate Magnetic Field Strength E = Logical True
! Calculate Magnetic Field Density E = Logical True
! Steady State Convergence Tolerance = 0
Steady State Convergence Tolerance = 1e-09
Linear System Solver = "Iterative"
Linear System Iterative Method = CG
Linear System Preconditioning = None
Linear System Residual Output = 0
Linear System Max Iterations = 5000
Linear System Convergence Tolerance = 1.0e-8
End
Solver 4
Equation = Result Output
! Exec Solver = Never
Procedure = "ResultOutputSolve" "ResultOutputSolver"
Binary Output = True
Output Format = vtu
Output File Name = results
End
Solver 5
Equation = "scalars"
procedure = "SaveData" "SaveScalars"
Filename = "data_scalars.dat"
End
!=========================================================
!BC 01 = current in
!BC 02 = current out
!BC 03 = surface top
!BC 04 = surface bottom
!BC 05 = lateral surface simmetry top
!BC 06 = lateral surface simmetry top
!BC 07 = radial open air
Boundary Condition 1
Target Boundaries(1) = 1
Name = "Current in"
Potential = 0.055
P {e} 1 = real 0
P {e} 2 = real 0
End
Boundary Condition 2
Target Boundaries(1) = 2
Name = "Current out"
Potential = 0
P {e} 1 = real 0
P {e} 2 = real 0
End
Boundary Condition 3
Target Boundaries(2) = 3 7
Name = "Outer space"
P {e}= real 0
End
Boundary Condition 4
Target Boundaries(1) = 4
Name = "BCn Flux Parallel" ! Simmetry surface
P {e} 1 = real 0
P {e} 2 = real 0
end
!============MORTAR==================================
! 5 on 6
Boundary Condition 5
Name = "Periodic air Master"
Target Boundaries(1) = 5
Mortar BC = 6
! anti sliding Projector = Logical True
Radial Projector = Logical True
! Galerking Projector = Logical True
! Level Projector = Logical False
Level Projector Generic = Logical True
! Level Projector Strong = Logical True
End
Boundary Condition 6
Name = "Periodic air Target"
Target Boundaries(1) = 6
End
!====================================================
Body Force 1
Name = "Current Density"
Current Density 1 = Equals Volume current 1
Current Density 2 = Equals Volume current 2
Current Density 3 = Equals Volume current 3
End
Any help with the problem would be much apreciated,
Regards,
Marco
PS: If you want to give it a try, the mesh (Elner native) is here: http://www.engandmath.com/public/ElmerF ... mesh_s.zip