Skip to content

ppinuzz/XFOIL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XFOIL

XFOIL 6.99 as downloaded from the XFOIL website on 23/01/2026

Original authors:

How to use XFOIL

(Optional, but suggested) Add xfoil.exe's parent directory to the PATH environment variable.

  • XFOIL is case insensitive
  • Type ? to list all the options available in a submenu
  • Exit from a menu/submenu pressing Enter
  • A dot . in front of an option (e.g. .PLOP) means that there's a submenu (e.g. typing plop will open a submenu, rather than execute a command)
  • A (lowercase) letter after the a command name means that it takes in input:
    • f: a file
    • i: an integer
    • r: a float
    • s: a string (text) If not passed as input directly with the command, often you're asked for input
  • An i right after a submenu name (e.g. OPERi) means that you're running in inviscid mode
  • The $C_p$ axis of the $C_p$ plot is reversed

Example of simulation of a NACA airfoil:

  1. Generate the airfoil: naca 2412 (or type only naca and it will ask you for the code)
  2. (Optional) change paneling option: ppar, then change what you want (e.g. n 120 to set the number of panels to 120) and press Enter again to have the figure updated
  3. Go back to the main menu (press Enter) and enter the oper menu to run the calculation
  4. Set the angle of attack to 0° with alpha 0
  5. If you want to find the angle to have a given $C_L$ coefficient (e.g. $C_L = 0$): CLI 0 (or CL 0, if it's a viscous calculation). In the plot window, $\alpha$ has now changed
  6. To change to viscous mode: Visc, then it'll ask your for $Re$ and the prompt will change to .OPERv (submenu, direct operating point, viscous)
  7. You can specify $Ma$ with Mach and XFOIL will add a compressibility correction
    • DO NOT use $Ma > 0.5$, as XFOIL is unreliable with transonic or high-subsonic flows
  8. Speficy the angle of attack (e.g. alfa 0) to run the solution
    • Dashed lines: inviscid solution
    • Coloured lines: viscous solution (for colours: see airfoil plot below graph)
    • $N_{cr}$ in the output is the critical amplification factor for the $e^N$ transition model used in XFOIL In the solver log, you have:
    • The total drag coefficient CD and its viscous (friction) component CDf and pressure component CDp
    • The coordinate of the laminar-to-turbulent transition point, on both sides, as $x/c$
  9. XFOIL takes the last solution you computed as an initial guess for the next one, no matter how far apart they are. If they're very far away, it might not converge. To fix this, you can:
    • increase the max number of iterations (default: 10): ITER
    • manually give a solution as initialisation:
      1. INIT will activate the initialisation flag
      2. Alfa 0 will solve the (viscous, in this case) $\alpha = 0$ case, this solution will be used as an initial guess
      3. run the simulation as always with, say, alfa 12 to get the solution (which has been initialised explicitly with the $\alpha = 0$ case)
  10. To run XFOIL for more angle of attacks (or more $C_L$ values, useful to have different operating point to plot a polar curve): ASeq and it'all ask for first, last and step angle values
    • If XFOIL doesn't converge for one operating point, that point won't be reported on the screen
  11. Up to now, results are discarded at each new run. To store them, you must run in polar accumulation mode: Pacc
    • No idea what the polar dump file is (is it binary?)
    • Both the polar save file and polar dump file paths are w.r.t. the folder where XFOIL has been launched (i.e. the folder where you are, if you've added XFOIL path to the PATH variable) Now the prompt is .OPERva, where a stands for accumulation mode. Whatever you do now will be accumulated in the accumulation file you provided.
  12. You can store more "polar objects": to create a new one, exit from polar accumulation mode using Pacc again and then enter again in polar accumulation mode
    • PSOR sorts the operating point from smaller to larger $\alpha$, but NOT in the polar save file you created previously
    • PLIS lists all the polar objects you have in memory
    • using PWRT you can write the polar object to a file, without the need to create a polar file before launching the simulation (e.g. create several operating points not in order > sort them > write the sorted polar object to file, OR some points in the polar sequence didn't work because they're too far away from the initial solution: manually run those operating point to make them converge > sort point > write to file)
    • PREM to erase a point from a polar (e.g. 0 point used for initialisation and -0.0 point calculated by XFOIL: same, but numerically considered different)
  13. To plot a polar: PPlo (you must be in polar accumulation mode)

Next video: 2

Useful links

About

Mark Drela's XFOIL 6.99 code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors