Project

Flow over bicycle with graphs

\"\"\"
calculating drag forces
by samarth
\"\"\"
import matplotlib.pyplot as plt
#Area
a=0.75

#Drag Coefficient
c_d=0.95
 
#Density 
rho=1.2

#Velcoity Array
v=[3,4,5,6,7,8,9] 

#Drag force array supposed to be empty to store values
drag_force=[]


for velocity in v:
  drag_force.append((0.5*rho*a*c_d*velocity*velocity))

#Plotting Velocity and Dragforce on a graph
plt.plot(v,drag_force)
plt.xlabel(\"Velocity\")
plt.ylabel(\"Dragforce\")
plt.show()
#The graph is non-linear as the power of velocity is 2 in the formula of drag-force








\"\"\"
Everything in this program is same except in this program we have an array for drag coefficient
program 2 by samarth
\"\"\"

import matplotlib.pyplot as plt
#Area
a=0.75

#Drag Coefficient
c_d=[0.88,0.89,0.90,0.91,0.92]

 
#Density 
rho=1.2

#Velcoity Array
v=3 

#Drag force array supposed to be empty to store values
drag_force=[]


for coeffd in c_d:
  drag_force.append((0.5*rho*a*coeffd*v*v))

#Plotting Velocity and Dragforce on a graph
plt.plot(c_d,drag_force)
plt.xlabel(\"Drag Coefficient\")
plt.ylabel(\"Dragforce\")
plt.show()
#The graph is linear as drag coefficient has a power of 1 in the formula for drag force

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.