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
toolspecified- 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 analysisairfoil_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 ifmeais not specified.mea (MEA or None) – Multi-element airfoil object to use if
coordsis not specified. Default:Nonemea_airfoil_names (List[str] or None) – Names of the airfoils contained in the
meato analyzetool (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
XFOILSettingsclass. Must be specified if the"XFOIL"tool is selected. Default:Nonemset_settings (dict or MSETSettings) – A dictionary containing the settings for MSET or an instance of the
MSETSettingsclass. Must be specified if the"MSES"tool is selected. Default:Nonemses_settings (dict or MSESSettings) – A dictionary containing the settings for MSES or an instance of the
MSESSettingsclass. Must be specified if the"MSES"tool is selected. Default:Nonemplot_settings (dict or MPLOTSettings) – A dictionary containing the settings for MPLOT or an instance of the
MPLOTSettingsclass. Must be specified if the"MSES"tool is selected. Default:Nonempolar_settings (dict or MPOLARSettings) – A dictionary containing the settings for MPOLAR or an instance of the
MPOLARSettingsclass. If specified,mplot_settingswill be ignored. Default:Noneexport_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:
Truesave_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_settingsis specified. Default:Nonemultipoint_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: