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.

Numerical Derivative is Jagged

Please login with a confirmed email address before reporting spam

Hello, I'm modeling the unsteady state diffusion of a protein out of a hollow cylinder. Two plots I'm interested in are the cumulative mass release and the release rate. I obtained the former by integrating concentration over the domains the protein had diffused into and the latter by taking the time derivative of the cumulative release curve. However, my release rate graph has become very jagged. I've tried both decreasing the time step and refining the mesh to very small values, and while it has helped some, the curve is remains jagged and noisey. I read that because comsol works with derivatives and integrals numerically, taking the numerical derivative of a numerical integration can introduce a lot of noise as seen in my graph.

I attached my cumulative mass release plot where the integration gives a smooth curve, and the release rate where the time derivative of the integration becomes jagged. Is there any way to get rid of the jaggedness/noise that's introduced with taking a numerical derivative of a numerical integration?


2 Replies Last Post Apr 22, 2015, 12:27 p.m. EDT
Edgar J. Kaiser Certified Consultant

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Apr 22, 2015, 11:37 a.m. EDT
Hi Craig,

first of all, it doesn't look too bad. Derivatives of numerical data always generate some noise.

You could try to tighten the convergence criterion, i.e. the tolerance factor in termination criteria to achieve higher precision.

Cheers
Edgar

--
Edgar J. Kaiser
emPhys Physical Technology
www.emphys.com
Hi Craig, first of all, it doesn't look too bad. Derivatives of numerical data always generate some noise. You could try to tighten the convergence criterion, i.e. the tolerance factor in termination criteria to achieve higher precision. Cheers Edgar -- Edgar J. Kaiser emPhys Physical Technology http://www.emphys.com

Please login with a confirmed email address before reporting spam

Posted: 10 years ago Apr 22, 2015, 12:27 p.m. EDT
Thanks for the response Edgar,

Decreasing the tolerance did the trick for smoothing out the curves, which now seems obvious in hindsight.

That makes sense about the noise too, I'm probably still just used to analytical solutions that give perfectly smooth curves.

Thanks, Craig
Thanks for the response Edgar, Decreasing the tolerance did the trick for smoothing out the curves, which now seems obvious in hindsight. That makes sense about the noise too, I'm probably still just used to analytical solutions that give perfectly smooth curves. Thanks, Craig

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.