Take the 2-minute tour ×
Computational Science Stack Exchange is a question and answer site for scientists using computers to solve scientific problems. It's 100% free, no registration required.

In principle, I know finite differences. In university, we discussed it and derived consistency and boundary conditions. But I am still left with a big question.

How to design a good finite difference scheme?

What should I do, that my solution does not oscillate or makes other weird things. When I look at a scheme, how can I decide, whether it's a good or bad one?

share|improve this question
2  
From the FAQ: If you can imagine an entire book that answers your question, you’re asking too much. That's certainly the case here. Please narrow the question by at least specifying what type of PDEs you're interested in: hyperbolic, parabolic, elliptic; linear or nonlinear; etc. –  David Ketcheson Nov 28 '12 at 17:45
    
I agree with David: this question is too broad, and answerable with entire books. Specifying an application or a specific class of problem would be helpful in narrowing its scope. –  Geoff Oxberry Nov 30 '12 at 7:14
add comment

closed as not a real question by David Ketcheson, Geoff Oxberry Nov 30 '12 at 7:15

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 9 down vote accepted

The quality of the scheme depends on the type of equation to be solved. You can check for dispersion and dissipation: the dominant error term for odd-order schemes is typically dissipative, while the dominant error term for even-ordered schemes is typically dispersive; it is true that some schemes, such as symmetric centered schemes, have only dispersive error terms (thanks to David Ketcheson for pointing this out).

If your solution is smooth, ie. no discontinuities, then central schemes are better than biased schemes.

If your solution not smooth, then upwind or upwind-biased schemes are required. A central scheme will generate oscillations. Filtering or artificial dissipation could be used to offset the oscillations though.

Downwind biasing is unstable.

If you are running a problem that has smooth and non-smooth regions, then you can look at schemes that adjust order and/or bias such as WENO or ENO schemes.

One approach to determine stability of a method is the Von Neumann Stability Analysis where you substitute a solution in the form of a Fourier series into your equation and see whether the disturbances are amplified or not.

Almost all stability methods only work on linear PDE's, but some insight can be made into non-linear stability from those approaches.

The other issue that often arises is grid quality. Some schemes will tolerate a non-uniform grid just fine while others go unstable if used on a non-uniform grid. Typically higher order schemes are more sensitive to grid issues than lower order schemes.

The last thing to check is conservation, if that matters. You may come up with a numerical scheme that is consistent but not conservative. If it is conservative then it is a telescoping series and you should be left with only the boundary terms in your series when summed over a grid. Which makes sense intuitively, what comes in goes out.

In aerodynamics, the classic example of this is the 1970 Murman-Cole scheme for transonic flow calculations. The scheme is used to solve the transonic potential equations. But the original formulation actually gave answers closer to real life than it should, it showed viscous effects and non-linear effects that it shouldn't have shown. In 1973, Murman found the issue and published a correction to make the scheme conservative. The answer got "better" in the sense that it showed the solution expected for the equation solved, but that solution was further from the real, physical solution. So practitioners still use the non-conservative form because it happened to give a more physical answer, despite such an answer not being a solution to the equation it is supposed to solve. Sometimes being wrong is lucky.

share|improve this answer
    
How can one infer stability for non-linear PDEs? Btw, thanks for your answer, there's a lot to learn for me ;-) –  vanCompute Nov 25 '12 at 21:00
1  
If it's not stable for linear, then it won't be for non-linear. If it's stable for a linear equation at a CFL number $C$, then in the non-linear case you know the CFL number is at most $C$ but may be less. There are some techniques that can be used but most often they aren't, it's just easier to see if it's stable for linear equations and then try it for non-linear. –  tpg2114 Nov 25 '12 at 21:03
1  
This statement is not correct: "typically odd ordered schemes have dissipation but no dispersion, and even ordered schemes have dispersion but no dissipation." What is true is that the dominant error term for odd-order schemes is typically dissipative, while the dominant error term for even-ordered schemes is typically dispersive. It is true that some schemes, such as symmetric centered schemes, have only dispersive error terms. –  David Ketcheson Nov 28 '12 at 17:40
    
@DavidKetcheson Thanks for the correction, the answer has been updated to reflect it. –  tpg2114 Nov 28 '12 at 17:48
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.