Hi all!
I'm trying to model a differential equation having to do with free fall, using RK4 and Fortran 90. The equation is:
[tex]\ddots{y}(t)=-g \frac{R^2}{y^2}[/tex]
The code is attached in caidalibre.f90
The big problem is that function f(y,v,t) returns an unexpected value within the main program. Moreover, the program yields results which would indicate the object is ascending, and not descending. Any insight will be greatly appreciated.
Cheers!
PS: I am using
gfortran
Using built-in specs.
Target: powerpc-apple-darwin8.9.0
Configured with: ../gcc-4.3-20070810/configure --enable-threads=posix --enable-languages=fortran
Thread model: posix
gcc version 4.3.0 20070810 (experimental)
I'm trying to model a differential equation having to do with free fall, using RK4 and Fortran 90. The equation is:
[tex]\ddots{y}(t)=-g \frac{R^2}{y^2}[/tex]
The code is attached in caidalibre.f90
The big problem is that function f(y,v,t) returns an unexpected value within the main program. Moreover, the program yields results which would indicate the object is ascending, and not descending. Any insight will be greatly appreciated.
Cheers!
PS: I am using
gfortran
Using built-in specs.
Target: powerpc-apple-darwin8.9.0
Configured with: ../gcc-4.3-20070810/configure --enable-threads=posix --enable-languages=fortran
Thread model: posix
gcc version 4.3.0 20070810 (experimental)