Comments (2)
Hi,
the problem is that you are trying to use an extremely high accuracy order (60) on an equidistant grid. The finite difference method is inherently unstable in that case. The reason is the so-called Runge phenomenon, which also appears for Lagrange interpolators of high order. To avoid that, you would have to use a non-equidistant grid. With finite difference methods, you would normally want to find the sweet spot between performance, accuracy and stability. Personally, in practice, I wouldn't go higher than order 6. If you need higher accuracy orders, for instance because you can only afford to calculate on a coarse grid, then you should consider spectral methods. If you have periodic boundary conditions, then Fourier methods would be the way to go. If you have a non-periodic case, Chebyshev methods are a great spectral method. The cost for that is to use a non-equidistant grid, though. For a great practical introduction to spectral methods, I can highly recommend "Spectral Methods with MATLAB" by Lloyd Trefethen.
Best regards,
Matthias
from findiff.
Thanks for the fast reply Matthias,
okay than it is a general issue i cannot avoid. The gererall thing is, that i try to reproduce a papers outcome on an equation like
dw/dt = A * d^4w/dx^4 + B * d^2w/dx^2 + C * w
using FowardTimeCentralSpace method and i cannot set dx and dy to their default values since it runs unstable in my case thats is why i tried higher accuracy to reduce the errors.
Lets see if i can handle Spectral Methods. I tried to avoid it since my time in understanding a new technique is limited.
Best regards
Lukas
from findiff.
Related Issues (20)
- multi dimensional coordinates HOT 1
- Derivatives for a single point in a vector space HOT 1
- PDEs HOT 1
- Using findiff to solve the stationary Schrödinger equation HOT 2
- Allow the user to specify difference method HOT 2
- Problems with the stencil matrix HOT 4
- Time-dependency HOT 2
- First Order Schemes HOT 1
- Replace math images by latex expressions HOT 2
- Analytic inversion of Vandermonde matrix HOT 5
- Outdated conda-forge builds HOT 2
- Higher accuracy derivatives in 3D HOT 3
- How are the higher order derivatives computed in your code? HOT 1
- integrals in boundary conditions? HOT 2
- DOC: Equations seem broken on documentation site HOT 1
- Input for non-uniform spacing HOT 2
- Single point derivative
- possible typo in theory section
- Numerical derivative?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from findiff.