CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Runge Kutta 4th Order Source Code (

sugu February 4, 2002 05:50

Runge Kutta 4th Order Source Code
Hi all. I need the source code for solving ODE using 4th order R.K method. I am not good at programming, but my research needs me to simulate fluid flow inside a micro channel. Is there anyone who can help me to develop a small programme? I am quite desperate now. Below is the rough equation (ca, w, b, and sin(theta) are constants). I need the graph for s-x. Any volunteers?

ds/dx = Ca/w [s**3/2(1/s**3 + 1/(1-s)**3)-Bsin(theta)]

Christian Holm February 4, 2002 06:35

Re: Runge Kutta 4th Order Source Code

Have you looked in the book : "Numerical Recipes in ***", where *** can be Pascal, C, C++ and Fortran (maybe there are more programming languages available). The book is from Cambridge University Press and is written by Press et al.

It is VERY good. I have it for Pascal (unfortunately they claim that the market for Delphi is too small), and I have used it a lot.

Cheers Christian

Junseok Kim February 4, 2002 23:46

Re: Runge Kutta 4th Order Source Code
I can help you, would you send me an email with more informations, related papers or the values of constants, initial contitions, etc.

And what kind of formats of programming do you want? Matlab, C, C++, f77, f90, Mathematica, etc. Actually, Matlab has Runge Kutta 4th Order routinue.

gvpraveen16 October 25, 2012 20:53

Hey guys!! I have a question regarding solution of a 3rd order ODE using 4th order Runge Kutta technique.
The function is

f= 0.5(3y-y^3)+k(3y^3-2y-y^7)

and should plot graphs between y vs f and y vs df/dy for different values of the constant k. The initial and final values of y are -1 and 1 and delta(y)=0.005. Please do help as all examples for this method show two variables and time dependency whereas the above function is time independent and has only one variable. Awaiting your reply

cfdnewbie October 26, 2012 03:15

So what exactly is your question? You can program it up and plot it, if you have matlab, that would be a good choice!

All times are GMT -4. The time now is 03:25.