Moving Stars Around

From Micasim

Jump to: navigation, search


Project ACS
Project Lead Piet Hut
Project Homepage ACS

This is a wiki import, and, eventually, update of Piet Hut's and Jun Makino's Moving Stars Around.

If you add or edit any pages below, at the top please include a link back to this page using the text:

[[Moving Stars Around|Table of Contents]]

0. Preface

1. The Universe in a Computer

  1. Gravity
  2. Galactic Suburbia
  3. Globular Clusters
  4. Galactic Nuclei
  5. Star Forming Regions
  6. Open Clusters
  7. Writing your own star cluster simulator

2. The Gravitational N-Body Problem

  1. Background
  2. Our Setting
  3. Fun and Profit
  4. What is the Problem, and why N and Bodies?

3. The Gravitational 2-Body Problem

  1. Absolute Coordinates
  2. Coordinate Systems
  3. A Fourth Point
  4. Center of Mass
  5. Relative Coordinates

4. A Gravitational 1-Body Problem

  1. Coordinates
  2. Equivalent coordinates
  3. Closing the Circle
  4. Newton's Equations of Motion
  5. An Equivalent 1-Body Problem
  6. Wrapping Up

5. Writing the Code (Ruby)

  1. Choosing a Computer Language
  2. Choosing an Algorithm
  3. Specifying Initial Conditions
  4. Looping in Ruby
  5. Interactive Ruby: irb
  6. Compiled vs. Interpreted vs. Interactive
  7. One Step at a Time
  8. Printing the Result

6. Running the Code (Ruby)

  1. A Surprise
  2. Too Much, Too Soon
  3. A Circular Orbit
  4. Radial Acceleration
  5. Virial Theorem
  6. Circular Motion
  7. One Step at a Time

7. Debugging the Code (Ruby)

  1. One Integration Step: Verification
  2. A Different Surprise
  3. One Integration Step: Validation
  4. More Integration Steps
  5. Even More Integration Steps
  6. Printing Plots

8. Convergence for a Circular Orbit (Ruby)

  1. Better Numbers
  2. Even Better Numbers
  3. An Even Better Orbit
  4. Reasons for Failure
  5. Signs of Hope

9. Convergence for an Elliptic Orbit (Ruby)

  1. Adding a Counter
  2. Sparse Output
  3. Better and Better
  4. A Print Method
  5. From One Body to Two Bodies

10. The Modified Euler Algorithm (Ruby)

  1. A Wild Idea
  2. Backward and Forward
  3. On Shaky Ground
  4. Specifying the Steps
  5. Implementation
  6. Experimentation
  7. Simplification
  8. Second Order Scaling

11. Arrays (Ruby)

  1. The DRY Principle
  2. Vector Notation
  3. Arrays
  4. Declaration
  5. Classes

12. Array Methods (Ruby)

  1. An Array Declaration
  2. Three Array Methods
  3. The Methods each and each_index
  4. The map Method
  5. Defining a Method
  6. The Array#inject Method
  7. Shorter and Shorter
  8. Enough

13. Overloading the + Operator (Ruby)

  1. A DRY Version of Modified Euler
  2. Not quite DRY yet
  3. Array Addition
  4. Who is Adding What
  5. The plus Method
  6. The + Method
  7. A Small Matter: the Role of the Period
  8. Testing the + Method
  9. A Vector Class

14. A Vector Class with + and - (Ruby)

  1. Vector Subtraction
  2. Unary +
  3. Unary -
  4. An Unexpected Result
  5. Converting
  6. Augmenting the Array Class
  7. Fixing the Bug

15. A Complete Vector Class (Ruby)

  1. Vector Multiplication
  2. An Unnatural Asymmetry
  3. Vector Division
  4. The Score: Six to One
  5. A Solution
  6. Augmenting the Fixnum Class
  7. Augmenting the Float Class
  8. Vector Class Listing
  9. Forward Euler in Vector Form

16. A Matter of Speed (Ruby)

  1. Slowdown by a Factor Two
  2. A C Version of Forward Euler
  3. A Simple Ruby Version
  4. A Ruby Array Version
  5. A Ruby Vector Version
  6. More Timing Precision
  7. Conclusion

17. Modified Euler in Vector Form (Ruby)

  1. An Easy Translation
  2. Variable Names
  3. Consistency
  4. A Method Returning Multiple Values
  5. Simplification

18. Leapfrog (Ruby)

  1. Interleaving Positions and Velocities
  2. Time Symmetry
  3. A Vector Implementation
  4. Saving Some Work
  5. The DRY Principle Once Again

19. Time Reversibility (Ruby)

  1. Long Time Behavior
  2. Discussing Time Symmetry
  3. Testing Time Symmetry
  4. Two Ways to Go Backward
  5. Testing a Lack of Time Symmetry

20. Energy Conservation (Ruby)

  1. Kinetic and Potential Energy
  2. Relative Coordinates
  3. Specific Energies
  4. Diagnostics
  5. Checking Energy
  6. Error Growth
  7. Pericenter Troubles

21. Scaling of Energy Errors (Ruby)

  1. A Matter of Time
  2. A New Control Structure
  3. Overshooting
  4. Knowing When To Stop
  5. Linear Scaling
  6. Picture Time

22. Error Scaling for 2nd-Order Schemes (Ruby)

  1. Modified Euler
  2. Energy Error Scaling
  3. Leapfrog
  4. Another Error Scaling Exercise
  5. Roundoff Kicks In

23. Error Behavior for 2nd-Order Schemes (Ruby)

  1. Modified Euler: Energy Error Peaks
  2. Almost Too Good
  3. Leapfrog: Peaks on Top of a Flat Valley
  4. Time Symmetry
  5. Surprisingly High Accuracy
  6. Squaring Off

24. Literature References

Personal tools