Help with motions of a double pendulum using RK4

In summary: To apply this method to your equations, you will need to calculate the slopes (k1, k2, k3, k4) for each equation at each time step. You can then use the RK4 method to update the values of θ1, ω1, θ2, and ω2 at each time step.I hope this summary helps you with your double pendulum model. Remember, don't get discouraged and keep trying! With some patience and perseverance, you will be able to successfully implement the RK4 method in your excel sheet.In summary, the RK4 method is a numerical method used to solve differential equations. In order to use it
  • #1
Rezalt
1
0
Hello everyone, :)I hope you consider this the right place for this question.
I have been working way to long on making a model of a double pendulum using the RK4 method with excel.

I have these four equations that I should be able plug into RK4
View attachment 3722

I know that the first two equations for example shows the angular velocity of each pendulum, but I just can't figure out how to write this into RK4/excel. I have tried in many ways... with the last attempt seemingly beeing the worst.I will try and shorten down my excel sheet and attach it to this post.
https://drive.google.com/file/d/0B15dVNHE5_8IaEtOcFNNdVM4SGM/view?usp=sharing

Hopefully some of you can help, because I'm getting tired of feeling like an idiot. :PBest regards

- Rezalt
 

Attachments

  • double pendulum.PNG
    double pendulum.PNG
    6.8 KB · Views: 82
Last edited:
Physics news on Phys.org
  • #2


Dear Rezalt,

Thank you for reaching out to us with your question. It is definitely the right place to ask for help with your double pendulum model.

To start, let's review the RK4 method. RK4 stands for "Runge-Kutta fourth order" and it is a numerical method used to solve differential equations. It is commonly used in modeling and simulation because it is relatively easy to implement and provides accurate results.

In order to use RK4, we need to first understand the differential equations that describe the system we are trying to model. In your case, you have four equations that describe the angular velocity and acceleration of each pendulum. These equations are:

dθ1/dt = ω1
dω1/dt = -g(2m1+m2)sin(θ1) - m2gsin(θ1-2θ2) - 2sin(θ1-θ2)m2(ω2^2+ω1^2cos(θ1-θ2))
dθ2/dt = ω2
dω2/dt = 2sin(θ1-θ2)(ω1^2m1+g(m1+m2)cos(θ1)+ω2^2m2cos(θ1-θ2))

Where:
θ1 = angle of first pendulum
θ2 = angle of second pendulum
ω1 = angular velocity of first pendulum
ω2 = angular velocity of second pendulum
g = acceleration due to gravity
m1 = mass of first pendulum
m2 = mass of second pendulum

Now, let's take a look at your excel sheet. It looks like you have already set up the initial conditions, constants, and time step (dt). The next step is to set up the RK4 method for each of the four equations.

The general form of the RK4 method is:

y(t+dt) = y(t) + (1/6)(k1 + 2k2 + 2k3 + k4)

Where:
y(t+dt) = the value of y at the next time step
y(t) = the current value of y
dt = time step
k1 = slope at the current time step
k2 = slope at the midpoint of the current time step
k3 = slope at the midpoint of the current time step using k2
k4 =
 

FAQ: Help with motions of a double pendulum using RK4

1. What is a double pendulum?

A double pendulum is a physical system consisting of two pendulums connected by a joint. It is a classic example of a chaotic system, meaning that its motion is highly sensitive to initial conditions.

2. Why is RK4 used for solving the equations of motion for a double pendulum?

RK4, or the Runge-Kutta method, is a numerical integration technique that is commonly used for solving differential equations. Its higher order accuracy makes it well-suited for calculating the motion of a double pendulum, which is a highly nonlinear system.

3. How do I set up the equations of motion for a double pendulum?

The equations of motion for a double pendulum can be derived using Lagrangian mechanics. This involves defining the kinetic and potential energy of each pendulum, and then setting up the Lagrangian equation to solve for the system's equations of motion.

4. Can RK4 accurately model the motion of a double pendulum?

While RK4 is a powerful numerical method, it may not be able to accurately model the motion of a double pendulum over a long period of time. This is because the chaotic nature of the system can lead to numerical errors that accumulate over time.

5. Are there any other methods for simulating the motion of a double pendulum?

Yes, there are other numerical integration methods that can be used to simulate the motion of a double pendulum. Some examples include Euler's method, Verlet integration, and the symplectic Euler method. Each method has its own strengths and limitations, and the choice of method will depend on the specific goals of the simulation.

Back
Top