Calculating Angular Velocity for Falling Object Simulation

In summary: And it looks kind of like a sine on that scale too.In summary, George is trying to solve an equation of motion and calculate the KE at every angle. He is also trying to determine what ω is. If he had fps fixed at 25, this would be much easier. However, if he wants to simulate an object that someone let's go at 1.25 m from the floor and that drops to the ground in 0.5 s, he needs to solve the equation of motion.
  • #1
GeorgeM
30
0

Homework Statement


This is an academic project related to a falling object simulation.
I have come to the point where I'm trying to calculate the per degree angle of the falling object seen in the attached images. The object has known height and length in pixels and is fixed on a pivot.

Homework Equations


PE = mgh
KE = ½Iω2
I = ⅓ml2

The Attempt at a Solution


Will calculate the difference in PE between two angles, eg: ΔPE = PE(90°) - PE(89°) = KE
So, ΔPE = KE
Δ(mgh) = ½Iω2
Δ(mgh) = ½(⅓ml22 (cancel m)
Δ(gh) = 1/6 l2 ω2
6 Δ(gh) = l2 ω2
...
ω = √6Δ(gh)/l2

Also, h is the height of the COM calculated at every angle using h = sin(angle)*hyp
hyp is the distance of centroid to the rotation point.

ω is measured in rad/sec
I'm confused on how to go back from ω to the actual animation of the falling object and also if what I calculated is correct.

Any help is very much appreciated.
Thanks
 

Attachments

  • image0.png
    image0.png
    268 bytes · Views: 388
  • image1.png
    image1.png
    550 bytes · Views: 369
Physics news on Phys.org
  • #2
Hello George,
GeorgeM said:
I'm trying to calculate the per degree angle of the falling object
You are trying to calculate what ?
GeorgeM said:
Will calculate the difference in PE between two angles
And why would you want to do that?

As comments: I don't see much wrong, but you should realize the pivot point is moving when you round off the bottom of your object. And the moment of inertia is no longer that for a rectangular block.
GeorgeM said:
I'm confused on how to go back from ω to the actual animation
I wouldn't use 'back' here ? Unless you have calculated ##\phi(t)## already ...
 
  • Like
Likes GeorgeM
  • #3
Hello BvU

Thanks for the comments.

I'm trying to calculate the KE at every angle starting from 90° to 0° clockwise. I assume that KE will give me ω. This ω is the angular velocity at every angle. Is this assumption correct?
KE must be equal to the difference in PEs, that's why I use this. May I ask whether you have a different method to solve this?

Finally, I have ω, which is rad/sec, my simulation will work in 25fps, so in every frame I will have to consume 25 degrees - 1 degree per frame.
I'm confused on how to assign ω per frame.

Thanks
 
  • #4
your background isn't in physics ?

What would you do to simulate an object that someone let's go at 1.25 m from the floor and that drops to the ground in 0.5 s ?
Or a projectile trajectory ?
GeorgeM said:
in 25fps, so in every frame I will have to consume 25 degrees - 1 degree per frame.
It seems to me you then get a uniform rotation - 25 degrees/sec, so 3.67 seconds and it's flat on the floor.

The thing to do is to solve the equation of motion. In the above example (dot means ##d\over dt## -- are you familiar with differentiation ? -- ): $$
\ddot y = -g \quad \Rightarrow \quad \dot y = \dot y_0 - gt \quad \Rightarrow \quad y = y_0 + \dot y_0 t - {1\over 2} gt^2$$But now something similar for the orientation (##\theta##) for the falling rod.

If you insist, your approach can be made equivalent to numerically solving the equation of motion: You get ##\Delta \omega \over \Delta \theta ## in steps of one degree and - with initial conditions - you can add them up to get ##\omega(\theta) ##. And an angle of 1 degree is traversed in ##{2\pi\over 360\;\omega}## giving you the time (number of frames) from one angle to the next (1 degree further) angle.
 
  • #5
Let me clarify something: There two phases here, one to calculate the velocity at every degree, that is, for 90° ω=0 ...for 59° ω=2.89 ... for 19° ω=3.78 etc.

Then, having the above stored in memory, I'll have to draw the rod and simulate the falling action. The question is how I will go from ω to fps. Is so confusing!
 
  • #6
I thought you had fps fixed at 25 :wink: !

Basically you want ##\theta(t)##, right ? You can draw the thing at an angle ##\theta## and time runs with 0.04 s between two frames.

And you are somewhere already: starting with ##\theta = 0## isn't very interesting: nothing happens...

But if you have a list with omegas life is easy ! Say you start at 89 degrees and draw Frame 1 for t = 0. Look up omega and do ##\theta(0.04) = \theta(0) + 0.04 \omega## (be sure to convert back to degrees !)
Look up (or interpolate) ##\omega(\theta(0.04))## and repeat! Happy falling !
 
  • Like
Likes gracy
  • #7
The list of ω doesn't look great though, I would expect to see some higher acceleration at the end - when the rod reaches the ground - rather than at the start of the fall. See the diagram of velocity-frame no.
 

Attachments

  • diag.jpg
    diag.jpg
    11.5 KB · Views: 380
  • #8
In the equation of motion there is a ##\sin\theta## And your series 4 shows something looking like that ? But I don't really know what 1, 2,3 and 4 stand for...
 
  • #9
Series 1 shows the ω for every degree (0-90)
sin(θ) is used to calculate the height of COM
 

Attachments

  • theta-sin.jpg
    theta-sin.jpg
    3 KB · Views: 349
  • #10
BvU said:
But I don't really know what 1, 2,3 and 4 stand for...
Oh, well, series 1 also looks like a sine on that scale...
 
  • #11
It doesn't look right. I would expect a different graph.
 
  • #12
Namely ?
 
  • #13
I would expect to see some higher acceleration at the end - when the rod reaches the ground - rather than at the start of the fall
 
  • #14
Yes you said that. But you still haven't said which is which or what you do to get these results.

In post #1, if you write ΔPE = KE, do you understand that that in fact should be ΔPE = ΔKE ?
 
  • #15
I was advised to use ΔPE = KE by another fellow in this forum. Is not my idea, I'm afraid.
To get these results, I do what I say in Post#1, nothing more...
 
  • #16
Well, how do you think you describe the change from potential energy to kinetic energy for a falling object ?
With ΔPE = KE, or with ΔPE = ΔKE ?

I know lots of other fellows (and a few ladies) in PF and none of those would advise the former. Could it be you misinterpreted ?
 
  • #17
Perhaps I was misinterpreted...
If GPE loss = KE gain, then loss in PE is calculated by the difference in PEpre - PEpost
Since PE = mghCOM, is mainly h the only changing parameter here. But there is something missing and that's why I get the graph series 1 as the sin graph.
 
  • #18
Can you show your steps ? I still don't know which is which or what you do to get these results.
Or why you think it's wrong, for that matter. It may well be correct.

As long as you do ΔPE = ΔKE with respect to the same reference point. If that is the starting position in both cases you are relatively OK. Note that you run into trouble with the initial conditions very easily this way! ##\ \ \theta(0) = 0 \ \ \& \ \ \omega(0) = 0\quad ## is a (non-stable) equilibrium point: theoretically nothing happens.
If (your post #1) $$ {\rm PE} =mg{l\over 2} \sin \theta \quad
$$then $${\Delta \rm PE} = mg{l\over 2}(1-\sin \theta) \quad
$$and you easily get $$\omega^2 = {3g\over l} (1-\sin\theta)\quad $$which does increase nicely for ##\theta \downarrow 0##. So I don't really see a problem -- even for this very cumbersome method :smile: .

--
 
Last edited:
  • #20
I see that, but I don't see why you think your thingy is wrong becasue you still haven't said what it shows. I only see a meaningless series 1, 2, 3, 4 and no idea what is on the abscissa. Should I read from left to right or from right to left ?
Can you show your steps ?
 
  • #21
Sure. BTW, there is only one series (see attach). In this graph (x axis = frame no, y-axis = ω)

I have simplified the problem with a rod falling, not an object as in post #1.

So, here are the parameters and steps:

length_rod = 400
comDistance = length_rod/2
gA = 9.8

loop angle 90 - >0

com_height = sin((angle) * PI / 180.0)*comDistance;

//calculate angular vel of Pi
gh = gA*com_height
velP = (sqrt(3*(gh_pre-gh)/length))

gh_pre = gh

This is pretty much the actual process in the software. Let me know if this makes sense.
Thanks!
 

Attachments

  • diag.jpg
    diag.jpg
    11.7 KB · Views: 352
  • #22
Code:
velP = (sqrt(3*(gh_pre-gh)/length))

gh_pre = gh
should be
Code:
velP = velP_pre + (sqrt(3*(gh_pre-gh)/length))

velP_pre = velP
gh_pre = gh
in accordance with ΔPE = ΔKE with the previous point as reference. You could also take
Code:
velP = vel_0 + (sqrt(3*(gh_0 - gh)/length))
in accordance with ΔPE = ΔKE with the starting point as reference
 
  • #23
Great! And now the diagram looks like that...
I did one run with height of rod = 100 and ω seems the same. I would expect that due to (sqrt(3*(gh_0 - gh)/length)) , when length goes up, ω goes down...
 

Attachments

  • diag.jpg
    diag.jpg
    12.4 KB · Views: 358
  • #24
The final bit is to get the simulation running. Here I'm trying to implement what you wrote at post #6
I iterate the list of ω (there are 90 different values there) as follows:

loop list of ω
{
thetaF0 = (theta_pre - 0.04*list)
theta_pre = thetaF0

///then draw the animation
}

It looks very promising, but the rod stops at 37.1 degrees- it doesn't go all the way to 0°.
Hmmm..
 
  • #25
GeorgeM said:
Great! And now the diagram looks like that...
I did one run with height of rod = 100 and ω seems the same. I would expect that due to (sqrt(3*(gh_0 - gh)/length)) , when length goes up, ω goes down...
And what is h ?
 
  • #26
GeorgeM said:
The final bit is to get the simulation running. Here I'm trying to implement what you wrote at post #6
I iterate the list of ω (there are 90 different values there) as follows:

loop list of ω
{
thetaF0 = (theta_pre - 0.04*list)
theta_pre = thetaF0

///then draw the animation
}

It looks very promising, but the rod stops at 37.1 degrees- it doesn't go all the way to 0°.
Hmmm..
1. You don't want list(n) but the omega that matches theta
2. list is 90 long, has nothing to do with the number of frames you want to draw.
 
  • #27
BvU said:
And what is h ?
Height is in pixels, say 100 pixels long rod. Is this what you ask?
 
  • #28
BvU said:
1. You don't want list(n) but the omega that matches theta
2. list is 90 long, has nothing to do with the number of frames you want to draw.

I know, I'm wrong here, I just cannot visualise it as an example...
 
  • #29
GeorgeM said:
Height is in pixels, say 100 pixels long rod. Is this what you ask?
No, I mean ##h = {L\over2} \sin\theta\ \ ## (your post #9). You can't have a height in pixels and multiply it with g in m/s2 in a calculation. !
GeorgeM said:
I know, I'm wrong here, I just cannot visualise it as an example...
0 Start
1 You have a theta. Draw the frame.
2 You look up the omega that goes with that theta. Interpolate if necessary.
3 You decrease theta with 0.04 * omega to get the next theta
4. goto 1 if theta > 0.
5 Finish​
 
  • #30
So, I'll need to have an assumption i.e. how many pixels per metre (pixPerM = 100) and then multiply all my x, y variables with this?

What do you mean by look up the omega that goes with theta?
Say theta(0) = 90°, I draw this, then I look an omega that goes with that theta(0)?
Give me one example please, to get what you mean.

Thanks
 
  • #31
GeorgeM said:
So, I'll need to have an assumption i.e. how many pixels per metre
Of course you do. For drawing purposes.
But you want to do the physics with physical units.
Keep them separate for the picture drawing variables you need.

I don't understand you have to ask these questions. You yourself wrote velP = (sqrt(3*(gh_pre-gh)/length)) (-- which I see is wrong -- *) and of course you can only do this if h and length have the same units !

GeorgeM said:
What do you mean by look up the omega that goes with theta
You have a list of omegas. Omega (89 degrees) omega (88 degrees) etcetera. If the angle is 88 degrees, you take omega (88 degrees).

*) Post #1 clearly has 6 Δ(gh) = l2 ω2 and then -- confusingly -- ω = √6Δ(gh)/l2 and you fell into that hole
 
  • #32
There is also another reason: my frame rate is not stable at 25 fps, so multiplying by 0.04 is not always right.

You are saying that (sqrt(3*(gh_pre-gh)/length)) is incorrect, is this because of the mixed units?
 
  • #33
g is m/s2
h is m
length is m
g h / length is m/s2
sqrt of that is not 1/s but (√m)/s
 
  • #34
So my units for ω are in (√m)/s ? I shouldn't then use this formula if this what you are saying.
 
  • #35
Read the expression in post #1
 

Similar threads

  • Classical Physics
Replies
12
Views
1K
Replies
4
Views
1K
  • Mechanics
Replies
15
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
3K
  • Introductory Physics Homework Help
Replies
11
Views
2K
  • Introductory Physics Homework Help
Replies
8
Views
2K
  • Introductory Physics Homework Help
Replies
8
Views
2K
  • Mechanics
Replies
4
Views
4K
  • Electromagnetism
Replies
11
Views
2K
  • Introductory Physics Homework Help
Replies
9
Views
3K
Back
Top