Conclusion for Rocket Launches and Dynamic Pressure

Ending thoughts for dynamic pressure experienced by a rocket during launch.

Matplotlib is a great library for building data visualization tools. This example is just a small sample of what the library can help you display and accomplish. Matplotlib also allows you to embed and export the charts to various formats, such as pdf, svg, and others. Combined with Scipy and Numpy, Matplotlib is a great tool for displaying data in new and interesting ways. You were able to use Matplotlib and some physics to plot maximum aerodynamic pressure, called Max Q, as a function of time.

In reality, rockets do not have constant acceleration. The acceleration will vary depending on atmospheric conditions, the altitude of the rocket, the engine performance, and more. However, the assumption of constant acceleration allows you to use simple physics equations to model Max Q. The constant acceleration is probably a pretty bad assumption, considering even with a low acceleration of 20 fts2\frac{ft}{s^2}, the Max Q is around 400 million pounds per square foot.

Nonetheless, the assumptions are a good way to get a first-order guess onto the graph to show what Max Q is and why it occurs. In later chapters, you will be able to animate graphs with Matplotlib. This graph and iterative programming process also demonstrate a core tenet of engineering: even if you have all of the mathematical models possible, you still need to sanity-check the output to verify that it makes sense. If you put garbage into a model or equation that you do not understand, you will most likely get garbage out of it, too.

The program in this lesson uses a Python convention of if __name__ == "__main__":. Any Python program you write could be imported by a different program if you so desired. If you were to do this, anything at the zero-indent level would get run on import. __main__ is a hidden method invoked whenever you directly run a program. In essence, this if statement is insurance against only running the main part of the program when you mean to. You will not need to worry too much about it since the program would still run the same if you delete that if statement and re-indent everything to the zero-indent level.

Get hands-on with 1400+ tech skills courses.