buffalo_wings.airfoil.write_sampled_airfoil

buffalo_wings.airfoil.write_sampled_airfoil(airfoil, *, path, num_points_per_surface, spacing='cosine', file_format, title='Buffalo Wings Airfoil', include_parameters=True, include_derivatives=True, include_diagnostics=True, indent=2, sort_keys=True)[source]

Sample an airfoil and write the result to a file.

Parameters:
  • airfoil (Airfoil) – Airfoil to sample.

  • path (str | os.PathLike[str]) – Destination file path for the exported output.

  • num_points_per_surface (int) – Number of sample points to generate on each surface.

  • spacing ({"uniform", "cosine"}, default "cosine") – Spacing rule used to distribute surface-local sample parameters.

  • file_format ({"json", "selig", "lednicer"}) – File format to emit.

  • title (str, default "Buffalo Wings Airfoil") – Title line written as the first non-ignored line of text-based coordinate files.

  • include_parameters (bool, default True) – Whether to include sampled xi, surface-local arc length, and native curve parameter vectors when writing JSON.

  • include_derivatives (bool, default True) – Whether to include slope, finite-slope flags, and curvature when writing JSON.

  • include_diagnostics (bool, default True) – Whether to include serialized structured diagnostics when writing JSON.

  • indent (int, default 2) – Indentation level passed to json.dumps when writing JSON.

  • sort_keys (bool, default True) – Whether to sort JSON mapping keys deterministically when writing JSON.

Returns:

Resolved output path after writing the file.

Return type:

pathlib.Path