\"\"\"
PYTHON PROGRAM FOR A FUNCTION TO PLOT DRAG FORCE VS VELOCITY
By RAJAN
\"\"\"
import matplotlib.pyplot as plt
#Inputs
#Drag Coefficient
c_d= 0.8
#Frontal Area(m^2)
A= 0.1
#Density (kg/m^3)
rho= 1.2
#Bicycle velocity(m/s)
velocities=[2,3,4,5,6]
drag_force =[]
for velocity in velocities:
drag_force.append((0.5*c_d*A*rho*velocity*velocity))
print(drag_force)
plt.plot(velocities,drag_force)
plt.xlabel(\'velocity\')
plt.ylabel(\'drag_force\')
plt.show()
\"\"\"
PYTHON PROGRAM TO DOCMENT DRAG COEFFICIENT FOR VARIOUS SHAPES
By RAJAN
\"\"\"
import matplotlib.pyplot as plt
#Inputs
#Drag Coefficient For Various Shapes
c_ds= [0.2,0.3,0.4,0.5,0.6]
#Frontal Area(m^2)
A= 0.1
#Density(kg/m^3)
rho= 1.2
#Bicycle velocity(m/s)
velocity= 2
drag_force =[]
for c_d in c_ds:
drag_force.append((0.5*c_d*A*rho*velocity*velocity))
print(drag_force)
plt.plot(c_ds,drag_force)
plt.xlabel(\'Drag Coefficient\')
plt.ylabel(\'drag_force\')
plt.show()