## Magnetization Field and inconsistent solution

Numerical methods and mathematical models of Elmer
tarta
Posts: 1
Joined: 17 Oct 2023, 18:08
Antispam: Yes

### Magnetization Field and inconsistent solution

Hello,

I am new to Elmer and I am trying to study the resulting magnetic field when putting a conductive ball in an uniform AC magnetic field.
I built the mesh with GMSH, putting the ball in a box (which is itself a sphere of greater radius), then I tried to use WhitneyHarmonicSolver of Elmer to compute the total magnetic field (which is theoretically known by analytic formulas).

Because I intend to use more complex incident magnetic fields in the future, I tried to use the "Magnetization" field of "Body Force" to define the incident field. The used fortran file just returns a constant value along a direction.

The result is quite correct when the incident field is directed by [0,1,1] but totally wrong when the incident field is along [0,0,1] (or other directions) !?
In particular div(B)=0 seems not to be satisfied close to the ball (the field is not deviated, it just seems to stop when reaching the ball, see attached file).
I do not understand how such a behavior can be explained (the mesh seems perfectly homogeneous)...

Is my approach correct (using "Magnetization" to model incident mag field) ? Do you know what could be wrong / what should I check to fix this issue ?

Appendix:

I defined the conductive ball material as:

Code: Select all

``````! ball
Material 1
Name = ball
Relative Permeability = Real 1.0
Relative Permittivity = Real 1.0
Electric Conductivity = Real 63000000.0
End
``````
The incident field is imposed by:

Code: Select all

``````! uniform_field
Body Force 1
Name = champ
Magnetization 1 = Variable "coordinate"
Real Procedure "field_constant" "FieldX"
Magnetization 2 = Variable "coordinate"
Real Procedure "field_constant" "FieldY"
Magnetization 3 = Variable "coordinate"
Real Procedure "field_constant" "FieldZ"
End
``````
And the solver is parametrized with:

Code: Select all

``````! WhitneySolver
Solver 1
Equation = WhitneyHarmonicSolver
Procedure = "MagnetoDynamics" "WhitneyAVHarmonicSolver"
Variable = String A[A re:1 A im:1]
Angular Frequency = Real 60000
Static Conductivity = True
Fix Input Current Density = False
Automated Source Projection BCs = True
Use Lagrange Gauge = True
Exec Solver = Always
Stabilize = True
Optimize Bandwidth = True
Linear System Solver = Iterative
Linear System Convergence Tolerance = 1e-10
Linear System Iterative Method = BiCGstabl
BiCGstabl polynomial degree = 2
Linear System Max Iterations = 1500
Linear System Residual Output = 300
Linear System Abort Not Converged = True
End
``````
Attachments
Figure_1.png