XFOIL Tutorial

Back to Landing Page

XFOIL is an interactive program for the design and analysis of subsonic isolated airfoils. It consists of a collection of menu-driven routines which perform various useful functions such as:

- From MIT XFOIL Webpage -

XFOIL is primarily used in the drag buildup process to collect profile drag information for a specified airfoil under various flight conditions (Cdp column in the airfoil polar) as well as to model the stall condition for a wing section. Additionally, XFOIL can be used to define an optimal airfoil profile for a given set of initial conditions. This is extremely useful in developing experimental aircraft in the early stages of design.

A PDF version of this guide may be found here.

Using XFOIL to obtain Airfoil Polars

This is only a guide to obtain values for a specified airfoil and not a total user manual for XFOIL. For complete instructions go to the MIT XFOIL user manual. For the purposes of this guide, it is assumed that you are using Windows.

An extensive database of known aircraft airfoils can be found at the University of Illinois (UIUC) Incomplete Guide to Airfoil Usage.

A database of .dat and .gif files for airfoil profiles is at the UIUC Airfoil Coordinates Database.

Type ? at any command line to see a list of available commands and their descriptions.

  1. Open CMD.
  2. Change the directory to the folder location of xfoilp4.exe
  3. Execute XFOILP4
    1. You may also preload your .dat airfoil coordinates by adding the argument after the command. For example: XFOILP4 NACA0015 or XFOILP4 NACA652415.DAT
  4. The number of nodes should be at LEAST 100. You may get a warning that the number of nodes is too small. This is a warning that the resolution of your coordinate file is too low. This is fixed using the PANE or PPAR commands.
    1. PANE will set the number of panels to be sufficient for XFOIL. You may not see a change in the profile.
    2. PPAR will show the new paneling if you changed the number with PANE. If not, you may begin with PPAR.
      1. Type N to change the number of nodes. Use the PANE number shown as a guide. More nodes have a higher resolution but run slower.
      2. When finished, the profile should be smooth. Enter key until XFOIL is displayed.
  5. You may choose to save the new, smooth profile to the folder using the SAVE command.
  6. Enter operating point mode by entering OPER.
  7. OPERi indicates that you are operating in inviscid mode. For the purposes of finding reasonable data, you will generally want to operate in viscous mode. Enter Visc to toggle modes. OPERv should be displayed.
  8. If you have not already done so, a Reynold’s number will be requested. Enter the value at this line.
  9. Initially, the iteration number is very low. Change this to at least 200 using ITER.
  10. You must now specify the operating conditions using commands.
    1. Change the Mach number with Mach. Similar to other commands this may be followed by an argument if you like. Enter the Mach number.
    2. If only a single angle of attack value is needed, use Alfa. This will show the results in the display. If a sequence of attack angle is needed, proceed to the next step.
  11. In order to write the polar to a file to read, you MUST designate that you want the data points to be saved. This is done using the Pacc command.
    1. Specify the polar save file name and file extension.
    2. Specify the dump file name and file extension if needed. Otherwise, hit Enter to skip.
    3. OPERva should be displayed.
  12. Specify the attack angle range using Aseq. If you are performing a range of speeds, proceed to step 14.
    1. Enter the minimum alpha.
    2. Enter the maximum alpha.
    3. Enter the angle step size.
  13. The program should run through many iterations and display that the information was saved to your polar file. The display should also reflect the new information and you can see the distribution of CD there.
  14. If you are performing a range of speeds for cruise conditions:
    1. Enter the Reynolds number using Re
    2. Enter the Mach number using Mach
    3. Enter the CL required for steady flight using CL
  15. The program will run through several iterations. If the program returns a “not converged” error, the speeds may be too slow for flight (i.e. stall). Slightly change the CL to see if this is simply a case of computation error or if the wing is actually stalled (stall will result in non-convergence repeatedly).
  16. The polar file is now ready for import or view.
    1. If using MS Excel, use File→Load→All Files→Polar File Name
    2. Click Finish to open the data as a spreadsheet.
    3. Check that each data entry is in the proper cell then copy the data into the Drag Buildup Workbook Profile Drag section.

Back to Landing Page