dynamo.ode 682 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # This is a disk dynamo simulation of the earth's magnetic field.
  2. # It attempts to simulate the dramatic switch in the polarity
  3. # of the field that takes place every eon or so.
  4. #
  5. # Source: Michael Steele, B.A. thesis, Reed College, 1981 (Physics)
  6. # You may run this example by doing:
  7. #
  8. # ode < dynamo.ode | graph -T X -C
  9. #
  10. # or alternatively, to get a real-time plot,
  11. #
  12. # ode < dynamo.ode | graph -T X -C -x 0 10 -y -10 10
  13. #
  14. # The equations are:
  15. #
  16. # w' = Q -zy - Vw
  17. # y' = S( Az - y)
  18. # z' = wy - z
  19. # S = 5
  20. # V = 1
  21. # Q = 14.625
  22. # A = 1
  23. A = 1
  24. V = 1
  25. Q = 14.625
  26. S = 5
  27. w' = Q - z * y - V * w
  28. y' = S * ( A * z - y)
  29. z' = w * y - z
  30. w = 1
  31. y = 1
  32. z = 1
  33. print t, z
  34. step 0, 10, .01