...
/Thrust Available and Thrust Required at Sea Level
Thrust Available and Thrust Required at Sea Level
Develop a graph for thrust required and thrust available at sea level.
We'll cover the following...
Let’s talk about importing libraries in Python. You do not need them for this Educative course, but it is another good thing to know!
from numpy import pi
import matplotlib.pyplot as plt
Since you do not need the entire Numpy
library, you can import specific parts of it with the from x import y
syntax. Calling the Matplotlib
object plt
is a common convention, but Python supports any naming convention as long as you are consistent.
The first function will convert knots (kts) to feet per second (fps). Fps is the base unit for velocity in US Imperial units, but most aircraft use knots for velocity. You will show the x-axis of the graph in knots and dynamically calculate the thrust in converting knots to fps.
def knots_to_ftpersec(speed):# speed is the user input and is in knotsreturn speed * 1.68781
x = knots_to_ftpersec(100.0)print('100.0 knots is {} fps'.format(x))
The second function takes density, velocity, wing area, zero-lift drag coefficient Cd0, drag constant K, and aircraft weight and returns the thrust required in lbs. The equation itself is derived from the fact that drag equals thrust at altitude and refactors the drag equation into separate parts. Here is the equation:
...