Tracking Residual

Thread index  |  Previous thread  |  Next thread  |  Start a new discussion

RSS FeedRSS feed   |   Email notificationsTurn on email notifications   |   4 Replies   Last post: July 6, 2016 12:04am UTC
Jonathan Olsen

Jonathan Olsen

April 3, 2011 8:10pm UTC

Tracking Residual

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.

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Ivar Kjelberg

Ivar Kjelberg

April 4, 2011 5:12am UTC in response to Jonathan Olsen

Re: Tracking Residual

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

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Farid Behzad

Farid Behzad

July 26, 2013 6:27pm UTC in response to Ivar Kjelberg

Re: Tracking Residual

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

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Evgeni Sergeev

Evgeni Sergeev

March 9, 2016 8:21am UTC in response to Farid Behzad

Re: Tracking Residual

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.)

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse

Mehrdad Bastani

Mehrdad Bastani

July 6, 2016 12:04am UTC in response to Evgeni Sergeev

Re: Tracking Residual


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

Reply  |  Reply with Quote  |  Send private message  |  Report Abuse


Rules and guidelines