Clear Filters
Clear Filters

Using the backward Euler and upwinding to solve the viscous Burgers equation

3 views (last 30 days)
I wish to solve the following partial differential equation:
I have had some success using the backward Euler method for other linear equations and the upwinding approach. When I have tried it for the viscous burgers equation, it seems to have failed after the first step, and I have no idea why.
Can anyone point to where it seems to have gone wrong?

Accepted Answer

Mat Hunt
Mat Hunt on 14 Jul 2023
This issue was the size of b, I reduced this and it worked perfectly. I find this odd as backward Euler is touted to be unconditionally convergent.

More Answers (1)

Torsten
Torsten on 14 Jul 2023
Moved: Torsten on 14 Jul 2023
Why don't you use ode15s to solve the semi-discretized system of ordinary differential equations ?
Look up "method-of-lines" for more details.
Or even better: "pdepe" is your friend.
  5 Comments
Torsten
Torsten on 14 Jul 2023
Edited: Torsten on 14 Jul 2023
Advanced integration methods make the solvers more sensitive, and they might give up even if continuing would still yield a good solution. But integrating without adaptive stepsize to control the error you make in the solution is no alternative in my opinion.
But I don't want to critisize your coding - I have the impression that you work responsibly :-)
Mat Hunt
Mat Hunt on 14 Jul 2023
Coding up is not the problem, it's the numerical method that is the thing which is somewhat elusive.

Sign in to comment.

Categories

Find more on Programming in Help Center and File Exchange

Products


Release

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!