Hello I am trying to use python to calculate the terminal ve

Hello, I am trying to use python to calculate the terminal velocity of an object falling from a height of 3 meters. I have gotten stuck trying to actually calculate the terminal velocity.

thanks for the help!

Here I have posted the code I have so far.

from visual import*

myscene = display(range = 10, width = 600, heigth = 600, background = color.blue, title = \'lab 5\' ) #display window

s = vector(0,3,0) #vector for starting position

m = 1.2 #mass of object

d = .5 #drag coefficient

a = .3166 #area of object

g = vector(0,-9.8,0) #vector for gravity and acceleration

r = 1.2 #resistance of air

dt = .001

v = vector(0,0,0) #starting velocity of object

mybox = box(pos = s, height = 2, width = 5, length = 1, color = color.red) #create object

while s.y > 0.0: #while loop to free fall object
    rate(1000)


  
    v = v + g * dt #increasing velocity with acceleration

    s = s + v * dt #position from velocity

    mybox.pos = s #update position

  
    vt = math.sqrt( (2*m*g) / (r*a*d) ) #calculate terminal velocity

print (vt) #display terminal velocity

Solution

Terminal velocity formula is

v = the square root of ((2*m*g)/(rho*A*C)).

s = vector(0,3,0) #vector for starting position

m = 1.2 #mass of object

c = .5 #drag coefficient

a = .3166 #area of object

g = vector(0,-9.8,0) #vector for gravity and acceleration

rho = 1.2 #resistance of air

dt = .001

v = vector(0,0,0) #starting velocity of object

mybox = box(pos = s, height = 2, width = 5, length = 1, color = color.red) #create object

while s.y > 0.0: #while loop to free fall object
    rate(1000)


  
    v = v + g * dt #increasing velocity with acceleration

    s = s + v * dt #position from velocity

    mybox.pos = s #update position

  
    vt = math.sqrt( (2*m*g) / (rho*a*c) ) #calculate terminal velocity

print (vt) #display terminal velocity

Hello, I am trying to use python to calculate the terminal velocity of an object falling from a height of 3 meters. I have gotten stuck trying to actually calcu
Hello, I am trying to use python to calculate the terminal velocity of an object falling from a height of 3 meters. I have gotten stuck trying to actually calcu

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site