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.

Will change relative tolerance results in quite different results?

Please login with a confirmed email address before reporting spam

Hi,

I always encounter the problem that "Failed to find a solution.
The relative error (0.032) is greater than the relative tolerance.
Returned solution is not converged." Usually, I change the relative
tolerance of the solver and it works, but I don't know whether this
change will make the simulation a big difference. Could you help to answer?


4 Replies Last Post 23.12.2014, 07:36 GMT-5

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 04.09.2012, 18:39 GMT-4
I am also interested in learning more about this. If decreasing the tolerance would give misleading results, how can we overcome this error in another way?

--
Tolga
I am also interested in learning more about this. If decreasing the tolerance would give misleading results, how can we overcome this error in another way? -- Tolga

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 05.09.2012, 03:07 GMT-4
Hi,


I have not studied tolerance errors systematically, but I can share my limited knowledge on the subject but not so much from the structural mechancis perspective.


1. Obvious thing is that if your relative tolerance is less tighter, you diverge from the actual solution because you accumulate errors at each iteration or step. Of course, this depends on the specific problem. I have many analyses in which increasing relative tolerance from 0.001 to 0.01 has allowed me to complete the solution process but have got less accurate solution and in fact large mass balance errors. This is not desirable. On the other hand, I have some analyses in nonlinear static structural mechanics wherein I did not notice too much of a difference.

2. Also I relax the tolerance a lot of times just to get qualitative information quickly.

3. In general, if I am seeking an accurate solution, I take the following steps

(a) set relative tolerance typically to 0.001 (and specific cases < 0.001)
(b) set absolute tolerance to 1 to 2 orders of magnitude lower than the characteristic value of the dependent variable.
(c) check for spatial convergence, by a methodical refinement of mesh (local or global)
(d) check for the model response to different shape functions, including the order of the shape function (quadratic, linear, etc.). Of course not arbitrarily but depending upon the nature of the dependent variable.
(e) check for temporal convergence
(f) off late I also check for solver settings especially BDF versus Genaralized alpha as I had some inconsistent results.
(g) finally, verification is the key step.

Of course, these are all problem specific. For instance, if you try to solve strain localization type problem, then you have pathological mesh sensitivity, which takes you to a different level of problem treatment, when you talk of convergence.


Suresh
Hi, I have not studied tolerance errors systematically, but I can share my limited knowledge on the subject but not so much from the structural mechancis perspective. 1. Obvious thing is that if your relative tolerance is less tighter, you diverge from the actual solution because you accumulate errors at each iteration or step. Of course, this depends on the specific problem. I have many analyses in which increasing relative tolerance from 0.001 to 0.01 has allowed me to complete the solution process but have got less accurate solution and in fact large mass balance errors. This is not desirable. On the other hand, I have some analyses in nonlinear static structural mechanics wherein I did not notice too much of a difference. 2. Also I relax the tolerance a lot of times just to get qualitative information quickly. 3. In general, if I am seeking an accurate solution, I take the following steps (a) set relative tolerance typically to 0.001 (and specific cases < 0.001) (b) set absolute tolerance to 1 to 2 orders of magnitude lower than the characteristic value of the dependent variable. (c) check for spatial convergence, by a methodical refinement of mesh (local or global) (d) check for the model response to different shape functions, including the order of the shape function (quadratic, linear, etc.). Of course not arbitrarily but depending upon the nature of the dependent variable. (e) check for temporal convergence (f) off late I also check for solver settings especially BDF versus Genaralized alpha as I had some inconsistent results. (g) finally, verification is the key step. Of course, these are all problem specific. For instance, if you try to solve strain localization type problem, then you have pathological mesh sensitivity, which takes you to a different level of problem treatment, when you talk of convergence. Suresh

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago 25.08.2013, 06:56 GMT-4

(c) check for spatial convergence, by a methodical refinement of mesh (local or global)
(d) check for the model response to different shape functions, including the order of the shape function (quadratic, linear, etc.). Of course not arbitrarily but depending upon the nature of the dependent variable.


Hi Suresh,

I saw some of your guidelines for the solution accuracy. I also follow more or less all your steps you listed. But I would know more in detail the points:
- c. what do you mean for spatial convergence? how do you check it? I suppose it is like a qualitative monitoring of the solution (e.g. stress) in a point (using a probe for example), and see whether it is coherent or not with the "input" (in the case of stress, with the applying load e.g.). Or do you mean something else?
- d. I see you use Structural Mechanics. I use it as well, and Nonlinear solid mech quite often. How do you choose when using quadratic or linear shape functions (or even higher order)? For which kind of dependent variables you use a certain shape function instead of another? I usually use both and then I check the solution gap, but sometimes with quadratic shape function the computing time is far higher... so I was wondering if in some cases it is quite sufficient to use just linear shape functions.

Thank you in advance for your advices!

Kind regards
[QUOTE] (c) check for spatial convergence, by a methodical refinement of mesh (local or global) (d) check for the model response to different shape functions, including the order of the shape function (quadratic, linear, etc.). Of course not arbitrarily but depending upon the nature of the dependent variable. [/QUOTE] Hi Suresh, I saw some of your guidelines for the solution accuracy. I also follow more or less all your steps you listed. But I would know more in detail the points: - c. what do you mean for spatial convergence? how do you check it? I suppose it is like a qualitative monitoring of the solution (e.g. stress) in a point (using a probe for example), and see whether it is coherent or not with the "input" (in the case of stress, with the applying load e.g.). Or do you mean something else? - d. I see you use Structural Mechanics. I use it as well, and Nonlinear solid mech quite often. How do you choose when using quadratic or linear shape functions (or even higher order)? For which kind of dependent variables you use a certain shape function instead of another? I usually use both and then I check the solution gap, but sometimes with quadratic shape function the computing time is far higher... so I was wondering if in some cases it is quite sufficient to use just linear shape functions. Thank you in advance for your advices! Kind regards

Please login with a confirmed email address before reporting spam

Posted: 10 years ago 23.12.2014, 07:36 GMT-5
Note that with a fixed mesh and shape functions, even if the solver finds the best possible solution to machine precision, there will still be some error. In the case of a direct solver for a stationary study, the relative tolerance is just a check — essentially all it does is yield that error message. In the time-dependent case, it might either produce this message, or it might reduce the time step down to e.g. 1e-12, and then oscillate in that region. Either way, it means that there is something wrong with the model:

• Maybe the BCs are somehow poorly defined. (Don't forget that at least one point on the model must be Dirichlet.)

• Maybe the mesh is too coarse in regions where the shape of the flux cannot be easily represented by the shape functions (I privately call it "curvature of the flux", which is not strictly accurate).

• Maybe there are problems with singularities. These may arise when you have (a) internal corners, (b) different BCs meeting at non-right angles, (c) point sources. The first two may be effectively dealt with using fillets (as Comsol supports elements with curved mesh edges), and small sources are preferable to point sources.

Also, Suresh's checklist above is highly recommended. Also, I suggest look into GCI (Grid Convergence Index) for the spatial and temporal convergence studies. For me, these have revealed the parts of the model where there were problems. I find that the best references are Roache's 1994 paper proposing the GCI, and Oberkampf and Roy's book.
Note that with a fixed mesh and shape functions, even if the solver finds the best possible solution to machine precision, there will still be some error. In the case of a direct solver for a stationary study, the relative tolerance is just a check — essentially all it does is yield that error message. In the time-dependent case, it might either produce this message, or it might reduce the time step down to e.g. 1e-12, and then oscillate in that region. Either way, it means that there is something wrong with the model: • Maybe the BCs are somehow poorly defined. (Don't forget that at least one point on the model must be Dirichlet.) • Maybe the mesh is too coarse in regions where the shape of the flux cannot be easily represented by the shape functions (I privately call it "curvature of the flux", which is not strictly accurate). • Maybe there are problems with singularities. These may arise when you have (a) internal corners, (b) different BCs meeting at non-right angles, (c) point sources. The first two may be effectively dealt with using fillets (as Comsol supports elements with curved mesh edges), and small sources are preferable to point sources. Also, Suresh's checklist above is highly recommended. Also, I suggest look into GCI (Grid Convergence Index) for the spatial and temporal convergence studies. For me, these have revealed the parts of the model where there were problems. I find that the best references are Roache's 1994 paper proposing the GCI, and Oberkampf and Roy's book.

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.