Project

Drag force calculation over a cyclist using python

AIM
To calculate drag force against a cyclist.

GOVERNING EQUATION
F = `1/2*rho*A*V^2*C_d`
Here,
F = Drag force experienced by the cyclist in Newton(N).
`rho`= Density of air (kg/`m^3`)
A = Frontal area or the area suffering air resistance (`m^2`)
V = velocity of the cyclist (m/s)
`C_d`= drag coefficient (unitless quantity)
Drag force is the force caused due to motion of the body through a fluid like air and it opposes the direction of velocity.
There is no object on the earth that would have value of drag coefficient equal to 0 as every object suffers some resistance to motion. However, efforts are made to minimise the drag coefficient and hence resistance experienced by the body with the help of aerodynamics.

OBJECTIVE
The objective of this program is to determine the drag force experienced by the cyclist while cycling. From the equation, we can see that the drag force is directly affected by the frontal area. Therefore, in the professional cycling events, we can observe that the cyclist adjust their body posture in order to minimise the frontal area, which minimises the drag force experienced by them and increases their speed.
In this project, we would see the effect of velocity of cycling and drag coefficient on the drag force respectively and plot the graphs of the same.

PROGRAM

i) Initially, the modules required during the program are imported. These include math module for calculations, matplotlib.pyplot for plotting the graphs and numpy module. The required inputs are provided which include the value of frontal area, velocity of the cycle, drag coefficient and the density of air. In order to deduce a relationship between drag force with drag coefficient and velocity respectively, we define different values for velocity and drag coefficient.

ii) To study the effect of drag coefficient on drag force, a constant velocity is assumed and an array containing different values of drag coefficient for different cycling positions is taken. An empty array called drag_force1 is created and for loop is used to add the values of drag force for different values of velocity. This is done using append command.

iii) To study the effect of cycling velocity on drag force experienced, an array containing different values of velocities is generated and used to calculate drag force for each of the velocities in the array, keeping `C_d` constant. It is done using the method same as step (ii).

iv) Subplot command is used to get both the plots in same figure and labels are provided to the axes.

# program to calculate drag force over a cyclist

import math
import matplotlib.pyplot as plt
import numpy as num

# density of air (kg/m^3)
rho = 1.225 
# frontal area (m^2)
A = 0.3 
# drag coefficient
Cd = 0.64 
coefficient = num.linspace(0.6,0.8,6)
# velocity (m/s)
V = num.linspace(0,20,10) 
velocity = 10

#variable velocity of cycling
drag_force1 = []

for i in V:
	drag_force1.append((0.5*rho*A*Cd*i*i))

#variable drag force for different cycling positions

drag_force2 = []

for j in coefficient:
	drag_force2.append((0.5*rho*A*j*velocity*velocity))

# plotting
fig,a = plt.subplots(2)
a[0].plot(V,drag_force1)
a[0].set_title('Variation of drag force with velocity')
a[0].set_xlabel('Velocity (m/s)')
a[0].set_ylabel('Drag Force (N)')
a[0].grid('on')
a[1].plot(coefficient,drag_force2)
a[1].set_title('Variation of drag force with drag coefficient')
a[1].set_xlabel('Drag coefficient Cd')
a[1].set_ylabel('Drag force (N)')
a[1].grid('on')
fig.tight_layout(pad=2.0) # add space between plots
plt.show()

OUTPUT

CONCLUSION

i) From this project, following conclusions can be drawn. For same velocity of cycling, lower the value of drag coefficient, lower will be the resistance offered to the cyclist which would help in achieving higher acceleration. Thus, the cyclist would be able to cycle faster with similar effort, by changing his position to minimise drag force experienced.

ii) For same value of drag coefficient, that is, same position of cycling, if the cyclist increases the velocity by applying more effort, the drag force experienced by him/her increases parabolically, which tends to make him/her tired at faster rate.

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.