Hi everyone,(adsbygoogle = window.adsbygoogle || []).push({});

I've a little problem with my algorithm.

I have two grids: one for time and the other one for the radius.

I need to evaluate this equation:

[tex]\frac{d\beta(r,t)}{dt}=A\beta(r,t)^N[/tex]

I try solving this with a simple Runge Kutta II method, but I'm not convinced at all that this works properly.

Let's check my code:

k1 = deltaT*(-A*beta(i,j-1)**N

k2 = deltaT*(-A*(beta(i,j-1)+k1/2.)**N)

beta(i,j) = beta(i,j-1) + k2

What do you think about that?

This is not the simplest case, just the one you can read in Numerical Recipes ...

P.S.:

beta(i,j) mean beta at r_i and t_j

so i and j referes to radius and time grid respectively

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Problems with Runge-Kutta method

Loading...

Similar Threads - Problems Runge Kutta | Date |
---|---|

A Solving an ODE Eigenvalue Problem via the Ritz method | Wednesday at 10:17 AM |

Runge Kutta -coupling problem | Jun 10, 2011 |

Runge-Kutta problem | Nov 30, 2010 |

Runge Kutta 4: problems in application in computer simulation | Oct 29, 2004 |

**Physics Forums - The Fusion of Science and Community**