Numerically simulated program that emulates the famous experiment conducted in 1953 by Enrico Fermi, John Pasta, Stanislaw Ulam, and Mary Tsingou. The program will solve a dual system of ODEs and find displacements of oscillators in a 1D lattice with user-specified parameters, display an animation of the oscillators' displacements through time and finally perform a Fourier analysis.
## Video Demonstration (Non-Linear Case)
- Download or clone repository
- Run view.py
- In the Chrome browser, navigate to http://127.0.0.1:3000/
- Fill in the HTML form and submit
- Wait for data to be processed, then watch the Matplotlib-generated animated solution
- Has every input apart from initial conditions, x(t0) for all i.
- Hides submit button until every input field contains a number.
- First asks what shape the string will take initially. Options are limited to sine, half-sine or parabola (since x0 and xL must be zero).
- If user inputs "sine" or "half-sine", ask for amplitude and number of wavelengths or half-wavelengths, resp. Check no. of wavelengths is an integer.
- If user inputs "parabola", ask for stationary point height.
- Extra feature: Add another option: "polynomial":
- Allow user to chooose polynomial degree and coefficients
- i.e. if degree is "4", ask user for five coefficients (in order)
- allow user to click button to randomize coefficients before/after choosing polynomial degree
- keep button shaded and unclickable until polynomial satisfies the constraints of x0 = xL = 0
- or, if polynomial doesn't fit constraints, translate it until it does without changing (challenging)
- Allow user to chooose polynomial degree and coefficients
- Extra feature: Add another option: "polynomial":
- Take data from user and call main "simulate()" function with paramaters
- Represent processed data and solution on new HTML page to show user
- dx_i/dt for every oscillator i, i.e. N simultaneous equations
- X-axis will be the distance along string (i-value)
- To show the progression through time, we will either animate the graph or plot M graphs in one figure, where M is the number of time-steps between t_0 and t_final
- Matplotlib has an animation class
-
If user inputs any parameters that may cause instability, kill the program and print error or prevent user from submitting the Parameters form in this case.
-
Create a range of preset polynomials that satisfy the boundary conditions for the user to choose from when setting initial conditions. Create a button that when clicked displays a subsection of polynomial graphs that can be selected and simulated.