Project

A function to plot Drag force vs Velocity

\"\"\"
Function to plot Drag force vs Velocity
\"\"\"

import matplotlib.pyplot as plt

# Inputs

#Drag co-efficient
c_d = 0.8

# Frontal area (m^2)
A = 0.1

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

# Bicycle Velocity
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()
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.