Failed to find a solution & inconsistent convergence - Stationary magnetic field model

Please login with a confirmed email address before reporting spam

Hello all,

I am new to COMSOL and I am trying to simulate a metal cylinder in a stationary magnetic field. First with a solid cylinder, then for a hollow cylinder.

The solid cylinder model converges nicely and gives reasonable results. However, the hollow cylinder model is considerably slower and only converges sometimes. Increased computing time for the increased complexity is fair, but the inconsistency is troubling.

I am using the fully coupled, iterative solver. And I have tried the five available solvers (GMRES, FGMRES, BiCGStab, Conjugate Gradients, and TFQMR). For the hollow cylinder model, the runs sometimes take around 10 seconds and produce a nice result. But when I try to compute the same problem again (with the same solver to check for consistency) it takes 15 minutes and fails to converge. Sometimes it completes the computation but presents an unphysical result.

The two errors I most often see are: - Failed to find a solution. Maximum number of Newton iterations reached. There was an error message from the linear solver. Maximum number of intermediate iterations reached. Returned solution is not converged. Not all parameter steps returned - Failed to find a solution. Divergence of the linear iterations. Returned solution is not converged. Not all parameter steps returned.

I have tried varying the mesh size between normal, finer, and even up to extremely fine. But that did not solve the issue.

I am starting to wonder if I have made some basic mistake in setting up the model that makes it difficult to converge. I have attached the project files for the solid and hollow cylinder models, and I would appreciate if a more experienced user could take a look at them.

Thanks, Linus



4 Replies Last Post 07.04.2025, 11:17 GMT-4
Andrii Grytsan COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 weeks ago 07.04.2025, 09:12 GMT-4

Hi Linus, When using COMSOL on subscription, the best way to get help is to submit a support case: https://www.comsol.com/support . Feel free to submit your questions with your models there!

Hi Linus, When using COMSOL on subscription, the best way to get help is to submit a support case: https://www.comsol.com/support . Feel free to submit your questions with your models there!

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 2 weeks ago 07.04.2025, 09:27 GMT-4

Hi Linus,

it is always a good idea to add a 'Zero Magnetic Scalar Potential' BC to one point in the model. Sometimes models converge without, but in general they don't.

Cheers Edgar

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Hi Linus, it is always a good idea to add a 'Zero Magnetic Scalar Potential' BC to one point in the model. Sometimes models converge without, but in general they don't. Cheers Edgar

Please login with a confirmed email address before reporting spam

Posted: 2 weeks ago 07.04.2025, 10:18 GMT-4

Hi Linus,

it is always a good idea to add a 'Zero Magnetic Scalar Potential' BC to one point in the model. Sometimes models converge without, but in general they don't.

Cheers Edgar

Thank you for your reply Edgar! I added a zero magnetic scalar potential to a point, and it now converges very quickly.

According to the response in this other thread (https://www.comsol.com/forum/thread/40499/zero-magnetic-scalar-potential-which-boundaries-to-define) you can put the zero potential anywhere in the model. However, there was a significant difference in the field depending on if I put the zero point in the middle of the cylinder, or on the corner of the outer box of air.

Do you know if there is a more or less correct location to place the zero potential?

>Hi Linus, > >it is always a good idea to add a 'Zero Magnetic Scalar Potential' BC to one point in the model. Sometimes models converge without, but in general they don't. > >Cheers >Edgar Thank you for your reply Edgar! I added a zero magnetic scalar potential to a point, and it now converges very quickly. According to the response in this other thread (https://www.comsol.com/forum/thread/40499/zero-magnetic-scalar-potential-which-boundaries-to-define) you can put the zero potential anywhere in the model. However, there was a significant difference in the field depending on if I put the zero point in the middle of the cylinder, or on the corner of the outer box of air. Do you know if there is a more or less correct location to place the zero potential?

Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 2 weeks ago 07.04.2025, 11:17 GMT-4

Hm, only the magnetic scalar potential Vm should be shifted by the placement of the BC, but not the magnetic field H. Normally I place the BC on one of the outer points, but as said before it shouldn't affect the field. The zero potential BC only makes sure that the solver can find an unambiguous solution for the potential field. Adding any constant to the potential field doesn't change the magnetic field.

-------------------
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Hm, only the magnetic scalar potential Vm should be shifted by the placement of the BC, but not the magnetic field H. Normally I place the BC on one of the outer points, but as said before it shouldn't affect the field. The zero potential BC only makes sure that the solver can find an unambiguous solution for the potential field. Adding any constant to the potential field doesn't change the magnetic field.

Reply

Please read the discussion forum rules before posting.

Please log in to post a reply.

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.