Project

Flow over a bicycle using Python -skill lync

  • AIM

To calculate the drag force against a cyclist and to plot drag force vs velocity and drag force vs drag coefficient

  • Objective:

To Study and Calculate the drag force and to find out the relationship between Drag Force VS Velocity of the Bicycle and Drag Force VS Coefficient of Drag -- for various positions during cycling.

  • Theory :

Drag is the resistive force against motion of object in fluid it is a mechanical force developed due to solid and fluid interaction. Drag is generated by the difference in velocity between the solid object and the fluid. if there is no difference there will be no drag .in our case cyclist is moving in and th resistance which oppose the motion is basically drag.

now from above figure we can see that how drag is acting and the frontal area will continuously will change as cyclist will move crank so here most important parameter is drag coefficient which will affect the drag force . drag coefficient values will depend upon various geometrical shapes , velocity, frontal area,etc.

  • Case1:

Initially we take input from user of Drag coefficients, Area and velocity. We consider drag coefficient is 0.8 , density of air 1.2 kg/m^3 and area is 0.1 m^2 also drag force is calculated with different values of velocity stored in the array to understand the variation of velocity with drag force in Matlab. then we can calculate drag coefficient from the drag force equation which is ,

Drag force f= 12pV2A2Cdf= 12pV2A2Cd

Where ,

p= density of air in kg/m3

A= Frontal area of bicycle in m2

v= velocity of bicycle in m/S

f= drag force

Cd= drag coefficent

With the help of given data we can plot a graph of drag force wrt velocity And lebel it by considering velocity is on xlabel and drag force on ylable ,

import math
import matplotlib.pyplot as plt
import numpy

#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 = numpy.linspace(1,5,10)
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.title('drag_forces vs velocity')
plt.grid()
plt.savefig('drag_forces vs velocity')
plt.show()import math
import matplotlib.pyplot as plt
import numpy

#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 = numpy.linspace(1,5,10)
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.title('drag_forces vs velocity')
plt.grid()
plt.savefig('drag_forces vs velocity')
plt.show()
  • Case2:

To draw the graph between drag coefficient and drag force here we will take some different values of drag coefficient in array form by considering its shapes which is bullet,airfoil,prism,sphere,flatplate.Then will can calculate drag coefficient from drag force equation

import math
import matplotlib.pyplot as plt
import numpy

#inputs

#drag coeffecient (unitless)

c_d=[0.295,1.14,0.045,0.07,1.28]

#frontal area
a=0.4

#air density
rho=0.8

velocity=4

drag_force=[]

for i in range(0,5):
    drag_force.append(0.5*c_d[i]*a*rho*velocity*velocity)
plt.figure()
plt.plot(c_d,drag_force)
plt.xlabel('Coeffecient of Drag')
plt.ylabel('Drag Force')
plt.title('drag_force vs c_d')
plt.grid()
plt.savefig('Cd vs Drag Force ')
print(drag_force)
plt.show()
  • OUTPUT PLOT :
  • plot drag_force vs velocity
  • plot drag_force vs c_d
  • conclusion : from the plot of velocity vs drag force it is clear that, drag force increase rapidly when velocity increase .

From Drag coefficient and drag force plot it can be concluded that drag force and drag coefficient varies linearly and with increase in value of drag coeffiecient, drag force increases.

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.