Project

Study of Drag force against a Cyclist with respect to Relative Velocity & Effect of Drag coefficient for various shapes using PYTHON.

Introduction:

The Drag Force is the resistance offered due to an object moving with relative velocity with respect to surrounding Fluid. Drag Force is calculated by formulae shown below

`F_d = 0.5 ρ a v^2 C_d`

In this Scenario, the Cyclist travelling with some velocity experiences drag force with surrounding air being the fluid. Our Study includes using PYTHON programming as listed below

  • Program to plot Velocity vs. Drag force for cyclist traveling with different velocities.
  • Program to plot Drag Co-efficient vs. Drag force for constant velocity for different drag coefficients with different shapes having the same frontal area.
"""
Challenge#03 Program to calculate Drag Force Experienced by Cyclist
by Pradeep
"""
import math
import matplotlib.pyplot as plt 

# Inputs

# Drag coefficient
c_d = 0.8

# Frontal Area (m^2)
A = 0.1

# Density (Kg/m^2)
Density = 1.225

# Bicycle Velocity (m/s)
Velocities = [1,2,3,4,5,6,7,8,9,10]

Drag_Forces = []

#Plot 1 : Velocity vs Drag force

for Velocity in Velocities:
	Drag_Force = 0.5*Density*A*Velocity*Velocity*c_d
	Drag_Forces.append(Drag_Force)
print(Drag_Forces)
plt.figure(1)
plt.plot(Drag_Forces,Velocities)
plt.xlabel('Drag Force (N)')
plt.ylabel('Velocity (m/s)')
plt.title('Velocity VS Drag Force')

#Plot 2 : Drag Co-efficient vs Drag force

# Coefficient of Drag for Different Shapes
Cd_StreamlinedBody	=	0.04
Cd_StreamlinedHalfBody	=	0.09
Cd_HalfSphere	=	0.42
Cd_Sphere	=	0.47
Cd_Cone	=	0.50
Cd_AngCube	=	0.80
Cd_LongCylinder	=	0.82
Cd_Cube	=	1.05
Cd_ShortCylinder	=	1.15

coeff_drags = [Cd_StreamlinedBody, Cd_StreamlinedHalfBody, Cd_HalfSphere, Cd_Sphere, Cd_Cone, Cd_AngCube, Cd_LongCylinder, Cd_Cube, Cd_ShortCylinder]

# Constant Velocity (10 m/s)
V = 10
Drag_Forces_cds = []

for coeff_drag in coeff_drags:
	Drag_Force_cd = 0.5*Density*A*V*V*coeff_drag
	Drag_Forces_cds.append(Drag_Force_cd)
print(Drag_Forces_cds)
plt.figure(2)
plt.plot(Drag_Forces_cds,coeff_drags)
plt.xlabel('Drag Force (N)')
plt.ylabel('Drag Coefficient')
plt.title('Drag Coefficient of Different Shapes vs Drag Force(N)')

colors = ['c','m','r','g','y','k']

print(Drag_Forces_cds)
print(coeff_drags)

print(Drag_Forces_cds[0])

cd_1 = plt.scatter(Drag_Forces_cds[0],coeff_drags[0], marker='x', color=colors[0])
cd_2 = plt.scatter(Drag_Forces_cds[1],coeff_drags[1], marker='x', color=colors[1])
cd_3 = plt.scatter(Drag_Forces_cds[2],coeff_drags[2], marker='o', color=colors[2])
cd_4 = plt.scatter(Drag_Forces_cds[3],coeff_drags[3], marker='o', color=colors[3])
cd_5 = plt.scatter(Drag_Forces_cds[4],coeff_drags[4], marker='x', color=colors[4])
cd_6 = plt.scatter(Drag_Forces_cds[5],coeff_drags[5], marker='x', color=colors[5])
cd_7 = plt.scatter(Drag_Forces_cds[6],coeff_drags[6], marker='x', color=colors[1])
cd_8 = plt.scatter(Drag_Forces_cds[7],coeff_drags[7], marker='x', color=colors[3])
cd_9 = plt.scatter(Drag_Forces_cds[8],coeff_drags[8], marker='o', color=colors[4])

plt.legend((cd_1, cd_2, cd_3, cd_4, cd_5, cd_6, cd_7,cd_8,cd_9),
           ('Cd_StreamlinedBody', 'Cd_StreamlinedHalfBody', 'Cd_HalfSphere', 'Cd_Sphere', 'Cd_Cone', 'Cd_AngCube', 'Cd_LongCylinder', 'Cd_Cube', 'Cd_ShortCylinder'),
           scatterpoints=1,
           loc='upper left',
           ncol=1,
           fontsize=8)

plt.show()

Graph 1: Velocity vs. Drag force for cyclist travelling with different velocities

Graph 2: Drag Co-efficient vs. Drag force for constant velocity for different drag coefficients with different shapes having same frontal area.

Conclusion

1. Drag Force increases with increases in velocity by a factor of square of velocity.

2. Drag Force is less for Stream line body as it has less drag coefficient, while more for short cylinder.

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.