Numerical-analysis-in-julija / Mathematical_pendulum_using_the_Runge_Kutta_method.jl

Implementation of simulation of a mathematical pendulum's motion using the Runge-Kutta fourth-order method. Compares the pendulum's behavior with that of a harmonic oscillator and visualizes how its oscillation period varies with energy.

Home Page:https://lovc21.github.io/Mathematical_pendulum_using_the_Runge_Kutta_method.jl/dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mathematical pendulum using the Runge Kutta method

Documenter Runtests

In this repository, you can fined the code for Homework 4 of the Numerical Methods course.The code is written in Julia, and the main implementation can be found in the file src/Mathematical_pendulum_using_the_Runge_Kutta_method.jl. The code is tested using the file test/runtests.jl, and it is documented using the file docs/make.jl, you can test the code for the specific by running the Scripts/script.jl file.

To run the code, it is necessary to have Julia installed on your computer. Once downloaded, you can run the Scripts/script.jl file to see the results of the code. The results are in a forme of 3 grafs. First graf shows the "Displacement of a Pendulum over Time" the second graf shows the "Displacement of a Harmonic Oscillator over Time" and the last graf shows "Period of a Pendulum as a Function of Energy".

The point of the task is to understand the Runge-Kutta method and to use it to solve the mathematical pendulum problem. The mathematical pendulum is a pendulum that is not affected by friction. On the image below, you can see the mathematical pendulum.

The code and the working of the Pendulum is documented using Documenter.jl. To see the documentation, you can run the docs/make.jl file. The documentation is also available online at documentation.


TLDR the documentation. Here are the results of the code: Alt text Alt text Alt text

About

Implementation of simulation of a mathematical pendulum's motion using the Runge-Kutta fourth-order method. Compares the pendulum's behavior with that of a harmonic oscillator and visualizes how its oscillation period varies with energy.

https://lovc21.github.io/Mathematical_pendulum_using_the_Runge_Kutta_method.jl/dev/


Languages

Language:Julia 100.0%