3.4.0
Functions for surface area calculations

Functions

TiglReturnCode tiglFuselageGetSegmentSurfaceArea (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, int segmentIndex, double *surfaceAreaPtr)
 Returns the surface area of a segment of a fuselage. More...
 
TiglReturnCode tiglFuselageGetSurfaceArea (TiglCPACSConfigurationHandle cpacsHandle, int fuselageIndex, double *surfaceAreaPtr)
 Returns the surface area of the fuselage. Currently, the area includes also the faces on the fuselage symmetry plane (in case of a symmetric wing). This is in particular a problem for fuselages, where only one half side is defined in CPACS. In future releases, these faces will not belong anymore to the surface area calculation. More...
 
TiglReturnCode tiglGetCrossSectionArea (TiglCPACSConfigurationHandle cpacsHandle, const char *componentUID, double origin_x, double origin_y, double origin_z, double normal_x, double normal_y, double normal_z, double *area)
 tiglGetCrossSectionArea returns the area of the intersection of either the fused aircraft or its component (via UID) with a plane. The function can be used for Whitcomb's area rule. If no intersections are found, the resulting area is zero. No warning or error is thrown in this case. If more than one intersection is found, the returned area is the sum of the areas of the intersections. No warning or error is thrown. In the case that the UID of the whole airplane is given, the airplane will be fused before the calculation of the intersections is performed. More...
 
TiglReturnCode tiglWingGetReferenceArea (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, TiglSymmetryAxis symPlane, double *referenceAreaPtr)
 Returns the reference area of the wing. More...
 
TiglReturnCode tiglWingGetSegmentLowerSurfaceAreaTrimmed (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta1, double xsi1, double eta2, double xsi2, double eta3, double xsi3, double eta4, double xsi4, double *surfaceArea)
 Computes the area of the trimmed lower wing segment surface. This function can be e.g. used to determine the area of the wing flaps. More...
 
TiglReturnCode tiglWingGetSegmentSurfaceArea (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double *surfaceAreaPtr)
 Returns the surface area of a segment of a wing. This includes only the area of the upper and lower wing segment surface and does not include the trailing edge or any closing faces. More...
 
TiglReturnCode tiglWingGetSegmentUpperSurfaceAreaTrimmed (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, int segmentIndex, double eta1, double xsi1, double eta2, double xsi2, double eta3, double xsi3, double eta4, double xsi4, double *surfaceArea)
 Computes the area of the trimmed upper wing segment surface. This function can be e.g. used to determine the area of the wing flaps. More...
 
TiglReturnCode tiglWingGetSurfaceArea (TiglCPACSConfigurationHandle cpacsHandle, int wingIndex, double *surfaceAreaPtr)
 Returns the surface area of the wing. Currently, the area includes also the faces on the wing symmetry plane (in case of a symmetric wing). In coming releases, these faces will not belong anymore to the surface area calculation. More...
 
TiglReturnCode tiglWingGetWettedArea (TiglCPACSConfigurationHandle cpacsHandle, const char *wingUID, double *wettedAreaPtr)
 Returns the wetted area of the wing. If the wing has no parent (fuselage), it returns the surface area of the wing. More...
 

Detailed Description

Function for surface area calculations of wings/fuselages.

Function Documentation

◆ tiglFuselageGetSegmentSurfaceArea()

TiglReturnCode tiglFuselageGetSegmentSurfaceArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
int  segmentIndex,
double *  surfaceAreaPtr 
)

Returns the surface area of a segment of a fuselage.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexThe index of a fuselage, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[out]surfaceAreaPtrThe pointer to a variable for the surface area of the fuselage-segment
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if fuselageIndex, sectionIndex or elementIndex are not valid
  • TIGL_NULL_POINTER if surfaceAreaPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglFuselageGetSurfaceArea()

TiglReturnCode tiglFuselageGetSurfaceArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  fuselageIndex,
double *  surfaceAreaPtr 
)

Returns the surface area of the fuselage. Currently, the area includes also the faces on the fuselage symmetry plane (in case of a symmetric wing). This is in particular a problem for fuselages, where only one half side is defined in CPACS. In future releases, these faces will not belong anymore to the surface area calculation.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]fuselageIndexIndex of the Fuselage to calculate the area, starting at 1
[out]surfaceAreaPtrThe surface area of the wing
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if fuselageIndex is less or equal zero
  • TIGL_ERROR if some other error occurred

◆ tiglGetCrossSectionArea()

TiglReturnCode tiglGetCrossSectionArea ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  componentUID,
double  origin_x,
double  origin_y,
double  origin_z,
double  normal_x,
double  normal_y,
double  normal_z,
double *  area 
)

tiglGetCrossSectionArea returns the area of the intersection of either the fused aircraft or its component (via UID) with a plane. The function can be used for Whitcomb's area rule. If no intersections are found, the resulting area is zero. No warning or error is thrown in this case. If more than one intersection is found, the returned area is the sum of the areas of the intersections. No warning or error is thrown. In the case that the UID of the whole airplane is given, the airplane will be fused before the calculation of the intersections is performed.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]componentUIDUID of a geometric component or the whole plane
[in]origin_xx-component of the origin of the plane
[in]origin_yy-component of the origin of the plane
[in]origin_zz-component of the origin of the plane
[in]normal_xx-direction of the normal of the plane
[in]normal_yy-direction of the normal of the plane
[in]normal_zz-direction of the normal of the plane
[out]areaThe area of the intersection of the aircraft with the plane
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_MATH_ERROR if the normal of the plane is zero
  • TIGL_ERROR if some other error occurred

◆ tiglWingGetReferenceArea()

TiglReturnCode tiglWingGetReferenceArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
TiglSymmetryAxis  symPlane,
double *  referenceAreaPtr 
)

Returns the reference area of the wing.

The reference area of the wing is calculated by taking account the quadrilateral portions of each wing segment by projecting the wing segments into the plane defined by the user. If projection should be avoided, use TIGL_NO_SYMMETRY as symPlane argument.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexIndex of the Wing to calculate the area, starting at 1
[in]symPlanePlane on which the wing is projected for calculating the refarea. Values can be:
  • TIGL_NO_SYMMETRY, the wing is not projected but its true 3D area is calculated
  • TIGL_X_Y_PLANE, the wing is projected onto the x-y plane (use for e.g. main wings and HTPs)
  • TIGL_X_Z_PLANE, the wing is projected onto the x-z plane (use for e.g. VTPs)
  • TIGL_Y_Z_PLANE, the wing is projected onto the y-z plane
[out]referenceAreaPtrThe reference area of the wing
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex is less or equal zero
  • TIGL_ERROR if some other error occurred

◆ tiglWingGetSegmentLowerSurfaceAreaTrimmed()

TiglReturnCode tiglWingGetSegmentLowerSurfaceAreaTrimmed ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
double  eta1,
double  xsi1,
double  eta2,
double  xsi2,
double  eta3,
double  xsi3,
double  eta4,
double  xsi4,
double *  surfaceArea 
)

Computes the area of the trimmed lower wing segment surface. This function can be e.g. used to determine the area of the wing flaps.

The use of this function is analog to tiglWingGetSegmentUpperSurfaceAreaTrimmed.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[in]eta1Eta value of P1 in range [0,1]
[in]xsi1Xsi value of P1 in range [0,1]
[in]eta2Eta value of P2 in range [0,1]
[in]xsi2Xsi value of P2 in range [0,1]
[in]eta3Eta value of P3 in range [0,1]
[in]xsi3Xsi value of P3 in range [0,1]
[in]eta4Eta value of P4 in range [0,1]
[in]xsi4Xsi value of P4 in range [0,1]
[out]surfaceAreaArea of the trimmed lower wing surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex ot segmentIndex are not valid
  • TIGL_NULL_POINTER if surfaceArea is a null pointer
  • TIGL_ERROR if the eta/xsi coordinates are not in the valid range [0,1] or another error occurred

◆ tiglWingGetSegmentSurfaceArea()

TiglReturnCode tiglWingGetSegmentSurfaceArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
double *  surfaceAreaPtr 
)

Returns the surface area of a segment of a wing. This includes only the area of the upper and lower wing segment surface and does not include the trailing edge or any closing faces.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[out]surfaceAreaPtrThe pointer to a variable for the surface area of the wing
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex, sectionIndex or elementIndex are not valid
  • TIGL_NULL_POINTER if surfaceAreaPtr is a null pointer
  • TIGL_ERROR if some other error occurred

◆ tiglWingGetSegmentUpperSurfaceAreaTrimmed()

TiglReturnCode tiglWingGetSegmentUpperSurfaceAreaTrimmed ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
int  segmentIndex,
double  eta1,
double  xsi1,
double  eta2,
double  xsi2,
double  eta3,
double  xsi3,
double  eta4,
double  xsi4,
double *  surfaceArea 
)

Computes the area of the trimmed upper wing segment surface. This function can be e.g. used to determine the area of the wing flaps.

The computed area does not include the trailing edge or any closing side faces.

All eta and xsi values must be in the range [0,1]. The trimmed area is defined with the four corner point P1, P2, P3, and P4. The order of the points should be right handed, as shown the the image below.

surfaceAreaTrimmed.png
Location of the four corner points

Each of the points is defined with an eta/xsi coordinate pair in the wing segment system.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexThe index of a wing, starting at 1
[in]segmentIndexThe index of a segment, starting at 1
[in]eta1Eta value of P1 in range [0,1]
[in]xsi1Xsi value of P1 in range [0,1]
[in]eta2Eta value of P2 in range [0,1]
[in]xsi2Xsi value of P2 in range [0,1]
[in]eta3Eta value of P3 in range [0,1]
[in]xsi3Xsi value of P3 in range [0,1]
[in]eta4Eta value of P4 in range [0,1]
[in]xsi4Xsi value of P4 in range [0,1]
[out]surfaceAreaArea of the trimmed upper wing surface
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex ot segmentIndex are not valid
  • TIGL_NULL_POINTER if surfaceArea is a null pointer
  • TIGL_ERROR if the eta/xsi coordinates are not in the valid range [0,1] or another error occurred

◆ tiglWingGetSurfaceArea()

TiglReturnCode tiglWingGetSurfaceArea ( TiglCPACSConfigurationHandle  cpacsHandle,
int  wingIndex,
double *  surfaceAreaPtr 
)

Returns the surface area of the wing. Currently, the area includes also the faces on the wing symmetry plane (in case of a symmetric wing). In coming releases, these faces will not belong anymore to the surface area calculation.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingIndexIndex of the Wing to calculate the area, starting at 1
[out]surfaceAreaPtrThe surface area of the wing
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_INDEX_ERROR if wingIndex is less or equal zero
  • TIGL_ERROR if some other error occurred

◆ tiglWingGetWettedArea()

TiglReturnCode tiglWingGetWettedArea ( TiglCPACSConfigurationHandle  cpacsHandle,
const char *  wingUID,
double *  wettedAreaPtr 
)

Returns the wetted area of the wing. If the wing has no parent (fuselage), it returns the surface area of the wing.

Parameters
[in]cpacsHandleHandle for the CPACS configuration
[in]wingUIDUID of the Wing to calculate the wetted area
[out]wettedAreaPtrThe wetted area of the wing
Returns
  • TIGL_SUCCESS if no error occurred
  • TIGL_NOT_FOUND if no configuration was found for the given handle
  • TIGL_UID_ERROR if wingUID is wrong
  • TIGL_NULL_POINTER if wingIUD is NULL
  • TIGL_ERROR if some other error occurred