drag_polar.py

class openconcept.aerodynamics.openaerostruct.drag_polar.VLMDragPolar(**kwargs)

Bases: Group

Drag polar generated using OpenAeroStruct’s vortex lattice method and a surrogate model to decrease the computational cost.

Notes

Twist is ordered starting at the tip and moving to the root; a twist of [-1, 0, 1] would have a tip twist of -1 deg and root twist of 1 deg

Set the OMP_NUM_THREADS environment variable to 1 for much better parallel training performance!

Inputs:
  • fltcond|CL (float) – Lift coefficient (vector, dimensionless)

  • fltcond|M (float) – Mach number (vector, dimensionless)

  • fltcond|h (float) – Altitude (vector, m)

  • fltcond|q (float) – Dynamic pressure (vector, Pascals)

  • ac|geom|wing|S_ref (float) – Full planform area (scalar, m^2)

  • ac|geom|wing|AR (float) – Aspect ratio (scalar, dimensionless)

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

  • ac|geom|wing|c4sweep (float) – Quarter chord sweep angle (scalar, degrees)

  • ac|geom|wing|twist (float) – List of twist angles at control points of spline (vector, degrees) NOTE: length of vector is num_twist (set in options), NOT num_nodes

  • ac|aero|CD_nonwing (float) – Drag coefficient of components other than the wing; e.g. fuselage, tail, interference drag, etc.; this value is simply added to the drag coefficient computed by OpenAeroStruct (scalar, dimensionless)

  • fltcond|TempIncrement (float) – Temperature increment for non-standard day (scalar, degC) NOTE: fltcond|TempIncrement is a scalar in this component but a vector in OC. This will be the case for the forseeable future because of the way the VLMDataGen component is set up. To make it work, TempIncrement would need to be an input to the surrogate, which is not worth the extra training cost (at minimum a 2x increase).

Outputs:

drag (float) – Drag force (vector, Newtons)

Options:
  • num_nodes (int) – Number of analysis points per mission segment (scalar, dimensionless)

  • num_x (int) – Number of points in x (streamwise) direction (scalar, dimensionless)

  • num_y (int) – Number of points in y (spanwise) direction for one wing because uses symmetry (scalar, dimensionless)

  • num_twist (int) – Number of spline control points for twist (scalar, dimensionless)

  • alpha_train (list or ndarray) – List of angle of attack values at which to train the model (ndarray, degrees)

  • Mach_train (list or ndarray) – List of Mach numbers at which to train the model (ndarray, dimensionless)

  • alt_train (list or ndarray) – List of altitude values at which to train the model (ndarray, m)

  • surf_options (dict) – Dictionary of OpenAeroStruct surface options; any options provided here will override the default ones; see the OpenAeroStruct documentation for more information. Because the geometry transformations are excluded in this model (to simplify the interface), the <transformation>_cp options are not supported. The input ac|geom|wing|twist is the same as modifying the twist_cp option in the surface dictionary. The mesh geometry modification is limited to adjusting the input parameters to this component.

class openconcept.aerodynamics.openaerostruct.drag_polar.VLMDataGen(**kwargs)

Bases: ExplicitComponent

Generates a grid of OpenAeroStruct lift and drag data to train a surrogate model. The grid is defined by the options and the planform geometry by the inputs. This component will only recalculate the lift and drag grid when the planform shape changes. All VLMDataGen components in the model must use the same training points and surf_options.

Inputs:
  • ac|geom|wing|S_ref (float) – Full planform area (scalar, m^2)

  • ac|geom|wing|AR (float) – Aspect ratio (scalar, dimensionless)

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

  • ac|geom|wing|c4sweep (float) – Quarter chord sweep angle (scalar, degrees)

  • ac|geom|wing|twist (float) – List of twist angles at control points of spline (vector, degrees) NOTE: length of vector is num_twist (set in options)

  • ac|aero|CD_nonwing (float) – Drag coefficient of components other than the wing; e.g. fuselage, tail, interference drag, etc.; this value is simply added to the drag coefficient computed by OpenAeroStruct (scalar, dimensionless)

  • fltcond|TempIncrement (float) – Temperature increment for non-standard day (scalar, degC)

Outputs:
  • CL_train (3-dim ndarray) – Grid of lift coefficient data to train structured surrogate model

  • CD_train (3-dim ndarray) – Grid of drag coefficient data to train structured surrogate model

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

  • num_y (int) – Number of points in y (spanwise) direction for one wing because uses symmetry (scalar, dimensionless)

  • num_twist (int) – Number of spline control points for twist (scalar, dimensionless)

  • Mach_train (list or ndarray) – List of Mach numbers at which to train the model (ndarray, dimensionless)

  • alpha_train (list or ndarray) – List of angle of attack values at which to train the model (ndarray, degrees)

  • alt_train (list or ndarray) – List of altitude values at which to train the model (ndarray, m)

  • surf_options (dict) – Dictionary of OpenAeroStruct surface options; any options provided here will override the default ones; see the OpenAeroStruct documentation for more information. Because the geometry transformations are excluded in this model (to simplify the interface), the <transformation>_cp options are not supported. The input ac|geom|wing|twist is the same as modifying the twist_cp option in the surface dictionary. The mesh geometry modification is limited to adjusting the input parameters to this component.

class openconcept.aerodynamics.openaerostruct.drag_polar.VLM(**kwargs)

Bases: Group

Computes lift and drag using OpenAeroStruct’s vortex lattice implementation.

Notes

Twist is ordered starting at the tip and moving to the root; a twist of [-1, 0, 1] would have a tip twist of -1 deg and root twist of 1 deg

Inputs:
  • fltcond|alpha (float) – Angle of attack (scalar, degrees)

  • fltcond|M (float) – Mach number (scalar, dimensionless)

  • fltcond|h (float) – Altitude (scalar, m)

  • fltcond|TempIncrement (float) – Temperature increment for non-standard day (scalar, degC)

  • ac|geom|wing|S_ref (float) – Wing planform area (scalar, m^2)

  • ac|geom|wing|AR (float) – Wing aspect ratio (scalar, dimensionless)

  • ac|geom|wing|taper (float) – Wing taper ratio (scalar, dimensionless)

  • ac|geom|wing|c4sweep (float) – Wing sweep measured at quarter chord (scalar, degrees)

  • ac|geom|wing|twist (float) – List of twist angles at control points of spline (vector, degrees) NOTE: length of vector is num_twist (set in options)

Outputs:
  • fltcond|CL (float) – Lift coefficient of wing (scalar, dimensionless)

  • fltcond|CD (float) – Drag coefficient of wing (scalar, dimensionless)

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

  • num_y (int) – Number of points in y (spanwise) direction for one wing because uses symmetry (scalar, dimensionless)

  • num_twist (int) – Number of spline control points for twist (scalar, dimensionless)

  • surf_options (dict) – Dictionary of OpenAeroStruct surface options; any options provided here will override the default ones; see the OpenAeroStruct documentation for more information. Because the geometry transformations are excluded in this model (to simplify the interface), the <transformation>_cp options are not supported. The input ac|geom|wing|twist is the same as modifying the twist_cp option in the surface dictionary. The mesh geometry modification is limited to adjusting the input parameters to this component.

class openconcept.aerodynamics.openaerostruct.drag_polar.PlanformMesh(**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 x num_y x 3 ndarray, m)

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

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