pymead.optimization.airfoil_matching.match_airfoil#

match_airfoil(conn: Connection, geo_col_dict: dict, target_airfoil: str, airfoil_to_match: str, repair: Callable | None = None)[source]#

This method uses the sequential least-squares programming optimization scheme to minimize the boolean symmetric area difference between the input Airfoil and a set of “discrete” airfoil coordinates

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

  • geo_col_dict (dict) – Dictionary produced by the GeometryCollection.get_dict_rep method from which the Airfoil is selected by the target_airfoil name and where the design variables are stored. During the optimization, any values in the design variable sub-container will be updated to produce an airfoil geometry that closely matches the airfoil coordinates specified by airfoil_to_match.

  • target_airfoil (str) – Airfoil from the geometry collection to match. For example, use "Airfoil-1" to match the airfoil with the same name found in the airfoil sub-container of the geometry collection. Only one airfoil may be matched at a time.

  • airfoil_to_match (str or np.ndarray) – Set of airfoil \(xy\)-coordinates to be matched, or a string representing the name of the airfoil to be fetched from Airfoil Tools.

  • repair (Callable or None) – An optional function that takes that makes modifications to the set of \(xy\)-coordinates loaded from Airfoil Tools. This function should take exactly one input (the \(N \times 2\) numpy.ndarray representing the \(xy\)-coordinates downloaded from Airfoil Tools) and return this array as the output. Default: None

Returns:

Results object returned by the optimizer

Return type:

scipy.optimize.OptimizeResult