Physics 329: Solution of ODEs
Please report all errors/typos. etc to
[email protected]
- General Reference
- Source code covered in class can be found on
the phy329 account on einstein in
~phy329/ode/ex1 and ~phy329/ode/ex2
- Lectures 1 and 2 (Nov 18 and 20)
- lsoda.f ODEPACK
routine for solving general systems of ODEs.
- tlsoda.f Sample
driver routine which uses lsoda to integrate
u''(x) = -u(x). Sample
usage on SGIs.
Plot of computed
and exact solution on x = [0 .. 15] with all error tolerances
set to 1.0d-6. Plot of
error in computed solution.
- Lecture 3 (Nov 22)
- integral.f:
Driver routine illustrating use of LSODA (ODE integrator)
to compute definite integral.
fcn.f:
User function which defines integrand.
Makefile
- 2body.f:
Driver routine illustrating use of LSODA to solve restricted
2-body gravitational problem (one body non-gravitating).
fcn.f:
User function which implements equations of motion.
Makefile
- Lecture 4 (Nov 25)
- Equations of motion
for orbiting dumbbell problem.
- dumb.f:
Driver routine for solution of orbiting-dumbbell problem.
fcn.f:
User function which implements equations of motion.
Makefile
- Plots of omega (angular frequency of dumbbell about its
center of mass) versus time for a
circular orbit
and for an
elliptical orbit.
Note the "chaotic" nature of omega in the latter case.
Detail
of omega for the elliptical orbit.
- Plots illustrating energy conversation for elliptical
orbit (chaotic case).
Energy quantities
computed with LSODA tolerance 1.0e-6.
Top to bottom: Translational
kinetic energy, rotational kinetic energy, total energy,
gravitational potential energy. In this case, "non-conversation"
of total mechanical energy is a good sign that we need to
make the error tolerance more stringent.
Energy quantities
computed with LSODA tolerance = 1.0e-12. Note that
energy conservation is improved in this case.
Plot of
rotational kinetic energy.