jjrandom2 magnets_and_pendulum
Simulation code for a standard popular science tourist attraction in chaotic dynamics. more…
If this was a physics exam, the question would be…
Consider a pendulum, consisting of a massless, infinitely rigid rod and a pointlike metal weight placed at the end. The pendulum is suspended over a plane (z = 0) with N (pointlike) magnets placed in regular intervals along the perimeter of a circle. A uniform gravitational field applies, pointing downwards.
Let the weight start from rest at a given point. Consider the set of admissible starting positions as the lower half of the sphere defined by the rod origin (0,0,L) and length of the rod, L. You can take L = 1.
Assume that the pendulum loses energy at a constant rate (due to frictional losses, air resistance…). Thus, the system eventually stops, as time t grows without bound.
Q1) Find the trajectory from a given starting point.
Q2) Find which magnet wins from a given starting point. The “winner” is defined as the magnet that minimizes the distance between the weight and itself in the final stopped state. Plot the winner as a function of a discrete approximation of the set of all admissible starting positions. Present the result as a colour sheet with each pixel representing a starting position.
Technically, the source code of these solvers demonstrates using Python, NumPy, Matplotlib, mpi4py, Cython and the C interface in Cython, while actually running the solvers will make pretty pictures of trajectories and attraction pools.
Cloning this repository:
If you need read and write access use this command:
git clone git@yousource.it.jyu.fi:jjrandom2/magnets_and_pendulum.git magnets_and_pendulum
If you only want to clone (and not push) use this command:
git clone git://yousource.it.jyu.fi/jjrandom2/magnets_and_pendulum.git magnets_and_pendulum
Then you can go to your repository:
cd magnets_and_pendulum
 Releases:
Activities

Tuesday August 14 2012

Push
13:50
Juha Jeronen pushed 1 commit to jjrandom2/magnets_and_pendulum:master
master changed from 28020df to 166ea9a

Push
13:49
Juha Jeronen pushed 1 commit to jjrandom2/magnets_and_pendulum:master
master changed from 95b0460 to 28020df


Monday June 20 2011

Repository
13:09
Juha Jeronen updated repository jjrandom2/magnets_and_pendulum
Changed the repository description


Wednesday June 15 2011

Commit
14:41
Juha Jeronen started development of jjrandom2/magnets_and_pendulum

Repository
14:38
Juha Jeronen created repository magnets_and_pendulum in JJ's random experiments
Simulation code for a standard popular science tourist attraction in chaotic dynamics.
If this...
