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.

Tracking Residual

Please login with a confirmed email address before reporting spam

I need to track the residual in my simulation in order to represent how closely the governing equations are being represented. I know comsol keeps track of residual since ive had several errors referring to it. Post processing doesnt have residual as a specific plotting value as far as i know.

Do i need to use a specific solver which uses residual? Does any one know how to access its value? I can use matlab live link if necessary.

4 Replies Last Post Jul 5, 2016, 8:04 p.m. EDT
Ivar KJELBERG COMSOL Multiphysics(r) fan, retired, former "Senior Expert" at CSEM SA (CH)

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Apr 4, 2011, 1:12 a.m. EDT
Hi

you have an interesting remark there, I would also like to see more in the log, there is a log "detailed" option in the solver node, but it mainly adds the scaling factors, a "verbose" option in addition could sometime help.

The convergence plotting is supposed to come back in one of the next version I have heard

--
Good luck
Ivar
Hi you have an interesting remark there, I would also like to see more in the log, there is a log "detailed" option in the solver node, but it mainly adds the scaling factors, a "verbose" option in addition could sometime help. The convergence plotting is supposed to come back in one of the next version I have heard -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Jul 26, 2013, 2:27 p.m. EDT
Hi,

I've got a similar question. Is there any way to export the residuals to MATLAB for each time step? I mean I need to do some algebra on residual of each cell.

Thanks,
Farid
Hi, I've got a similar question. Is there any way to export the residuals to MATLAB for each time step? I mean I need to do some algebra on residual of each cell. Thanks, Farid

Please login with a confirmed email address before reporting spam

Posted: 9 years ago Mar 9, 2016, 3:21 a.m. EST
As of Comsol 5.2, one can now plot residual(u), provided they enable storing the residual in output under "Advanced" solver settings. That has already saved me hours to days of time, because looking at the residual is much better than guessing; without this I would be following a false trail. (I used to use AMR for this, which tends to refine in problematic areas, but that was a bit too indirect and hard to see in 3D models.)
As of Comsol 5.2, one can now plot [b]residual(u)[/b], provided they enable storing the residual in output under "Advanced" solver settings. That has already saved me hours to days of time, because looking at the residual is much better than guessing; without this I would be following a false trail. (I used to use AMR for this, which tends to refine in problematic areas, but that was a bit too indirect and hard to see in 3D models.)

Please login with a confirmed email address before reporting spam

Posted: 8 years ago Jul 5, 2016, 8:04 p.m. EDT

As of Comsol 5.2, one can now plot residual(u), provided they enable storing the residual in output under "Advanced" solver settings. That has already saved me hours to days of time, because looking at the residual is much better than guessing; without this I would be following a false trail. (I used to use AMR for this, which tends to refine in problematic areas, but that was a bit too indirect and hard to see in 3D models.)


Hi Evgeni,

That's right. I tried "residual" operator for "Darcy's Law" to get the residuals for flow velocity field. It worked and I was able to plot "error vs. time". BUT when I want to use it for "Transport of Dilute Solution in Porous Media" physics for "concentration" , it does not work. It just shows me an empty geometry without any saved result. Do you have any idea about plotting error vs. time for solute transport problems? The dependent variable is "concentration (c)" in these problems.

Thanks,
Mehrdad
[QUOTE] As of Comsol 5.2, one can now plot [b]residual(u)[/b], provided they enable storing the residual in output under "Advanced" solver settings. That has already saved me hours to days of time, because looking at the residual is much better than guessing; without this I would be following a false trail. (I used to use AMR for this, which tends to refine in problematic areas, but that was a bit too indirect and hard to see in 3D models.) [/QUOTE] Hi Evgeni, That's right. I tried "residual" operator for "Darcy's Law" to get the residuals for flow velocity field. It worked and I was able to plot "error vs. time". BUT when I want to use it for "Transport of Dilute Solution in Porous Media" physics for "concentration" , it does not work. It just shows me an empty geometry without any saved result. Do you have any idea about plotting error vs. time for solute transport problems? The dependent variable is "concentration (c)" in these problems. Thanks, Mehrdad

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.