mesh_gen.py

class openconcept.aerodynamics.openaerostruct.mesh_gen.TrapezoidalPlanformMesh(**kwargs)

Bases: ExplicitComponent

Generate an OpenAeroStruct mesh based on basic wing design parameters. Resulting mesh is for a half wing (meant to use with OpenAeroStruct symmetry), but the input reference area is for the full wing.

Inputs:
  • S (float) – full planform area (scalar, m^2)

  • AR (float) – aspect ratio (scalar, dimensionless)

  • taper (float) – taper ratio (must be >0 and <=1); tip chord / root chord (scalar, dimensionless)

  • sweep (float) – quarter chord sweep angle (scalar, degrees)

Outputs:

mesh (ndarray) – OpenAeroStruct 3D mesh (num_x + 1 x num_y + 1 x 3 ndarray, m)

Options:
  • num_x (int) – number of panels in x (streamwise) direction (scalar, dimensionless)

  • num_y (int) – number of panels in y (spanwise) direction (scalar, dimensionless)

class openconcept.aerodynamics.openaerostruct.mesh_gen.SectionPlanformMesh(**kwargs)

Bases: ExplicitComponent

Generate an OpenAeroStruct mesh based on defined section parameters, similar to how AVL accepts planforms. The resulting mesh is for a half wing (meant to use with OpenAeroStruct symmetry), but the input reference area is for the full wing.

The sectional properties (x offset, y value, and chord) are nondimensional, but their relative magnitudes reflect the actual shape. The full planform is scaled to match the requested planform area. Optionally, this scaling can be turned off (by setting scale_area=False) and the planform area is then computed as an output.

The mesh points are cosine spaced in the chordwise direction and in the spanwise direction within each trapezoidal region of the wing defined by pairs of section properties.

                                   ----> +y
                                  |
                                  |
                                  v +x

  _     Section 1       Section 2     _
 |                  |          _-'     |
 |                  |       _-'        |
 |                  |    _-'           |
 |                    _-'            chord_sec
x_LE_sec           _-'                 |
 |              _-'                    |
 |           _-'   _--------------    _|
 |        _-'   _-'
 |_    _-'   _-'    |--- y_sec ---|
      |   _-'
      |_-'
Inputs:
  • S (float) – Full planform area; only an input when scale_area is True (the default) (scalar, m^2)

  • x_LE_sec (float) – Streamwise offset of the section’s leading edge, starting with the outboard section (wing tip) and moving inboard toward the root (vector of length num_sections, m)

  • y_sec (float) – Spanwise location of each section, starting with the outboard section (wing tip) at the MOST NEGATIVE y value and moving inboard (increasing y value) toward the root; the user does not provide a value for the root because it is always 0.0 (vector of length num_sections - 1, m)

  • chord_sec (float) – Chord of each section, starting with the outboard section (wing tip) and moving inboard toward the root (vector of length num_sections, m)

Outputs:
  • mesh (ndarray) – OpenAeroStruct 3D mesh (num_x + 1 x sum(num_y) + 1 x 3 ndarray, m)

  • S (float) – Full planform area; only an output when scale_area is False (scalar, m^2)

Options:
  • num_x (int) – Number of panels in x (streamwise) direction (scalar, dimensionless)

  • num_y (int or iterable of ints) – Number of spanwise panels in the trapezoidal regions between each pair of adjacent sections; can be specified either as a single integer, where that same value is used for each region, or as an iterable of integers of length num_sections - 1 to enable different numbers of spanwise coordinates for each region (scalar or vector, dimensionless)

  • num_sections (int) – Number of spanwise sections to define planform shape (scalar, dimensionless)

  • scale_area (bool) – Scale the mesh to match a planform area provided as an input

class openconcept.aerodynamics.openaerostruct.mesh_gen.ThicknessChordRatioInterp(**kwargs)

Bases: ExplicitComponent

Linearly interpolate thickness to chord ratio defined at each section. Take the average of the values on either side of a panel to determine each panel’s thickness to chord ratio.

Inputs:

section_toverc (float) – Thickness to chord ratio at each defined section, starting at the tip and moving to the root (vector of length num_sections, dimensionless)

Outputs:

panel_toverc (float) – Thickness to chord ratio at every streamwise strip of panels in the mesh (vector of length total panels in y, dimensionless)

Options:
  • num_y (int or iterable of ints) – Number of spanwise panels in the trapezoidal regions between each pair of adjacent sections; can be specified either as a single integer, where that same value is used for each region, or as an iterable of integers of length num_sections - 1 to enable different numbers of spanwise coordinates for each region (scalar or vector, dimensionless)

  • num_sections (int) – Number of spanwise sections to define planform shape (scalar, dimensionless)

  • cos_spacing (bool) – mesh is cosine spaced between defined sections, by default True (should be True if the mesh is generated by SectionPlanformMesh and False if mesh is generated by TrapezoidalPlanformMesh)

class openconcept.aerodynamics.openaerostruct.mesh_gen.SectionLinearInterp(**kwargs)

Bases: ExplicitComponent

Linearly interpolate a property defined at each section and evaluate the result at spanwise mesh points.

Inputs:

property_sec (float) – The property to be interpolated at each section definition, defined from tip to root (vector of length num_sections)

Outputs:

property_node (float) – The linearly interpolated value at each y-coordinate (vector of length number of different y-coordinates)

Options:
  • num_y (int or iterable of ints) – Number of spanwise panels in the trapezoidal regions between each pair of adjacent sections; can be specified either as a single integer, where that same value is used for each region, or as an iterable of integers of length num_sections - 1 to enable different numbers of spanwise coordinates for each region (scalar or vector, dimensionless)

  • num_sections (int) – Number of spanwise sections to define planform shape (scalar, dimensionless)

  • units (str) – Units of the interpolated quantity

  • cos_spacing (bool) – mesh is cosine spaced between defined sections, by default True (should be True if the mesh is generated by SectionPlanformMesh and False if mesh is generated by TrapezoidalPlanformMesh)

openconcept.aerodynamics.openaerostruct.mesh_gen.cos_space(start, end, num, dtype=<class 'float'>)

Cosine spacing between start and end with num points.

openconcept.aerodynamics.openaerostruct.mesh_gen.cos_space_deriv_start(num, dtype=<class 'float'>)

Derivative of cosine spacing output w.r.t. the start value.

openconcept.aerodynamics.openaerostruct.mesh_gen.cos_space_deriv_end(num, dtype=<class 'float'>)

Derivative of cosine spacing output w.r.t. the end value.