Qprop2 - Modern Fortran Implementation
Qprop2 - Modern Fortran Implementation#
My introduction to programming came in 19655 while I was a freshman at Virginia Tech, majoring in Aerospace Engineering, and working as a Cooperative Engineering student at McDonnell Aircraft in st. Louis to pay my way through school. My first assignment at “Mac” in the Flight Test Division where brand new F4 - Phantom II fighter jets were being test flown fresh off of the assembly line. As someone on a quest to figure out how things managed to fly, this was paradise!
from IPython import display
display.Image("Phantom.png")

During some of the flight tests, a machine was installed that recorded the readings from various sensors on the plane on a roll of paper that engineers had to read to figure out what had happened on a test flight. When I started working here, they also had newer versions of test equipment that recorded the same data on magnetic tape. My boss for that assignment was the flight test engineer who managed several of the Project High Jump world-record flights, including the one where John Young, future NASA Astronaut, flew a Navy Phantom to 80,000 feet in just over three minutes from take-off!
My boss offered me a choice for my job at Mac. Either I spend my time measuring the squiggles on the paper readouts and recorded them manually, or I learned how to read the magnetic tapes using something called FORTRAN. I decided that learning this new thing was going to be far more interesting, so he plopped a huge manual on my desk and told me to read it. Yikes!
Programming in those days involved typing in a program on a machine that punched holes in a card, then assembling a stack of cards and submitting them to the wizards who were allowed to touch actual computers. They would wave their magic wand over the cards and hours later you got your cards back along with a stack of fan-folded paper with the results of your work. Little did I realize at the time, but that would be a process I would repeat thousands of times through my college career, and into my Air Force career right up until I started teaching Computer Science for the Air Force!
FORTRAN in those days was not a nice language. There were many quirks in how you put a program together I learned most of the tricks and became quite proficient in generating complex programs that ran on state-of-the-art machines, including early supercomputers. That was actually what started me off in my Computer Science career. Looking at code developed back then after teaching modern computer programming techniques is almost painful. The newer approach to programming leads to code that is much easier to read, and is usually more free from bugs.
So, when I got interested in looking into two very popular analysis tools for designing airfoils and propellers and found Mark Drela’s Xfoil[Dreb] and Qprop[Drea] programs, I discovered code that took me right back to the programming world I grew up in. Amazingly, the code still worked on modern machines, but understanding how it worked required tracing complex flow through a stack of statements that really seemed to have minimal organization. (Mark, if you read this, no disrespect intended!)
This project started off as an attempt to really understand how these two programs works, and along the way, recast then in the most recent dialect of Fortran, one which adds features to generate programs suitable for running on today’s high-performance parallel machines.
The development documented here is a recreation of Qprop, which will be called Qprop2 for convenience. The program will be runnable using pure Fortran, or with a Python front end with a GUI interface to make driving the code more user friendly. At present this is a work in progress, so be warned: not everything is in a final state.