aerosandbox.aerodynamics.aero_3D.nonlinear_lifting_line#

Module Contents#

Classes#

NonlinearLiftingLine

An implicit aerodynamics analysis based on lifting line theory, with modifications for nonzero sweep

Functions#

tall(array)

wide(array)

Attributes#

aerosandbox.aerodynamics.aero_3D.nonlinear_lifting_line.tall(array)[source]#
aerosandbox.aerodynamics.aero_3D.nonlinear_lifting_line.wide(array)[source]#
class aerosandbox.aerodynamics.aero_3D.nonlinear_lifting_line.NonlinearLiftingLine(airplane, op_point, xyz_ref=None, run_symmetric_if_possible=False, verbose=False, spanwise_resolution=8, spanwise_spacing_function=np.cosspace, vortex_core_radius=1e-08, align_trailing_vortices_with_wind=False)[source]#

Bases: aerosandbox.ImplicitAnalysis

An implicit aerodynamics analysis based on lifting line theory, with modifications for nonzero sweep and dihedral + multiple wings.

Nonlinear, and includes viscous effects based on 2D data.

Usage example:
>>> analysis = asb.NonlinearLiftingLine(
>>>     airplane=my_airplane,
>>>     op_point=asb.OperatingPoint(
>>>         velocity=100, # m/s
>>>         alpha=5, # deg
>>>         beta=4, # deg
>>>         p=0.01, # rad/sec
>>>         q=0.02, # rad/sec
>>>         r=0.03, # rad/sec
>>>     )
>>> )
>>> outputs = analysis.run()
Parameters:
  • airplane (aerosandbox.geometry.Airplane) –

  • op_point (aerosandbox.performance.OperatingPoint) –

  • xyz_ref (List[float]) –

  • run_symmetric_if_possible (bool) –

  • verbose (bool) –

  • spanwise_spacing_function (Callable[[float, float, float], aerosandbox.numpy.ndarray]) –

  • vortex_core_radius (float) –

  • align_trailing_vortices_with_wind (bool) –

__repr__()[source]#

Return repr(self).

run(solve=True)[source]#

Computes the aerodynamic forces.

Returns a dictionary with keys:
  • ‘residuals’: a list of residuals for each horseshoe element

  • ‘F_g’ : an [x, y, z] list of forces in geometry axes [N]

  • ‘F_b’ : an [x, y, z] list of forces in body axes [N]

  • ‘F_w’ : an [x, y, z] list of forces in wind axes [N]

  • ‘M_g’ : an [x, y, z] list of moments about geometry axes [Nm]

  • ‘M_b’ : an [x, y, z] list of moments about body axes [Nm]

  • ‘M_w’ : an [x, y, z] list of moments about wind axes [Nm]

  • ‘L’ : the lift force [N]. Definitionally, this is in wind axes.

  • ‘Y’ : the side force [N]. This is in wind axes.

  • ‘D’ : the drag force [N]. Definitionally, this is in wind axes.

  • ‘l_b’, the rolling moment, in body axes [Nm]. Positive is roll-right.

  • ‘m_b’, the pitching moment, in body axes [Nm]. Positive is pitch-up.

  • ‘n_b’, the yawing moment, in body axes [Nm]. Positive is nose-right.

  • ‘CL’, the lift coefficient [-]. Definitionally, this is in wind axes.

  • ‘CY’, the sideforce coefficient [-]. This is in wind axes.

  • ‘CD’, the drag coefficient [-]. Definitionally, this is in wind axes.

  • ‘CDi’ the induced drag coefficient

  • ‘CDp’ the profile drag coefficient

  • ‘Cl’, the rolling coefficient [-], in body axes

  • ‘Cm’, the pitching coefficient [-], in body axes

  • ‘Cn’, the yawing coefficient [-], in body axes

Nondimensional values are nondimensionalized using reference values in the VortexLatticeMethod.airplane object.

Parameters:

solve (bool) –

Return type:

Dict[str, Any]

get_induced_velocity_at_points(points, vortex_strengths=None)[source]#

Computes the induced velocity at a set of points in the flowfield.

Parameters:
  • points (aerosandbox.numpy.ndarray) – A Nx3 array of points that you would like to know the induced velocities at. Given in geometry axes.

  • vortex_strengths (aerosandbox.numpy.ndarray) –

Return type:

aerosandbox.numpy.ndarray

Returns: A Nx3 of the induced velocity at those points. Given in geometry axes.

get_velocity_at_points(points, vortex_strengths=None)[source]#

Computes the velocity at a set of points in the flowfield.

Parameters:
  • points (aerosandbox.numpy.ndarray) – A Nx3 array of points that you would like to know the velocities at. Given in geometry axes.

  • vortex_strengths (aerosandbox.numpy.ndarray) –

Return type:

aerosandbox.numpy.ndarray

Returns: A Nx3 of the velocity at those points. Given in geometry axes.

calculate_fuselage_influences(points)[source]#
Parameters:

points (aerosandbox.numpy.ndarray) –

Return type:

aerosandbox.numpy.ndarray

calculate_streamlines(seed_points=None, n_steps=300, length=None)[source]#

Computes streamlines, starting at specific seed points.

After running this function, a new instance variable VortexLatticeFilaments.streamlines is computed

Uses simple forward-Euler integration with a fixed spatial stepsize (i.e., velocity vectors are normalized before ODE integration). After investigation, it’s not worth doing fancier ODE integration methods (adaptive schemes, RK substepping, etc.), due to the near-singular conditions near vortex filaments.

Parameters:
  • seed_points (aerosandbox.numpy.ndarray) – A Nx3 ndarray that contains a list of points where streamlines are started. Will be

  • specified. (not) –

  • n_steps (int) – The number of individual streamline steps to trace. Minimum of 2.

  • length (float) – The approximate total length of the streamlines desired, in meters. Will be auto-calculated if

  • specified.

Returns:

a 3D array with dimensions: (n_seed_points) x (3) x (n_steps). Consists of streamlines data.

Result is also saved as an instance variable, VortexLatticeMethod.streamlines.

Return type:

streamlines

draw(c=None, cmap=None, colorbar_label=None, show=True, show_kwargs=None, draw_streamlines=True, recalculate_streamlines=False, backend='pyvista')[source]#

Draws the solution. Note: Must be called on a SOLVED AeroProblem object. To solve an AeroProblem, use opti.solve(). To substitute a solved solution, use ap = sol(ap). :return:

Parameters:
  • c (aerosandbox.numpy.ndarray) –

  • cmap (str) –

  • colorbar_label (str) –

  • show (bool) –

  • show_kwargs (Dict) –

  • backend (str) –

aerosandbox.aerodynamics.aero_3D.nonlinear_lifting_line.geometry_folder[source]#