Some background
I'm doing a masters degree and have been playing around with Elmer, for the past few weeks, so that I can get acquainted with it for my research. I'm particularly interested in the mgdyn and mgdyn2D solvers. I followed the tutorial to simulate the 2D horseshoe magnet and was able to do that successfully. I then replicated that tutorial from scratch (so modeled the horseshoe etc) and was also able to do that perfectly and got results that agree with the tutorial.
Edit: I'm using ElmerGUI and I'm running everything on Ubuntu 22.04.2 LTS.
My issue
Two weeks ago, I started trying to extend the 2D horseshoe example into a 3D simulation. I've managed to make a model in gmsh but have run into nonsensical results with Elmer. Recently, I have simplified the 3D horseshoe down to just two bar magnets but am still running into similar issues. When I load up the results of the sim into ParaView, I can see that there is zero flux on any of the bodies and the magnetic field strength (which appears to be wrong as well) is only non-zero on the two bar magnets (the air between them is also zero).
My boundary condition is set to
Code: Select all
AV {e} = Real 0
I also see the solver outputting 'SolveLinearSystem: Solution trivially zero!' when I run the sim. Does anyone know what this means? I did find this post but the solution provided by raback didn't seem to help me
I've reduced the mesh size quite a bit because I was fiddling with the BCs and didn't want to wait 5 minutes per simulation with a high resolution mesh. I'm not too concerned with accuracy at the moment, I just want to see the field flowing between the magnets
My SIF file
Code: Select all
Header
CHECK KEYWORDS Warn
Mesh DB "." "."
Include Path ""
Results Directory ""
End
Simulation
Max Output Level = 5
Coordinate System = Cartesian
Coordinate Mapping(3) = 1 2 3
Simulation Type = Steady state
Steady State Max Iterations = 1
Output Intervals(1) = 1
Coordinate Scaling = 1e-3
Solver Input File = case.sif
Post File = case.vtu
End
Constants
Gravity(4) = 0 -1 0 9.82
Stefan Boltzmann = 5.670374419e-08
Permittivity of Vacuum = 8.85418781e-12
Permeability of Vacuum = 1.25663706e-6
Boltzmann Constant = 1.380649e-23
Unit Charge = 1.6021766e-19
End
Body 1
Target Bodies(1) = 1
Name = "Body 1"
Equation = 1
Material = 3
End
Body 2
Target Bodies(1) = 2
Name = "Body 2"
Equation = 1
Material = 2
End
Body 3
Target Bodies(1) = 3
Name = "Body 3"
Equation = 1
Material = 1
End
Solver 1
Equation = MgDynPost
Procedure = "MagnetoDynamics" "MagnetoDynamicsCalcFields"
Calculate Magnetic Field Strength = True
Exec Solver = Always
Stabilize = True
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
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 Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-10
BiCGstabl polynomial degree = 2
Linear System Preconditioning = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 10
Linear System Precondition Recompute = 1
End
Solver 2
Equation = MgDyn
Procedure = "MagnetoDynamics" "WhitneyAVSolver"
Exec Solver = Always
Stabilize = True
Optimize Bandwidth = True
Steady State Convergence Tolerance = 1.0e-5
Nonlinear System Convergence Tolerance = 1.0e-7
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 Iterative Method = BiCGStab
Linear System Max Iterations = 500
Linear System Convergence Tolerance = 1.0e-10
BiCGstabl polynomial degree = 2
Linear System Preconditioning = ILU0
Linear System ILUT Tolerance = 1.0e-3
Linear System Abort Not Converged = False
Linear System Residual Output = 10
Linear System Precondition Recompute = 1
End
Equation 1
Name = "Equation 1"
Active Solvers(2) = 1 2
End
Material 1
Name = "Air"
Relative Permeability = 1
End
Material 2
Name = "Mag_S"
Magnetization 1 = Real -780e3
Relative Permeability = 5000
End
Material 3
Name = "Mag N"
Relative Permeability = 5000
Magnetization 1 = Real 780e3
End
Boundary Condition 1
Target Boundaries(6) = 1 2 3 4 5 6
Name = "BoundaryCondition 1"
AV {e} = Real 0
End
Flux density Magnetic field strength As an aside, in ParaView, when I'm selecting a quantity to visualize (say, magnetic field strength), some quantities will be accompanied by another quantity of the same name but ending in an 'e' (for example, magnetic field strength e). What does this mean? Is it the error in the computation?
Thanks,
Nick