pymead.analysis.calc_aero_data.XFOILSettings#

class XFOILSettings(base_dir: str, airfoil_name: str, Re: float = 1000000.0, Ma: float = 0.1, mode: int = 0, timeout: float = 8.0, iterations: int = 150, xtr: List[float] | None = None, N: float = 9.0, visc: bool = True, alfa: float = 0.0, Cl: float = 0.0, Cli: float = 0.0)[source]#

Bases: object

__init__(base_dir: str, airfoil_name: str, Re: float = 1000000.0, Ma: float = 0.1, mode: int = 0, timeout: float = 8.0, iterations: int = 150, xtr: List[float] | None = None, N: float = 9.0, visc: bool = True, alfa: float = 0.0, Cl: float = 0.0, Cli: float = 0.0)[source]#

Defines a set of reasonable default inputs to run_xfoil or calculate_aero_data with tool="XFOIL".

Parameters:
  • base_dir (str) – Base directory for the airfoil analysis. All the files used in an XFOIL analysis can be found in base_dir/airfoil_name

  • airfoil_name (str) – Used to name the end of the file path where the airfoil analysis will take place

  • Re (float) – Reynolds number (ignored if visc==False). Default: 1.0e6

  • Ma (float) – Mach number. Values near or above 1.0 will produce highly inaccurate results due to unmodeled shock waves. Default: 0.1

  • mode (int) – If 0, the angle of attack defined by alfa is prescribed. If 1, the viscous lift coefficient defined by Cl is prescribed. If 2, the inviscid lift coefficient defined by Cli is prescribed.

  • timeout (float) – If XFOIL runs longer than this time (in seconds), the run will be terminated prior to convergence. Default: 8.0

  • iterations (int) – Maximum number of iterations allowed by XFOIL in viscous mode. Default: 150

  • xtr (List[float] or None) – Two-element list consisting of \(x/c\)-locations of the upper and lower airfoil surfaces. If None is specified, a default value of [1.0, 1.0] will be used. This value corresponds to free transition on both surfaces.

  • N (float) – Envelope method exponent, 9.0 for an average wind tunnel. See the “Transition Criterion” section of the XFOIL user guide for more details and additional flow conditions. Default: 9.0

  • visc (bool) – Whether to include a boundary layer model in the airfoil analysis. Default: True

  • alfa (float) – Angle of attack in degrees. Ignored unless mode==0. Default: 0.0

  • Cl (float) – Viscous lift coefficient to prescribe. Ignored unless mode==1. Default: 0.0

  • Cli (float) – Inviscid lift coefficient to prescribe. Ignored unless mode==2. Default: 0.0

Methods

get_dict_rep()

Gets a Python dictionary description of the XFOIL analysis parameters.

Attributes

mode_prescribe_mapping

get_dict_rep() dict[source]#

Gets a Python dictionary description of the XFOIL analysis parameters. Used in run_xfoil and calculate_aero_data.

Returns:

XFOIL analysis parameters

Return type:

dict