- #1
Random Physics Fan
- 1
- 7
My little project - 3body simulator started as a programming exercise, which I attempted to make a program that solves the famous 3-body gravity problem using numerical integration.
Later I gained interest in the underlying physics and expanded the program to solve N-body problems involving both electromagnetic and gravitational interactions. I also replaced Newtonian mechanics with special relativistic mechanics (as for the model of gravity, general relativity is too challenging for me, so I used an approximation under the weak field limit which was Lorentz-invariant).
You can do all sorts of weird simulation such as the following:
Object 1 (e-) and object 2 (p+) form a hydrogen atom under the classical Bohr's model, with n = 10; object 3 is a hypothetical microscopic blackhole with the mass of the Moon, placed 10 mm under the hydrogen atom.
Object 1:
mass: 9.11e-31 / charge: -1.60e-19
position: 5.29e-9,0,0 / velocity: 0,218500,0
Object 2:
mass: 1.67e-27 / charge: 1.60e-19
position: 0,0,0 / velocity: 0,0,0
Object 3:
mass: 7.35e22 / charge: 0
position: 0,0,-0.01 / velocity: 0,0,0
Duration of simulation: 1e-12 / number of steps: 1000
-> Use advanced option and turn on scientific notation (to show the position of the electron)
(Note: the Schwarzschild radius of the blackhole is about 0.11mm (<<10mm), so general relativistic effects like gravitational time dilation are insignificant.)
Please try out my little program and you comments are appreciated!
Later I gained interest in the underlying physics and expanded the program to solve N-body problems involving both electromagnetic and gravitational interactions. I also replaced Newtonian mechanics with special relativistic mechanics (as for the model of gravity, general relativity is too challenging for me, so I used an approximation under the weak field limit which was Lorentz-invariant).
You can do all sorts of weird simulation such as the following:
Object 1 (e-) and object 2 (p+) form a hydrogen atom under the classical Bohr's model, with n = 10; object 3 is a hypothetical microscopic blackhole with the mass of the Moon, placed 10 mm under the hydrogen atom.
Object 1:
mass: 9.11e-31 / charge: -1.60e-19
position: 5.29e-9,0,0 / velocity: 0,218500,0
Object 2:
mass: 1.67e-27 / charge: 1.60e-19
position: 0,0,0 / velocity: 0,0,0
Object 3:
mass: 7.35e22 / charge: 0
position: 0,0,-0.01 / velocity: 0,0,0
Duration of simulation: 1e-12 / number of steps: 1000
-> Use advanced option and turn on scientific notation (to show the position of the electron)
(Note: the Schwarzschild radius of the blackhole is about 0.11mm (<<10mm), so general relativistic effects like gravitational time dilation are insignificant.)
Please try out my little program and you comments are appreciated!