Project

Drag force python

# drag force vs velocity

import matplotlib.pyplot as plt

c_d = 0.9

A= 0.1

rho= 1.2

velocities= [1,2,3,4,5,6,7,8,9,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.show()

# drag force vs drag coeff

import matplotlib.pyplot as plt

coeff = [0.1,0.2,03,0.4,0.5,0.6,0.7,0.8,0.9,1.0]

A= 0.1

rho= 1.2

velocity= 10

drag_forces = []

for c_d in coeff:
drag_forces.append((0.5*rho*A*c_d*velocity*velocity))

plt.plot(coeff,drag_forces)
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.