top | item 16062508

Physics Simulations

160 points| pablode | 8 years ago |myphysicslab.com | reply

25 comments

order
[+] rivaldo|8 years ago|reply
Awesome stuff! A few months back I found a double pendulum simulation in less than 100 lines of JavaScript. It was a ton of fun to play around with the code.

Code and explanation: http://www.physicsandbox.com/projects/double-pendulum.html

Demo: http://www.physicsandbox.com/projects/double-pendulum-sim.ht...

[+] evanb|8 years ago|reply
For an accurate double pendulum you almost certainly need a symplectic integrator---not just Euler's method---or risk numerical instabilities that come from nonconservation of energy.
[+] nicois|8 years ago|reply
When I selected the double spring and pulled back the outer mass, as I let go the distance between the two masses went negative. This caused a runaway effect, sending system energy towards infinity.

Cute but the models are not very robust

[+] evanb|8 years ago|reply
This can be fixed with a more reliable integrator, at the expense of computational speed.
[+] tapirl|8 years ago|reply
[+] philipov|8 years ago|reply
These all look like physics engines for graphics rendering. They all say 2d or 3d, and that means they surely can't handle concepts like relativistic spacetime.

Do you know of any libraries for doing 'backend' physical simulations, such as calculating scattering amplitudes, making projections of spacetime models onto either space-like or time-like slices, and, especially, using tensor networks for modelling condensed matter interactions?

[+] electricslpnsld|8 years ago|reply
Very cool! Would be fun to have some implicit integrators to play with, too. And visualizations of the symplectic form.