\"\"\"
Q1) Incorporate a function to plot Drag force vs Velocity.
By abhishek roy
\"\"\"
import matplotlib.pyplot as plt
#Inputs
# Drag co_efficient
c_d = 0.8
#Frontal area
A = 0.1
#Density
roh = 1.3
# Bicycle velocity
velocities = [5,6,7,8,9,10,11,12]
drag_forces = []
for velocity in velocities:
drag_forces.append((0.5*roh*c_d*velocity*velocity))
plt.plot(velocities,drag_forces)
plt.xlabel(\'velocity\')
plt.ylabel(\'Drag force\')
plt.title(\'velocity vs drag_forces\')
plt.show()
\"\"\"
Q2) Document the drag coefficient for various shapes and
try to plot drag force as a function of drag coeffiecient.
By abhishek roy
\"\"\"
import matplotlib.pyplot as plt
#Inputs
# Drag co_efficient
c_ds = [0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9]
#Frontal area
A = 0.1
#Density
roh = 1.3
# Bicycle velocity
velocity = 15
drag_forces = []
for c_d in c_ds:
drag_forces.append((0.5*roh*c_d*velocity*velocity))
plt.plot(c_ds,drag_forces)
plt.xlabel(\'c_d\')
plt.ylabel(\'Drag force\')
plt.title(\'drag co-efficient vs drag_forces\')
plt.show()