frequenpy is a high-precision physics engine dedicated to the study and visualization of standing waves.
In this section I will briefly explain the systems available for simulation, according predictions of wave theory. This results have been (and can be) demonstrated experimentally.
A flexible elastic string with tension T is loaded with N identical particles, each of mass m, equally spaced a distance a apart. Let us hold the string fixed at two points, one at a distance a to the left of the first particle and the other at a distance a to the right of the Nth particle.
According to the theory, the movement of each of the masses in the vertical direction
can be decomposed into a superposition of N normal modes modes of oscillation.
That way, the
Where
There are as many normal modes as there are degrees of freedom (masses) in the system.
In each natural mode p,
all masses in the system oscilate at the same frequency
As the number of masses gets higher and highter (
To install FrequenPy, just run:
pip install frequenpy
Once installed, just run:
frequenpy
This will prompt the following help:
(.venv) $ frequenpy
usage: FrequenPy [-h] {loaded_string} ...
Welcome to FrequenPy! High-precision physics engine dedicated to the study of standing waves.
positional arguments:
{loaded_string} Choose a system to simulate
loaded_string Transverse oscillations on a string loaded with masses.
options:
-h, --help show this help message and exit
Enjoy!
If you pass loaded_string as an argument:
(.venv) $ frequenpy beaded_string
usage: FrequenPy beaded_string [-h] --masses [--modes [...]] [--boundary BOUNDARY] [--speed SPEED] [--save]
Transverse oscillations on a string loaded with masses.
options:
-h, --help show this help message and exit
required arguments:
--masses Number of masses.
optional arguments:
--modes [ ...] Normal modes to combine. Ex: "1 2 3" (default: [1]).
--boundary BOUNDARY Boundary conditions: 0 (fixed), 1 (free), or 2 (mixed) (default: 0).
--speed SPEED Animation speed. Can be a float number (default: 1).
--save Save the animation in mp4 format (default: False).
Example: frequenpy loaded_string --masses 3 --modes 1 2 3 --speed 0.1 --boundary 0
Remember that for system of N masses there are N normal modes. You can pass only one of them or a combination of several, e.g. "2 6 3". The order doesn't matter.
- Interactive GUI to be able to play more easily with all the parameters of the system.
- Plot each individual normal mode that is contributing to the movement.
- Loaded String:
- Allow changing damping and tension as parameters.
- Allow initial conditions to generate more arbitrary and crazy movements of the string, like picking the string with your mouse and realease it from some position.