Flow over bicycle using Python
Program to calculate the drag force on the bicyclist using Python
As the bicyclist is riding the cycle, cycle and bicyclist is expressing the air resistance to move forward. This is given by the following equation
Fd=1/2⋅Cd⋅V2⋅ρ⋅A
where, Fd = Drag force (in Newton)
Cd = Coefficient of Drag
V = Velocity (in m/s)
A = Frontal Area (in m^2)
ρ= Density of air (in kg/m^3)
Assumption:
As there is no specific values given we will assume
ρ = 1.225 kg/m^3
NOTE:
1) While ploting the Drag force vs Velocity graph, A , ρ and Cd remains constant.
2) For ploting graph between the drag force vs coefficient of drag, A, ρ and V remains constant.
1) Plot of Drag force vs Velocity of air
Coefficent of Drag = 0.8
Frontal Area = 0.2 m^2
Velocity is increasing from 2m/s to 22m/s at rate of 1m/s
# program to determine the drag force on bicyclist# by Meghraj Vaidya# drag force vs Velocity of airimport matplotlib.pyplot as plt# inputs# Area = A in m^2A = 0.2# Coeffeicient of Drag = c_d c_d = 0.8# Density of Air = rho in kg/m^3rho = 1.225#Drag force = Fd in Ndrag_force = []# Velocity of air = V in m/s velocities = [2,3,4,5,6,7,8,9,10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]for velocity in velocities: drag_force.append(velocity*0.5*velocity*rho*c_d*A)print(drag_force)plt.plot(velocities,drag_force)plt.xlabel('velocity in m/s')plt.ylabel('drag_force in N')plt.show()
Graph:
Output:
Conclusion: Thus we can see from the graph that the drag force increases with velocity in quadratically provided all the other factors remain same.
2) Plot of Drag Force vs Coeffcient of Drag
The frontal is kept same for the following case.
Coefficient of drag for different shape as shown in table.
| Shape | Drag Coefficient |
| Flat plate | 1.28 |
| Prism | 1.14 |
| Bullet | 0.295 |
| Airfoil | 0.045 |
Courtesy : GOOGLE
Velocity of air = 20 m/s
Density of air = 1.225 kg/m^3
Frontal area = 0.2 m^2
# program to determine the drag force on bicyclist# by Meghraj Vaidya# drag force vs coefficient of dragimport matplotlib.pyplot as plt# inputs# Area = A in m^2A = 0.2# Density of air = rho in kg/m^3rho = 1.225# Velocity of air = v in m/s v = 20# Coefficient of Drag c_d1 = [1.28,1.14,0.295,0.045]# drag force on bicyclist in Newton(N)drag_force = []for c_d in c_d1: drag_force.append(0.5*v*v*rho*A*c_d)print(drag_force)plt.plot(c_d1,drag_force)plt.xlabel('c_d')plt.ylabel('drag_force in N')plt.show()
Graph:
Output:
Conclusion: Thus the drag force increases with the coefficient of drag linearly provided all the other factors remain same.