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.

Simulation not terminating once error is smaller than defined tolerance

Please login with a confirmed email address before reporting spam

When using comsol 4.4 (and using segregated groups) to solve a problem involving natural convection, I am noticing that simulations do not stop even when the error in each group is below the defined relative tolerance. This happens despite having imposed “tolerance” as termination technique for the segregated groups (inside each segregated step I am using “iterations” as termination technique, using 1-3 in particular). For convenience, I have attached the file in question. Is this a result of a wrong definition in the simulation setup or is it something that should not happen? Thank you


4 Replies Last Post 2014/01/22 4:31 GMT-5
Zoran Vidakovic, COMSOL COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014/01/20 8:39 GMT-5
Dear Tiago,

Have a look at following discussion:
www.ch.comsol.com/community/forums/general/thread/35375
My colleague Henrik answers your question in one of his replies.

Also, I highly recommend you to read our recent blog series on solvers and meshing:
www.comsol.com/blogs/category/all/core-functionality/

All the best,
Zoran
Dear Tiago, Have a look at following discussion: http://www.ch.comsol.com/community/forums/general/thread/35375 My colleague Henrik answers your question in one of his replies. Also, I highly recommend you to read our recent blog series on solvers and meshing: http://www.comsol.com/blogs/category/all/core-functionality/ All the best, Zoran

Sven Friedel COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014/01/21 13:44 GMT-5
Hello Tiago,

I had a look at your particular model and it seems to me that it juist lacks a pressure constraint.
Your laminar flow problem has so far only by slip conditions, which just constrains the velocity (to be tangential) but is would allow solutions at any absolute pressure level. In other words: you have Neumann Boundaries only and your problem so far is non-unique, because pressure is unconstrained.
By setting the absolute pressure in one point you can add the missing gauge.

You will see that the absolute pressure difference in your system is very small 0.007 Pa, if you don't constrain the pressure, COMSOL could find a solution at any pressure level. In fact if you interrupt the solver in your original file you will find a solution at a total pressure of say 2 Pa, it is clear that the relative accuracy criterion is fulfilled, but still the solution cannot be called converged, because COMSOL tries not only to satisfy this one, but also achieve that with a damping of 1.
In our manual (search for "damped Newton methods") you find the note:

"The (automatically damped Newton) nonlinear solver only checks the convergence criterion if the damping factor for the current iteration is equal to 1. Thus, the solver continues as long as the damping factor is not equal to 1 even if the estimated error is smaller than the requested relative tolerance."
If you inspect the solver log the solver cannot achieve a damping of 1 but only 0.7.

Adding the pressure constraint, makes the problem unique and solves the issue that you encountered.
See my attached file solved.

Best regards,
Sven Friedel



Hello Tiago, I had a look at your particular model and it seems to me that it juist lacks a pressure constraint. Your laminar flow problem has so far only by slip conditions, which just constrains the velocity (to be tangential) but is would allow solutions at any absolute pressure level. In other words: you have Neumann Boundaries only and your problem so far is non-unique, because pressure is unconstrained. By setting the absolute pressure in one point you can add the missing gauge. You will see that the absolute pressure difference in your system is very small 0.007 Pa, if you don't constrain the pressure, COMSOL could find a solution at any pressure level. In fact if you interrupt the solver in your original file you will find a solution at a total pressure of say 2 Pa, it is clear that the relative accuracy criterion is fulfilled, but still the solution cannot be called converged, because COMSOL tries not only to satisfy this one, but also achieve that with a damping of 1. In our manual (search for "damped Newton methods") you find the note: "The (automatically damped Newton) nonlinear solver only checks the convergence criterion if the damping factor for the current iteration is equal to 1. Thus, the solver continues as long as the damping factor is not equal to 1 even if the estimated error is smaller than the requested relative tolerance." If you inspect the solver log the solver cannot achieve a damping of 1 but only 0.7. Adding the pressure constraint, makes the problem unique and solves the issue that you encountered. See my attached file solved. Best regards, Sven Friedel

Sven Friedel COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014/01/21 13:45 GMT-5
here comes my model

Sven
here comes my model Sven


Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 2014/01/22 4:31 GMT-5

here comes my model

Sven


Dear Sven, Zoran and Luke, Thank you very much for your input. It was indeed a lack of pressure constrain that caused the problem. Furthermore, by mistake, I was modeling the flow as compressible and that was increasing the degrees of freedom of the problem. After introducing the pressure constrain (and using incompressible flow model) the convergence problems disappeared for this geometry. Thank you.
[QUOTE] here comes my model Sven [/QUOTE] Dear Sven, Zoran and Luke, Thank you very much for your input. It was indeed a lack of pressure constrain that caused the problem. Furthermore, by mistake, I was modeling the flow as compressible and that was increasing the degrees of freedom of the problem. After introducing the pressure constrain (and using incompressible flow model) the convergence problems disappeared for this geometry. Thank you.

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.