Project

Flow over bicycle using Python

FLOW OVER BICYCLE

AIM – Write python programs to calculate drag force against a cyclist.

OBJECTIVES-

  1. Write a program to plot Velocity vs Drag force.
  2. Write a program to plot Drag coefficient vs Drag force.

INTRODUCTION-

Cycling is a sport where speed and minimal air resistance are everything. As much as 90% of the resistance a rider has to overcome is the aerodynamic drag. Drag force (Fd) experienced by a cyclist’s body is due to the movement through the air.

The Drag force is defined as Fd =0.5 Cd ρAv2

  • Cd is the drag coefficient
  • ρis the density of air
  • A is the frontal area
  • νis the bicycle velocity

According to International Standard Atmosphere the density of air is 1.225 kg/m3 at sea level and 15 C°.

Let frontal area be 0.1 m2

Typically, the drag coefficient of a cyclist ranges from ≈">≈ 0.6 for a streamlined time-trial position to >0.8 for an upright position.

PROCEDURE-

Case 1- Program to plot Velocity vs Drag force

We keep Drag coefficient constant in this case. c_d1 = 0.70 and vary our bicycle velocity.

"""
Program to calculate drag force against a cyclist and create plot- Velocity vs Drag force
by Sushant Kumar Mishra
"""

import matplotlib.pyplot as plt 

#input

#density of air (kg/m^3)
rho=1.225
#Frontal area(m^2)
a=0.1
#drag coefficient
c_d1=0.70

#bicycle velocity(m/s)
velocities=[5,6,7,8,9,10,11,12]

#drag force(N)
drag_forces=[]
for velocity in velocities:
	drag_forces.append(0.5*c_d1*rho*a*velocity*velocity)
print(drag_forces)

plt.plot(velocities,drag_forces)
plt.xlabel('Velocity')
plt.ylabel('Drag force')
plt.show()

PLOT:

Case 2- Program to plot Drag coefficient vs Drag force

We keep velocity constant in this case. velocity= 5 m/s and vary our drag coefficient.

"""
Program to calculate drag force against a cyclist and create plot- Drag coe-efficient vs Drag force
by Sushant Kumar Mishra
"""

import matplotlib.pyplot as plt 

#input

#density(kg/m^3)
rho=1.2
#Frontal area(m^2)
a=0.1
#bicycle velocity
velocity= 5

#drag coefficient
c_d=[0.60,0.65,0.70,0.75,0.8,0.85,0.90,0.95]

drag_forces=[]
for drag_coeffecient in c_d:
	drag_forces.append(0.5*drag_coeffecient*rho*a*velocity*velocity)
print(drag_forces)

plt.plot(c_d,drag_forces)
plt.xlabel('Drag coefficient')
plt.ylabel('Drag force')
plt.show()

PLOT:

CONCLUSION AND EXPLANATIONS-

  1. From Velocity vs Drag force plot, we can clearly observe the relation to be parabolic, which satisfies with velocity raised to power 2 term in formula.
  2. From linear line in Drag coefficient vs Drag force plot we can say drag force to linearly vary with drag coefficient, which is in accordance with 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.