Project

"PROJECT TO CALCULATE DRAG FORCE OVER THE BICYCLYST USING PYTHON":

"PROJECT TO CALCULATE DRAG FORCE OVER THE BICYCLYST":

1. PRINCIPlE:
when a body try to move in the medium it experiance a force that trys to opppose its motion this force is termed as drag force because it try's to take body in rest condition.
the drag force (Fd) acting over the bicyclyst is depends upon the following factor:
1.density of the medium in which bicycle is moving i.e. (p)
2.relative velocity with which the bicyclyst is moving through the medium i.e. (v)
3. frontal area of the bicycle including bicyclyst i.e.(A)
2. FORMULA:
thus from dimensional analysis it is obtsin that the drag force : Fd = p.A.v^2.Cd/2
p in Kg/m^3.
A in m^2.
v in m/s^2.
here above Cd is the coefficient of discharge it is the dimensionless quantity.
NOW WE CREATE A PROGRAM TO CALCULATE VARIATION OF DRAG FORCE WITH VELOCITY:

import math
import matplotlib.pyplot as plt
""" program to get variation of drag force over moving bicycle"""
#input
#drag
c_d = 0.8
#area in m^2
A = 0.1
#density in kg/m^3
rho = 1.2
#velocity in m/s^2
velocities = [0,1,2,3,4,5,6,7,8,9]
drag_force=[ ]
for velocity in velocities:
	  drag_force.append((rho*A*pow(velocity,2)*c_d*0.5))
	  
plt.plot(velocities,drag_force)
plt.xlabel('velocity in m\sec')
plt.ylabel('Drag force in Newton')
plt.show()

TO CALCULATE PLOT OF THE CURVE:


NOW WE CREATE A PROGRAM TO CALCULATE VARIATION OF DRAG FORCE WITH DRAG COEFFICIENT:

import math
import matplotlib.pyplot as plt
""" program to get variation of drag force over moving bicycle"""
#input
#drag
c_d = [0.8,0.38,0.9,0.42,0.5,2.1]
#area in m^2
A = 0.1
#density in kg/m^3
rho = 1.2
#velocity in m/s^2
v = 1
drag_force=[ ]
for c in c_d:
	 drag_force.append((0.5*rho*A*v*v*c))
	  
	  
plt.plot(c_d,drag_force)
plt.xlabel('drag coefficient')
plt.ylabel('Drag force in Newton')
plt.grid()
plt.title('drag force vs c_d')
plt.show()

PLOT OF THE PROGRAM:


EXPLANTION OF THE CODE :
1. fistly we initialize the value of desity,area,velocity, and coefficient of discharge.
2. substitute the values in the drag force equatrion to clculate drag force .
3. then we plot first curve in between drag force and velocity oif the bicycle.
4. in second curve we polot variation in between drag force and coefficient of discharge.
CONCLUSION:
1.in graph 1 we observe that drag force varies with respect to the velocity.
2. in graph 2 the curve describe that force varies with the coefficient of discharge.

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.