Note: This discussion is about an older version of the COMSOL Multiphysics® software. The information provided may be out of date.

Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

weak magnetic field converges, strong magnetic field does not converge

Please login with a confirmed email address before reporting spam

The simulation should analyse the following problem: A magnet is passing by a piece of iron. (sketch.jpg) As Study Step I chose Time Dependent.

At first I tried a simple problem, where the magnet was not moved at all. The magnet is just slowly switched on and off by using a smoothed rectangle function. This simulation takes about 2 Minutes on my PC, the solutions are mostly converging very well and the time steps are rather large. (convergence weak field.jpg; step size weak field.jpg; graphics weak field.jpg)

But if I increase the strength of the magnet by a factor of 10 (magnetization.jpg; 1000 A/m works, 10000 A/m does not), without changing anything else, convergence gets worse and time steps get very small until the simulation ends with an error after 20% of the time. (convergence strong field.jpg; step size strong field.jpg)

COMSOL Error
The following feature has encountered a problem:
Repeated error test failures. May have reached a singularity.
Time: 0. 1956460958724214
Last time step is not converged.
- Feature: Time-Dependent Solver 1 (sol1/t1)
- Error: Repeated error test failures. May have reached a singularity.

I searched for this error in the forum and could not find the mistake in my model. The mesh looks good (mesh.jpg), the magnetization is smoothed both in time and space, there are no sudden changes in the magnetization, there are no sharp start conditions.

Any ideas why it does not converge?

(The magnet is not modelled as a real mass, because later I do not want to move a real mass in my simulation. Instead I defined a magnetisation, which is dependant of the coordinates of space and time. I did not use a moving mesh, because it is not suitable for complex geometries in 3D.)


3 Replies Last Post Nov 18, 2013, 7:37 a.m. EST
Sven Friedel COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 6, 2013, 10:43 a.m. EST
Dear Holger,

looking at your model it is striking that the magnetization function that you prescribe is not resolved well - neither in space nor time. Have a look at the attached animation.

The mesh inside your domain is much coarser than the step function. Yo are trying to define resolve a sharp heaviside-like function with a smoothness of 0.05/3 with a mesh that has an h of 0.15-0.2, which is afcator of 10 coarser.
Likewise you do not constarin the time-steps, but leave the solver time stepping "free". This means that the solver might miss the sharp ramp time at the tail of your signal.

Recommendations:
- Rather *draw* a domain (block) that defining a space dependent function. This ensures that your mesh is located on the boundary of your magnetisation discontinuity.
- even if you want to move your object in time this may be the better solution. Think over, if you really want to have a time-dependent study in the end or if not a sequence of quast-static steps is rather appropriate. In such a case you could use the stationary solver with a parametric sweep to move your object.

Best regards
Sven Friedel
COMSOL Multiphysics, Technopark Zurich


Dear Holger, looking at your model it is striking that the magnetization function that you prescribe is not resolved well - neither in space nor time. Have a look at the attached animation. The mesh inside your domain is much coarser than the step function. Yo are trying to define resolve a sharp heaviside-like function with a smoothness of 0.05/3 with a mesh that has an h of 0.15-0.2, which is afcator of 10 coarser. Likewise you do not constarin the time-steps, but leave the solver time stepping "free". This means that the solver might miss the sharp ramp time at the tail of your signal. Recommendations: - Rather *draw* a domain (block) that defining a space dependent function. This ensures that your mesh is located on the boundary of your magnetisation discontinuity. - even if you want to move your object in time this may be the better solution. Think over, if you really want to have a time-dependent study in the end or if not a sequence of quast-static steps is rather appropriate. In such a case you could use the stationary solver with a parametric sweep to move your object. Best regards Sven Friedel COMSOL Multiphysics, Technopark Zurich

Sven Friedel COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 6, 2013, 10:43 a.m. EST


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Nov 18, 2013, 7:37 a.m. EST
Dear Sven,

Many thanks for your advice. I created a new domain for the magnet and removed the spacial smoothing and it works just fine. The movement of the magnet is also working. For the movement I created a stretched domain for the magnet. This domain is meshed “swept” with a regular distribution. The solver is time discrete and the steps are determined, to bring the magnetization in accordance to the mesh in every time step. The simulation is fast enough. (Konvergenz Minimalmodell.mph)

After that I implemented the equations of a hysteresis model (Jiles Atherton) as it is described here: www.comsol.com/community/forums/general/thread/36970/ (5th posting)

This more precise hysteresis model seems to make convergence very difficult. I have to take a very small step size and even than convergence problems may occur. It will take hours of computing time only to power the magnet up. (Remanenz 3.mph; error.jpg; step size.jpg)

Any Ideas to speed things up?

Regards
Holger
Dear Sven, Many thanks for your advice. I created a new domain for the magnet and removed the spacial smoothing and it works just fine. The movement of the magnet is also working. For the movement I created a stretched domain for the magnet. This domain is meshed “swept” with a regular distribution. The solver is time discrete and the steps are determined, to bring the magnetization in accordance to the mesh in every time step. The simulation is fast enough. (Konvergenz Minimalmodell.mph) After that I implemented the equations of a hysteresis model (Jiles Atherton) as it is described here: http://www.comsol.com/community/forums/general/thread/36970/ (5th posting) This more precise hysteresis model seems to make convergence very difficult. I have to take a very small step size and even than convergence problems may occur. It will take hours of computing time only to power the magnet up. (Remanenz 3.mph; error.jpg; step size.jpg) Any Ideas to speed things up? Regards Holger

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.