Project

CALCULATION OF DRAG FORCE OVER A BICYCLE- USING PYTHON

PROJECT: DRAG FORCE OVER A BICYCLE

Introduction

When a body moves in a fluid or when a fluid moves over a body, the fluid exerts some force on the body. The net force acting on a surface will be perpendicular to the surface. This force can be resolved in two components, one acting in the direction of motion called “DRAG FORCE” and the other perpendicular to the direction of motion called “LIFT FORCE”.Here I will be dealing with the determination of Drag Force on a bicycle and on the person riding it.

From the concepts of Fluid Dynamics, it is known that the Drag Force on a body moving in a fluid can be determined using the equation,

`F_d = 1/2*rho*A*V^2*C_d`

Where,

`F_d` = Drag Force

`rho` = Density of the fluid

A= Projected Area

V= Velocity of the fluid

`C_d` = Coefficient of drag of the fluid

Here, A is said to be the projected area. This means it is the area of the body visible when looked at in the direction of flow of the fluid. The total surface area is not necessary.

So, for a bicycle and the cyclist, the frontal area would be the shaded region of the image.

The PYTHON program has been structured as follows

  • Air has been chosen as the fluid medium, hence the density of air has been considered at 298K, 1atm.

  • Approximated values of fluid velocity and the projected area have been initialized.

  • An array has been assigned for the values of the coefficient of drag of the projected area of a Cycle, a Flatplate, a Prism, and an Airfoil in order.

  • The equation has been used to calculate the Drag Force on each of the above-mentioned bodies and assigned to an array.

  • The Drag Force array shows the drag force on each of the previously mentioned bodies

The PYTHON program is as shown below.

1) For constant velocity and varying Coefficient of drag

# Program to calculate the drag force acting on a cyclist

import matplotlib.pyplot as plt

# Inputs

cd = [0.32,1.28,1.14,0.045] # C_d[cycle,flatplate,prism,airfoil]
A = 1.25 # m2 Projected area
rho = 1 # kg/m3 density
v = 25 # m/s velocity
F_d = [] # N Drag force

for CD in cd:
  F_d.append(0.5*CD*rho*A*v*v)

print(F_d)
# Plotting
plt.plot(cd,F_d)
plt.xlabel('Coefficient of drag')
plt.ylabel('Drag force')  
plt.show()

OUTPUT plot of the above code

Drag force is directly proportional to the coefficient of drag, so the plot of drag force v/s the coefficient of drag is a straight line.

2) For constant Coefficient of drag and varying velocity

#Program to calculate the drag force acting on a cyclist
import matplotlib.pyplot as plt

# Inputs
cd = 0.8 # Unitless
A = 1.25 # m2
rho = 1.225 # kg/m3
v = [1,2,3,4,5,6,7,8,9,10] # m/s Varying velocity
F_d = []

for V in v:
  F_d.append(0.5*cd*rho*A*V*V)
 
print(F_d)
plt.plot(v,F_d)
plt.xlabel('Velocity')
plt.ylabel('Drag force')  
plt.show()

OUTPUT plot for the above code

Drag force is directly proportional to the square of velocity, so the plot of drag force v/s velocity is a parabolic curve.

Reference: https://www.grc.nasa.gov/www/k-12/airplane/shaped.html

Thank You.

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.