Project

FLOW OVER BICYCLE (PYTHON)

AIM: TO CALCULATE THE DRAG FORCE ON A CYCLIST AND RUN PARAMETRIC STUDIES IN PYTHON

GOVERNING EQUATIONS:

`F_d=(1/2).ρ.A.v^2.C_d`

where,

`F_d`= Drag Force

`ρ`= Density of the fluid offering resistance

`A`= Frontal area

`v`= Velocity of the bicycle

`C_d`= Coefficient of drag (different values for different bodies)

The equation mentioned above is used to calculate the drag force on a body while moving with a velocity in a medium (generally fluid). Every moving body experiences drag due to the presence of air in the atmosphere. There are various parameters that affect the value of drag force but the most essential is the velocity with which the object is moving.

OBJECTIVE:

  1. Write a program to plot Velocity vs Drag Force.
  2. Write a program to plot Drag Co-efficient vs Drag Force.

PROGRAM 1: To plot Velocity vs Drag Force

# Program to calculate the drag force and plot it against velocity
 
import matplotlib.pyplot as plt

# Inputs
 
# Drag co-efficient
c_d = 0.75

# Frontal area (m^2)
A = 0.1

# Density (kg/m^3)
rho = 1.2

# Bicycle velocity (m/s)
velocities = [8,9,10,11,12,13,14,15,16]

drag_forces = []

for velocity in velocities:
	drag_forces.append(0.5*rho*A*c_d*velocity*velocity)

plt.plot(velocities,drag_forces,'-*')
plt.xlabel('Velocity (m/s)')
plt.ylabel('Drag Force (N)')
plt.show()

PLOT OBTAINED: Velocity vs Drag Force

By visualizing the graph, we can say that velocity varies parabolically with the drag force, i.e. drag force varies with the square of velocity with which the rider is traversing.

*Drag Co-efficient values for different shapes:

PROGRAM 2: To plot Drag Co-efficient vs Drag Force

# Program to calculate the drag force and plot it against co-efficient of drag
 
import matplotlib.pyplot as plt

# Inputs
 
# Drag co-efficient
C_D = [0.045,0.295,0.5,1.14,1.28]

# Frontal area (m^2)
A = 0.1

# Density (kg/m^3)
rho = 1.2

# Bicycle velocity (m/s)
velocity = 10

drag_forces = []

for c_d in C_D:
	drag_forces.append(0.5*rho*A*c_d*velocity*velocity)

plt.plot(C_D,drag_forces,'-*')
plt.xlabel('Co-efficient of Drag')
plt.ylabel('Drag Force (N)')
plt.show()

PLOT OBTAINED: Drag Co-efficient vs Drag Force

The above visualization gives an adequate idea of drag force dependency on the drag coefficient. Therefore, in order to reduce the drag force, a streamlined body offers minimum resistance.

CONCLUSION: There are various possible ways to reduce the drag force but only few parameters to vary. We can also plot graphs by varying more than one parameter to bend it towards a more realistic situation.

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.