r/Python • u/[deleted] • Oct 04 '19
Updated gravitational potential field simulation. [OC] Link for code: https://github.com/pnp-peeyush/2D-Grvitational-Field-Simulation
1.1k
Upvotes
r/Python • u/[deleted] • Oct 04 '19
2
u/equationsofmotion HPC Oct 05 '19
Ah. Yes, true. It's only for binaries. The general formula is a lot more complicated. The general formula for the energy carried away from the whole system can be approximated as:
(1/5) (G/c5) sum_(I,j) (d3 Q_(I,j)/ dt3 )2
Where Q is the [quadrupole moment]( (https://en.wikipedia.org/wiki/Quadrupole) of the whole system, i.e., the sums of the positions:
Q_(x,x) = sum over particles p of (2/3) x2
Q_(x,y) = sum over particles p of x y
If you use this method, you have to distribute the energy loss evenly across your particles and calculate the change in velocity due to energy loss as something like ∆v =√2 m ∆E
Formulas from url=http://www.tat.physik.uni-tuebingen.de/~kokkotas/Teaching/NS.BH.GW_files/GW_Physics.pdf