pymead.optimization.airfoil_matching.airfoil_symmetric_area_difference#

airfoil_symmetric_area_difference(parameters: list, geo_col: GeometryCollection, target_airfoil: str, airfoil_to_match_xy: ndarray, output_coords: bool = False) float[source]#

This method uses the shapely package to convert the parametrized airfoil and the “discrete” airfoil to Polygon objects and calculate the boolean symmetric difference (a similarity metric) between the two airfoils.

Parameters:
  • parameters (list) – A list of parameter values used to override the design variable values found in the geometry collection.

  • geo_col (GeometryCollection) – Geometry collection 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_xy (np.ndarray) – Set of airfoil \(xy\)-coordinates to be matched

  • output_coords (bool) – If False, only the symmetric area difference will be returned. Otherwise, the symmetric area difference, and current matching coordinates will be returned.

Returns:

The boolean symmetric area difference between the parametrized airfoil and the discrete airfoil, and possibly the current matching airfoil coordinates.

Return type:

float or (float, numpy.ndarray, numpy.ndarray)