Using Euler-Cromer to find the motion of a simple pendulum?
5 次查看(过去 30 天)
显示 更早的评论
My professor wants us to find the number of periods a simple, meter-long pendulum will have in a day if given an initial angle of 50 degrees using the Euler-Cromer method. My problem is that I can't come up with al the equations I need.
I know that I need: dθ/dt = f(t, ω) and dω/dt = g(t, θ).
I managed to get dω/dt = -9.8*sin(θ). I can't figure out what dθ/dt should be, though. Once I have that, I understand how to use for loops to find θ and ω for time steps and if statements to fin the number of periods throughout the day (even if it is inefficient), I just can't seem to get started. Can anybody give me some help as to what dθ/dt is? Remember, the starting angle is 50 degrees, so the small angle approximation cannot be used.
0 个评论
回答(1 个)
Matt Kindig
2012-4-4
Can you use the ODE solvers built-in to Matlab (something like 'ode45')? If so, that would be the easiest way, and would avoid looping completely.
If the objective of the assignment is to implement your own ODE solver, then I would look up the definition for Runge-Kutta integration on Wikipedia or similar.
By the way, d(theta)/dt is just w (omega).
2 个评论
Matt Kindig
2012-4-4
Ah, my apologies. I realized I overlooked that you specified the Euler-Cromer method. Can you post your code for us to look over?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Classical Mechanics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!