pymead.analysis.calc_aero_data.calculate_aero_data#

calculate_aero_data(conn: Connection, airfoil_coord_dir: str, airfoil_name: str, coords: List[ndarray] | None = None, mea: MEA | None = None, mea_airfoil_names: List[str] | None = None, tool: str = 'XFOIL', xfoil_settings: dict | None = None, mset_settings: dict | None = None, mses_settings: dict | None = None, mplot_settings: dict | None = None, mpolar_settings: dict | None = None, export_Cp: bool = True, save_aero_data: bool = True, alfa_array: ndarray | None = None, multipoint_tags: List[str] | None = None)[source]#

Convenience function calling either XFOIL or MSES depending on the tool specified

Parameters:
  • conn (multiprocessing.connection.Connection or None) – If not None, a connection established between the worker thread deployed by the GUI over which data can be passed to update the user on the state of the analysis

  • airfoil_coord_dir (str) – The directory containing the airfoil coordinate file

  • airfoil_name (str) – A string describing the airfoil

  • coords (List[numpy.ndarray] or numpy.ndarray) – If using XFOIL: specify a 2-D numpy.ndarray of size \(N \times 2\), where \(N\) is the number of airfoil coordinates and the columns represent \(x\) and \(y\). If using MSES, specify a list of numpy.ndarray, where each list element is an array of airfoil coordinates of size \(N \times 2\). If tool=="MSES", only specify a value for this argument if mea is not specified.

  • mea (MEA or None) – Multi-element airfoil object to use if coords is not specified. Default: None

  • mea_airfoil_names (List[str] or None) – Names of the airfoils contained in the mea to analyze

  • tool (str) – The airfoil flow analysis tool to be used. Must be either "XFOIL" or "MSES". Default: "XFOIL"

  • xfoil_settings (dict or XFOILSettings) – A dictionary containing the settings for XFOIL or an instance of the XFOILSettings class. Must be specified if the "XFOIL" tool is selected. Default: None

  • mset_settings (dict or MSETSettings) – A dictionary containing the settings for MSET or an instance of the MSETSettings class. Must be specified if the "MSES" tool is selected. Default: None

  • mses_settings (dict or MSESSettings) – A dictionary containing the settings for MSES or an instance of the MSESSettings class. Must be specified if the "MSES" tool is selected. Default: None

  • mplot_settings (dict or MPLOTSettings) – A dictionary containing the settings for MPLOT or an instance of the MPLOTSettings class. Must be specified if the "MSES" tool is selected. Default: None

  • mpolar_settings (dict or MPOLARSettings) – A dictionary containing the settings for MPOLAR or an instance of the MPOLARSettings class. If specified, mplot_settings will be ignored. Default: None

  • export_Cp (bool) – Whether to calculate and export the surface pressure coefficient distribution in the case of XFOIL, or the entire set of boundary layer data in the case of MSES. Default: True

  • save_aero_data (bool) – Whether to save the aerodynamic data as a JSON file to the analysis directory

  • alfa_array (np.ndarray or None) – An array of angles of attack (degrees) to sweep through. Ignored unless mpolar_settings is specified. Default: None

  • multipoint_tags (List[str] or None) – Multipoint stencil tags that will modify the name of the field, grid, and grid stats files if they are generated to allow for field plots of each point in the stencil. These names will appear as "field_<multipoint_tags[stencil_idx]>.<airfoil_name>", etc. If specified, this list must have a length equal to the number of stencil points. Default: None

Returns:

A dictionary containing the evaluated aerodynamic data and the path to the log file

Return type:

dict, str