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.

Finding divergence

Please login with a confirmed email address before reporting spam

Hello,

I'm running a transport of diluted species model which employs reactions and a highly complex geometry and I am running into convergence issues.

I wish to find where convergence may be an issue so I can address it, is there any way I can directly find out? I'm aware of inspecting mesh quality as a solution, but I'm wondering if there are other ways to see directly where the divergence is taking place.


1 Reply Last Post 25.05.2022, 17:59 MESZ
Jeff Hiller COMSOL Employee

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 25.05.2022, 17:59 MESZ

Hello William,

There are a couple of misconceptions here.

  1. Absence of convergence is not divergence. Divergence would mean that the residual grows without bounds. Convergence, in the context of simulation software, means that the residual is smaller than a certain value (set to a default by the software or modified by the user). In some cases, "reaching convergence" may simply mean adjusting your expectations of how small an error can be obtained from a given discretization, or refining the mesh to give the software a fighting chance of reaching as accurate a solution as you're requesting, or providing better initial conditions (for nonlinear problems), or ramping up loads parametrically to guide the solver.
  2. Convergence (or lack thereof) is not a local property. It's a trait of the solution process and therefore involves the entire geometry. While it's certainly possible that you did something in one specific location in your model that's causing the solver not to converge, it's not necessarily the case. In your field, consider for instance a flow problem where you'd specify that a species appear through reactions and do not allow that species to leave the system; clearly there is no stationary solution to that problem and you will not get convergence. That lack of convergence is not triggered by any particular location in the model. Another example is a Navier Stokes flow problem where you don't specify the pressure anywhere - it does not have a single solution and therefore the solver cannot converge but it's not any specific location's fault! Anyways, these are only a couple of examples. There are many possible causes for convergence not to be reached, and equally many ways to address them. The COMSOL blog discusses many such solutions (Search the blog for "convergence"). If you need further and more specific help, I'd recommend you describe in detail and in mathematical terms what you're trying to model and include your .mph file so users of this Discussion Forum can see how you set things up.

Best,

Jeff

-------------------
Jeff Hiller
Hello William, There are a couple of misconceptions here. 1. Absence of convergence is not divergence. Divergence would mean that the residual grows without bounds. Convergence, in the context of simulation software, means that the residual is smaller than a certain value (set to a default by the software or modified by the user). In some cases, "reaching convergence" may simply mean adjusting your expectations of how small an error can be obtained from a given discretization, or refining the mesh to give the software a fighting chance of reaching as accurate a solution as you're requesting, or providing better initial conditions (for nonlinear problems), or ramping up loads parametrically to guide the solver. 2. Convergence (or lack thereof) is not a local property. It's a trait of the solution process and therefore involves the entire geometry. While it's certainly possible that you did something in one specific location in your model that's causing the solver not to converge, it's not necessarily the case. In your field, consider for instance a flow problem where you'd specify that a species appear through reactions and do not allow that species to leave the system; clearly there is no stationary solution to that problem and you will not get convergence. That lack of convergence is not triggered by any particular location in the model. Another example is a Navier Stokes flow problem where you don't specify the pressure anywhere - it does not have a single solution and therefore the solver cannot converge but it's not any specific location's fault! Anyways, these are only a couple of examples. There are many possible causes for convergence not to be reached, and equally many ways to address them. The COMSOL blog discusses many such solutions (Search the blog for "convergence"). If you need further and more specific help, I'd recommend you describe in detail and in mathematical terms what you're trying to model and include your .mph file so users of this Discussion Forum can see how you set things up. Best, Jeff

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.