Project

Calculation of Drag Force - Flow over a Bicycle using Python

Calcuation of Drag Force - Flow over a bicycle

Calculation of Drag Force:

In this program we are going to calculate the drag force over a bicycle using PYTHON. The parameters involved are:

Frontal area (A) which is the total area of bicycle and the one who's riding it. It is to be noted that the frontal area changes every second and inturn the drag force changes.

Density(ρ) which is the density of the fluid concerned. In this case it is air

Velocity(V) which is the rate at which the vehicle is travelling.

Cd - Drag coefficient, which varies for different geometrical shapes.

The Program to calculate drag force and a plot of Velocity Vs Drag Force is as follows:

"""
Program to calculate the drag force
"""
import matplotlib.pyplot as plt

#inputs

#drag coefficient
c_d = 0.8

#frontal area (m^2)
A = 0.1

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

#bicycle velocity (m/s)
velocities = [5,6,7,8,9,10,11,12]
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')
plt.ylabel('Drag force')
plt.show()

It is evident from the graph that the curve is parabolic and increases exponentially.

The Program to calculate drag force and a plot of Drag Coefficient Vs Drag Force is as follows:

"""
Program to calculate the drag force
"""
import matplotlib.pyplot as plt

#inputs

#drag coefficient
c_d = [0.3,0.4,0.5,0.6,0.7,0.8]

#frontal area (m^2)
A = 0.1

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

#bicycle velocity (m/s)
V = 6
drag_forces = []

for drag_coefficient in c_d :
	drag_forces.append((0.5*rho*A*drag_coefficient*V*V))

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

It is evident from the graph that the curve is linear and increases proportionally.

Conclusion: The density is fixed for a given fluid. The velocity of the vehicle changes as per the requirement of the rider. The drag coefficient is also a fixed parameter for a given geometry. Now we are left with only the frontal area, this can be controlled by making the design of the vehicle more compact. Hence, many leading automobile manufacturers modify their design as compact as possible to nullify the effect of 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.