Project

drag force


# program to calculate drag

import matplotlib.pyplot as plt

#inputs

#Drag co-efficient
c_d = 0.8

#Frontal area
A = 0.1

#Density
rho = 1.2

#Velocity
velocities = [2,4,6,8,10,12]
drag_force = []

for velocity in velocities:
    drag_force.append((0.5*rho*A*c_d*velocity*velocity))

plt.plot(velocities,drag_force)
plt.xlabel(\'VELOCITY(m/s)\')
plt.ylabel(\'DRAG FORCE(N)\')
plt.show()

As seen in the plot it can be inferred that the drag force against the cyclist varies exponentially. the drag force increases as the speed of the cyclist increases.

Drag co-efficients for different shapes :


# program to calculate drag

import matplotlib.pyplot as plt

#inputs

#Density
rho = 1.2

#Velocity
v = 2

#Drag co-efficient
c_ds = [0.05,0.09,0.47,0.42,0.8,1.0]

#Frontal area
A = [0.1,0.3,0.5,0.7,0.9,1]

for a in A:
	 print(\'Area =\',a)
	 break

for c_d in c_ds:
	print(\'Drag coefficient =\',c_d)
	break

drag_force =0.5*rho*a*c_d*v*v
print(\'Drag force = \',drag_force)

Code for the effect of drag coefficients of different shapes on drag force is attached above.

As seen from the document and analysed as the drag coefficient increases the drag force on that particular shape also incraeses.

# effect of area and drag co-efficient

# program for drag coefficient of different shapes

import matplotlib.pyplot as plt

#inputs

#Velocity
v = 2

#Density
rho = 1.2

#Frontal area
A=0.1

#drag co-efficient
c_ds = [0.05,0.09,0.47,0.42,0.8,1.0]
drag_force = []

for c_d in c_ds:
     drag_force.append((0.5*rho*A*v*v*c_d))
 
print(\'drag_force\')

plt.plot(c_ds,drag_force)
plt.xlabel(\'drag coefficient\')
plt.ylabel(\'drag force\')
plt.show()
print(drag_force)

#drag co-efficient
c_d=0.8

#Frontal area
A = [0.1,0.3,0.5,0.7,0.9,1]
drag_forcea = []

for a in A :
    drag_forcea.append((0.5*rho*a*v*v*c_d))

print(\'drag_force due due change in area = \',drag_forcea)

plt.plot(A,drag_forcea)
plt.xlabel(\'Area\')
plt.ylabel(\'drag force\')
plt.show()




The effect of area on drag force is also studied as infered from the plot,as the area of moving body increases the drag force also increases.

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.