Pendulum Model |
This model allows students to experiment with length and angle to see how they affect the period of the pendulum. The model uses polar coordinates.
g = -9.81 KE = 0.5*mass*Length^2*Velocity^2 PE = -g*mass*(Length*(1-cos(angle))) Total_Energy = KE+PE angle(t) = angle(t - dt) + (chg_angle) * dt INIT angle = initial_angle chg_angle = Velocity Velocity(t) = Velocity(t - dt) + (Ang_Acceleration) * dt INIT Velocity = 0 Ang_Acceleration = restoring_force/mass initial_angle = 2*pi*initial_angle_in_deg/360 initial_angle_in_deg = 10 Length = 1 mass = 2 restoring_force = mass*g*sin(angle)/Length Time SpecsRange: 0 - 5, dT = 0.05, Integration Method = Runge-Kutta 4 |
|