From 0a18bc4964bf22e12f6007ac3545390887e8dd8a Mon Sep 17 00:00:00 2001 From: Peter Sharpe Date: Mon, 26 Feb 2024 15:45:00 -0500 Subject: [PATCH] adds a test for local thickness --- studies/AirfoilDatabaseQuality/compute_airfoil_quality.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/studies/AirfoilDatabaseQuality/compute_airfoil_quality.py b/studies/AirfoilDatabaseQuality/compute_airfoil_quality.py index 73c0ac5f..077ce88d 100644 --- a/studies/AirfoilDatabaseQuality/compute_airfoil_quality.py +++ b/studies/AirfoilDatabaseQuality/compute_airfoil_quality.py @@ -36,6 +36,9 @@ def compute_airfoil_quality(af: asb.Airfoil): if np.any(af.y() >= 0.5): raise QualityError("Airfoil has abnormally high y-coordinates.") + if np.any(af.local_thickness(x_over_c = np.linspace(0, 1, 101)) < 0): + raise QualityError("Airfoil has negative thickness.") + # Check if the airfoil is self-intersecting if not af.as_shapely_polygon().is_valid: raise QualityError("Airfoil is self-intersecting.")