Class CSTCurveUtils


  • public final class CSTCurveUtils
    extends java.lang.Object
    A collection of methods for working with Class-Shape-Transform or CSTCurve curves.

    Modified by: Joseph A. Huwaldt

    Version:
    December 23, 2019
    Author:
    Joseph A. Huwaldt, Date: October 9, 2015
    • Method Detail

      • approxAirfoilPoints

        public static BasicCSTCurve approxAirfoilPoints​(int order,
                                                        GeomVector<javax.measure.quantity.Dimensionless> xhat,
                                                        Parameter<javax.measure.quantity.Length> rLE,
                                                        GeomVector<javax.measure.quantity.Dimensionless> tanTE,
                                                        PointString<?> points,
                                                        Parameter<javax.measure.quantity.Length> tol)
                                                 throws RootException
        Method that returns a BasicCSTCurve that approximates the input list of points on either the upper or lower surface of a blunt nosed airfoil. This is useful to approximate a specific airfoil or blunt LE body shape. This method offers control over the leading edge radius and the trailing edge slope. The input points must be ordered from leading edge to trailing edge and must be co-planar. In addition, the input xhat (chord- wise direction vector) must be parallel to or contained in the plane containing the points. The origin of the resulting CSTCurve will be taken as the first point in the input list of points and the trailing edge offset will be taken as the distance from the last point in the input list to the line formed by passing xhat through the origin point. Finally, the points must represent a shape that can be modeled by a blunt-nosed CST curve with the given class function or the fit will be very poor.
        Parameters:
        order - The order for the Bezier curve used for the shape function. This controls the accuracy that the input points are approximated.
        xhat - The chord-wise direction to assume for the input points. This vector must lie parallel to the plane containing the points being approximated. May not be null.
        rLE - The LE radius to use for the airfoil. May not be null.
        tanTE - The trailing edge tangent vector on the airfoil curve. May not be null.
        points - The list of airfoil points ordered from leading edge to trailing edge to be approximated by a CSTCurve. May not be null.
        tol - The tolerance to use when determining if the input points are co-planar. May not be null.
        Returns:
        A new BasicCSTCurve that approximates the input list of points. The user data with the key "CHISQ" contains the chi-squared measure of the fit. A value near zero indicates a perfect fit.
        Throws:
        RootException - if a fit to the points could not be made.
      • getThicknessDist

        public static BasicCSTCurve getThicknessDist​(CSTCurve upper,
                                                     CSTCurve lower)
        Return a BasicCSTCurve that represents the thickness distribution for an airfoil formed by the input upper and lower airfoil curves. The input curves must be of the same order.
        Parameters:
        upper - The CSTCurve that represents the upper surface of the airfoil. May not be null.
        lower - The CSTCurve that represents the lower surface of the airfoil. May not be null.
        Returns:
        A curve that represents the thickness distribution for the airfoil. The returned curve will have the same units, dimensions, origin, chord and trailing edge thickness as the input upper surface curve.
      • getCamberDist

        public static BasicCSTCurve getCamberDist​(CSTCurve upper,
                                                  CSTCurve lower)
        Return a BasicCSTCurve that represents the camber distribution for an airfoil formed by the input upper and lower airfoil curves. The input curves must be of the same order.
        Parameters:
        upper - The CSTCurve that represents the upper surface of the airfoil. May not be null.
        lower - The CSTCurve that represents the lower surface of the airfoil. May not be null.
        Returns:
        A curve that represents the camber distribution for the airfoil. The returned curve will have the same units, dimensions, origin, chord and trailing edge thickness as the input upper surface curve.