Skip to content

Physical simulation of a pendulum using second order Runge-Kutta method

License

Notifications You must be signed in to change notification settings

estevaopbs/Pendulum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pendulum

Table of Contents

Description

Pendulum is a Python simulation project that allows users to interact with a pendulum through a graphical interface. The simulation is based on the second-order Runge-Kutta method to approximate the pendulum's motion.

Usage

To use Pendulum, you need to run the main.py file. The simulation starts by manipulating the pendulum with the mouse. Follow the on-screen instructions to adjust parameters and view graphical representations of the pendulum's behavior.

Commands

  • P: Pauses/resumes the simulation.
  • R: Toggles redimension mode, allowing you to adjust the pendulum's parameters.

Menu Items

  • Length (m): Sets the length of the pendulum.
  • Mass (kg): Sets the mass of the pendulum's weight.
  • Gravitational acceleration (m/s²): Sets the gravitational acceleration.
  • Drag factor: Sets the resistive force acting on the pendulum.
  • Graph: Selects the type of graph to display (Energies, Angle, Positions).
  • Timespan: Adjusts the time interval for graph display.
  • Export graph: Initiates the export of the selected graph.
  • Exit: Exits the application.

Cloning

To clone the Pendulum repository, use the following command:

git clone https://github.com/estevaopbs/Pendulum

Installation

To install Pendulum's dependencies, navigate to the project directory and run:

pip install -r requirements.txt

Contributing

Contributions to Pendulum are welcome! Fork the repository, make your changes, and submit a pull request.

License

Pendulum is licensed under the MIT License.