Resources‎ > ‎

Computational Physics Resources

Demo Programs

The programs given in this page are all written in FORTRAN 90 language. To download a program, please click on the download button near the respective program.

  1. To test whether a given number is prime : demo.f90 Download
Concepts involved :
  • do-enddo loop
  • if-endif conditional statement
  • mod function
  1. To solve a 1st order ODE with Euler's method :  diff.f90 Download
Concepts involved :
  • do-enddo loop
  • FORTRAN function
  1. To solve an algebraic equation with bisection method :  bisect.f90 Download
Concepts involved :
  • do-enddo loop
  • if-endif conditional statement
  • FORTRAN function
  1. Solving the Simple Harmonic Oscillator equations :  shm.f90 Download     rk4.f90 Download 
Concepts involved :
  • open function 
  • FORTRAN function
  • 2nd order ODE
  • Runge-Kutta order 4 method
  • Limitations of Euler's method
  1. Solving the Coupled Nonlinear Oscillator of 3rd Order (Chua's Circuit) :  chua.f90 Download
Concepts involved :
  • Use of FORTRAN module (module is included in the program)
  • Demonstration of Chaos