Project

Week - 1.2 Flow over bicycle

Drag Force Against A Cyclist

Aim: -

Writing a PYTHON program to calculate drag force against a cyclist.

Objectives: -

  1. Able to determine drag force over a bicycle for various bicycle velocities and various Drag Co-efficient values of different shapes with the same frontal area.
  2. Write a program to plot Velocity vs Drag force. (25 points)
  3. Write a program to plot Drag Co-efficient vs Drag force. (25 points)

Description: -

The main obstacle for bicycles is the drag reaction force for cycling action it reduces the speed of the bicycle although we use more energy. This drag force is dependent on many factors like the frontal area, Drag Co-efficient values & bicycle velocities, etc.

In this program, we will mainly focus on how to drag force is going to vary for different velocities and Drag Coefficient values for the same frontal area.

Procedure: -

  1. Give all the input variables required.
  2. Use formulae according to the input variables given.
  3. Extract the results/solutions.
  4. Plot results, Velocity vs Drag force, Drag Co-efficient vs Drag force.

Source Code: -

'''Program to calculate the drag force
'''
import math                         # importing math library
import matplotlib.pyplot as plt     # importing ploting library  

#inputs
A   = 0.1    # Fontal area
rho = 1.2    # Density

# Velocity vs Drag force
n    = 25  # number of velocitys 
v_0  = 1   # starting velocity
v_25 = 1.5   # endinging velocity
v_range = []
# creating velocity points
for i in range(0,n):                     
	v_range.append(v_0+i*(v_25-v_0)/(n-1))

c_d          = 0.8    # Drag coefficient
drag_force_V = []
# Drag force calculation for velocity points
for v in v_range:                       
	drag_force_V.append(0.5*c_d*rho*A*(v**2)) 

# Drag Co-efficient vs Drag force
n     = 25  # number of  Drag Co-efficient
cd_0  = 0.2   # starting Drag Co-efficient
cd_25 = 1   # endinging Drag Co-efficient
cd_range = []
# creating Drag Co-efficient points
for i in range(0,n):                    
	cd_range.append(cd_0+i*(cd_25-cd_0)/(n-1))

velocity  = 3           # velocity
drag_force_cd = []
# Drag force calculation for Drag Co-efficients
for cd in cd_range:
	drag_force_cd.append(0.5*cd*rho*A*(velocity**2)) 

# plots
plt.figure(1)
plt.plot(v_range,drag_force_V) 
plt.xlabel('velocity m/s')   
plt.ylabel('Drag force N') 
plt.title('Velocity vs Drag force')   
plt.grid('on')
plt.show()

plt.figure(2)
plt.plot(cd_range,drag_force_cd) 
plt.xlabel('Drag Co-efficient')    
plt.ylabel('Drag force') 
plt.title('Drag Co-efficient vs Drag force')   
plt.grid('on')
plt.show()

Graphs:-

Conclusions: -

  1. As the velocity of the bicycle increases drag resistant force also increases parabolically.
  2. As the Drag Co-efficient of bicycle increases drag resistant force for movement also increases linearly.
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.