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 errors

Please login with a confirmed email address before reporting spam

Hello,

I start from zero to invistigate the 1D pulse propagation equation as

a*du/dt+du/dx=0

here a is a constant, x, t are the corresponding spatial and time coordinate.

For an input pulse with smooth time derivative,e.g. a Gaussian pulse, my naive numerical impression is that the solusion will be a Gaussian pulse propagating forward without distortion. Physically it could be any format of wave, i.e. fluid, electromagnetic or heat.

In Comsol, I use general form of PDE to represent the equation, using an Gaussin pulse at one boundary side and absorption at another boundary. Attached is my model.

I plot the u in both linear and lorgarithm scale. The leading edge of the pulse is relative smooth except a small bending, but the trailing edge has significant oscillation. The oscillation can be suppressed by decrease the tolerance, e.g. from 1e-3 to 1e-6 or even lower. However, the oscillation is still there as the computation time increases significantly.

I'm not fully understanding the numerical aspect of the solver in terms of error control. In terms of error control,
Are there other efficient ways to supress such oscillations? For example, some more general boundary conditions including time-derivative.








4 Replies Last Post Mar 21, 2011, 4:32 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 Mar 21, 2011, 10:47 a.m. EDT
Nice example

if you turn to BDF you change the shapes but not the behavior

by the way I find it easier to see the graphical log sales, but I agree they are not always "remembered"

It gives you a feeling of the numerical precisions around 1:10E6 or 1-10 ppm not that bad


--
Good luck
Ivar
Nice example if you turn to BDF you change the shapes but not the behavior by the way I find it easier to see the graphical log sales, but I agree they are not always "remembered" It gives you a feeling of the numerical precisions around 1:10E6 or 1-10 ppm not that bad -- Good luck Ivar

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 21, 2011, 12:59 p.m. EDT
Hi Ivar,

Thanks for the comments.

The ugly part is that if I add a nonlinear term, I'm worrying how much this oscillation will be explosively enhanced.

Without nonlinear term, to decrease the tolerance from 1e-6 to 1e-10, the simulation time increases from tens of second to thousands of seconds on a relative old desktop PC. A 4-core CPU might help a bit but not that much.
But still at the leading edge, a constant bending around 1e-6 is there, I guess it might be some system inbuilt deform or some kind of change in nonlinear coefficient in the algorithm.

With nonlinear term, it might be painful to test this. At least as I understand, the current 4.1 version is not optimized for the speed.

In most linear PDE case, tolerance of 1e-3 might give a relative good curve, but I suspect that not many people test the stability/convergence range for a nonlinear PDE case or even a linear case. Some friends told me that high-order spatial derivatives might help rather than the first-order derivative only. In this sense, I guess it's a problem of the algorithm itself and related robust damping scheme.

Anyway, I think this kind of transient issues are universal for lots of problem. I hope there might be some software updates to tackle this problem.

Yaohui
Hi Ivar, Thanks for the comments. The ugly part is that if I add a nonlinear term, I'm worrying how much this oscillation will be explosively enhanced. Without nonlinear term, to decrease the tolerance from 1e-6 to 1e-10, the simulation time increases from tens of second to thousands of seconds on a relative old desktop PC. A 4-core CPU might help a bit but not that much. But still at the leading edge, a constant bending around 1e-6 is there, I guess it might be some system inbuilt deform or some kind of change in nonlinear coefficient in the algorithm. With nonlinear term, it might be painful to test this. At least as I understand, the current 4.1 version is not optimized for the speed. In most linear PDE case, tolerance of 1e-3 might give a relative good curve, but I suspect that not many people test the stability/convergence range for a nonlinear PDE case or even a linear case. Some friends told me that high-order spatial derivatives might help rather than the first-order derivative only. In this sense, I guess it's a problem of the algorithm itself and related robust damping scheme. Anyway, I think this kind of transient issues are universal for lots of problem. I hope there might be some software updates to tackle this problem. Yaohui

Jim Freels mechanical side of nuclear engineering, multiphysics analysis, COMSOL specialist

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 21, 2011, 1:57 p.m. EDT
A logical nonlinear extension to your problem is the classical Burger's equation (in 1D):

du/dt+u du/dx=0

This classical problem is well known to require some amount of artificial dissipation in order to provide smooth, monotonic, and stable solutions. Further, with the right type of artificial dissipation, the solution will be consistent. Since you are in PDE mode, that is the challenge at hand.
A logical nonlinear extension to your problem is the classical Burger's equation (in 1D): du/dt+u du/dx=0 This classical problem is well known to require some amount of artificial dissipation in order to provide smooth, monotonic, and stable solutions. Further, with the right type of artificial dissipation, the solution will be consistent. Since you are in PDE mode, that is the challenge at hand.

Please login with a confirmed email address before reporting spam

Posted: 1 decade ago Mar 21, 2011, 4:32 p.m. EDT
Hi James,

Quite interesting type of equation for reference. I will try to search for some related numerical hints.

What I have in mind is the nonlinear schrondinger's equation

b*d^2u/dt^2+a*du/dt+du/dx=f(u)

where b is zero, but f(u) might be an arbitrary function of u.
Hi James, Quite interesting type of equation for reference. I will try to search for some related numerical hints. What I have in mind is the nonlinear schrondinger's equation b*d^2u/dt^2+a*du/dt+du/dx=f(u) where b is zero, but f(u) might be an arbitrary function of u.

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.