Package geomss.geom.cst
Class CSTClassFunction
- java.lang.Object
-
- geomss.geom.cst.CSTClassFunction
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,javolution.lang.Immutable,javolution.lang.ValueType,javolution.xml.XMLSerializable
public final class CSTClassFunction extends java.lang.Object implements java.lang.Cloneable, javolution.xml.XMLSerializable, javolution.lang.ValueType
A generic Class-Shape-Transform (CST) class function implementation. The "class" of the function is determined by the input exponents: C(s) = (s)^N1*(1 - s)^N2.Modified by: Joseph A. Huwaldt
- Version:
- February 22, 2025
- Author:
- Joseph A. Huwaldt Date: March 14, 2014
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static CSTClassFunctionBLUNTNOSED_AIRFOILA class function for a blunt-nosed airfoil (subsonic airfoil).static CSTClassFunctionCONE_WEDGEA class function for a cone or wedge shape.static CSTClassFunctionELLIPTICALA class function for an elliptical shape/airfoil.static CSTClassFunctionRECTANGULARA class function for a rectangular shape.static CSTClassFunctionSEARS_HAACKA class function for a Sears-Haack minimum wave-drag body profile.static CSTClassFunctionSHARPNOSED_AIRFOILA class function for a sharp-nosed airfoil (supersonic airfoil).
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CSTClassFunctioncopy()Returns a copy of this CSTClassFunction instanceallocatedby the calling thread (possibly on the stack).booleanequals(java.lang.Object obj)Compares this CSTClassFunction against the specified object for strict equality (same values).double[]getDerivatives(double s, int grade)Calculate all the derivatives from0togradewith respect to parametric distance on the class function for the given parametric distance along the class function,d^{grade}p(s)/d^{grade}s.doublegetN1()Return the first exponent of the class function, N1.doublegetN2()Return the second exponent of the class function, N2.doublegetValue(double s)Return the value of this class function at the specified parametric location.inthashCode()Returns the hash code for this object.static CSTClassFunctionnewInstance(double N1, double N2)Construct a new CST Class Function using the specified exponents.
-
-
-
Field Detail
-
BLUNTNOSED_AIRFOIL
public static final CSTClassFunction BLUNTNOSED_AIRFOIL
A class function for a blunt-nosed airfoil (subsonic airfoil).
-
SHARPNOSED_AIRFOIL
public static final CSTClassFunction SHARPNOSED_AIRFOIL
A class function for a sharp-nosed airfoil (supersonic airfoil).
-
ELLIPTICAL
public static final CSTClassFunction ELLIPTICAL
A class function for an elliptical shape/airfoil.
-
SEARS_HAACK
public static final CSTClassFunction SEARS_HAACK
A class function for a Sears-Haack minimum wave-drag body profile.
-
CONE_WEDGE
public static final CSTClassFunction CONE_WEDGE
A class function for a cone or wedge shape.
-
RECTANGULAR
public static final CSTClassFunction RECTANGULAR
A class function for a rectangular shape.
-
-
Method Detail
-
newInstance
public static CSTClassFunction newInstance(double N1, double N2)
Construct a new CST Class Function using the specified exponents.- Parameters:
N1- The 1st exponent of the class function (leading edge exponent).N2- The 2nd exponent of the class function (trailing edge exponent).- Returns:
- A new CST Class Function using the specified exponents.
-
getN1
public double getN1()
Return the first exponent of the class function, N1.- Returns:
- The first exponent of the class function.
-
getN2
public double getN2()
Return the second exponent of the class function, N2.- Returns:
- The second exponent of the class function.
-
getValue
public double getValue(double s)
Return the value of this class function at the specified parametric location.- Parameters:
s- The parametric distance to calculate this class functions value for (0 to 1 inclusive).- Returns:
- The value of this class function at the specified parametric location.
-
getDerivatives
public double[] getDerivatives(double s, int grade)
Calculate all the derivatives from0togradewith respect to parametric distance on the class function for the given parametric distance along the class function,d^{grade}p(s)/d^{grade}s.Example:
1st derivative (grade = 1), this returns[p(s), dp(s)/ds];
2nd derivative (grade = 2), this returns[p(s), dp(s)/ds, d^2p(s)/d^2s]; etc.- Parameters:
s- Parametric distance to calculate derivatives for (0.0 to 1.0 inclusive).grade- The maximum grade to calculate the derivatives for (0 = value only, 1=value + 1st derivative, 2=value + 1st derivative + 2nd derivative, etc)- Returns:
- A list of derivatives up to the specified grade of the class function at the specified parametric position.
- Throws:
java.lang.IllegalArgumentException- if the grade is < 0.
-
equals
public boolean equals(java.lang.Object obj)
Compares this CSTClassFunction against the specified object for strict equality (same values).- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- the object to compare with.- Returns:
trueif this object is identical to that object;falseotherwise.
-
hashCode
public int hashCode()
Returns the hash code for this object.- Overrides:
hashCodein classjava.lang.Object- Returns:
- the hash code value.
-
copy
public CSTClassFunction copy()
Returns a copy of this CSTClassFunction instanceallocatedby the calling thread (possibly on the stack).- Specified by:
copyin interfacejavolution.lang.ValueType- Returns:
- an identical and independent copy of this object.
-
-