Project

Bicycle Drag Force Calculation and plotting

INTRODUCTION

Drag force encountered by a bicycle due to air.

SNAPSHOTS

\"\"

\"\"

CODE

# Drag Force_using array for v
# program to calculate the drage force

import matplotlib.pyplot as plt 
# plt.switch_backend(\"TkAgg\")

#inputs

c_d = 0.8 	# Drag coefficient
A = 0.1 	# frontal Area
rho = 1.2 	# density
drag_coeff = []

v = [5,6,7,8,9,10,11,12] # bicycle velocity array
drag_force = []

#Drag force calculation

for velocity in v :
	print(0.5*rho*c_d*velocity*velocity*A)



for velocity in v :
	drag_force.append(0.5*rho*c_d*velocity*velocity*A) # append keeps on adding the value in the array in the last of the array
	drag_coeff.append(c_d)

print(drag_force)

plt.plot(v,drag_force)
plt.xlabel (\'Velocity\')
plt.ylabel (\'Drag Force\')
plt.show()

plt.plot(drag_coeff,drag_force)
plt.xlabel (\'Drag coefficient\')
plt.ylabel (\'Drag Force\')
plt.show()
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.