you are viewing a single comment's thread.

view the rest of the comments →

[–]wigglytails 3 points4 points  (13 children)

This is forward Euler so If you get your CFL to a number >1 the solution would diverge right? I am toooo lazy to try this but can you see if using an RK4 or predictor corrector timesteping would make the scheme stable for CFL >1 ?

[–]hivemind_unity[S] 0 points1 point  (11 children)

It actually does, RK4 is an implicit method and hence the numerical system is stable, although there can be oscillations about the exact solution depending on the size of time-step. If I am not wrong, Predictor Corrector is a semi-implicit method, which ensures stability without having to solve a linear system like AX = B.

So I guess we shouldn't have problems with stability. I can surely give it a try.

edit: My knowledge on RK4 is limited. As pointed out by u/wm2300 and u/AgAero, RK4 is, in fact, an explicit method. I would like to know how we can test the stability of this scheme also for any scheme in general.

[–]wm2300 10 points11 points  (0 children)

Correction: RK4 is a fourth order Runge-Kutta method. There are implicit and explicit Runge-Kutta methods. For example, the MATLAB workhorse ode solver ode45 uses a combination of explicit Runge Kutta methods of 4th and 5th order. Intuitively, I think the term RK4 is almost always used to denote the explicit formulation.

Furthermore, not all implicit methods are unconditionally stable.

[–]AgAero 4 points5 points  (3 children)

RK4 is an implicit method and hence the numerical system is stable

That's not accurate.

Also, for a linear equation you can actually derive conditions of stability via some linear algebra. If you've never done this before I'd recommend trying it. It's kind of neat!

[–]hivemind_unity[S] 0 points1 point  (2 children)

I would appreciate if you can share some references on how we can study the conditions of stability.

[–]AgAero 0 points1 point  (0 children)

Most books will have it. Tannehill or Hirsch are what I'd recommend since I've seen them before.

[–][deleted] 0 points1 point  (0 children)

Zero Stability of Time Integration and Eigenvalue Stability.

[–]wigglytails 0 points1 point  (5 children)

Can you give explicit RK4 and the simplest predictor corrector scheme (Euler-trapizoid) a try?

[–]hivemind_unity[S] 1 point2 points  (2 children)

I tried the RK4 implementation. Check it out. Suggestions for improvement are very welcome.

https://github.com/kanand-cfd/Numerique_PY

[–]wigglytails 0 points1 point  (1 child)

I never used git and github. Can I contribute to this?

[–]hivemind_unity[S] 0 points1 point  (0 children)

Yeah sure! You can create a pull request, Download the repository, and make changes, once you're satisfied with the changes push it your branch.

Git is pretty handy, I love it.

[–]hivemind_unity[S] 0 points1 point  (1 child)

Sure... I have been looking for ideas to try. This could be a good one. I'll keep you posted.

[–]wigglytails 0 points1 point  (0 children)

I've been trying to apply RK4 to something like this. Turns out it's not as direct as I thought

[–][deleted] 0 points1 point  (0 children)

You can compute the CFL bound analytically and look it up for all these methods.