aerosandbox.aerodynamics.aero_3D.lifting_line
Attributes
Classes
LiftingLine | An implicit aerodynamics analysis based on lifting line theory, with modifications for nonzero sweep |
Functions
Module Contents
aerosandbox.aerodynamics.aero_3D.lifting_line.tall(array)
aerosandbox.aerodynamics.aero_3D.lifting_line.wide(array)
class aerosandbox.aerodynamics.aero_3D.lifting_line.LiftingLine(airplane, op_point, xyz_ref=None, model_size='medium', run_symmetric_if_possible=False, verbose=False, spanwise_resolution=4, spanwise_spacing_function=np.cosspace, vortex_core_radius=1e-08, align_trailing_vortices_with_wind=False)
: Bases: aerosandbox.ExplicitAnalysis
code
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:
: ```defaultanalysis = asb.LiftingLine( 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()
code
Parameters:
: - **airplane** ([*aerosandbox.geometry.Airplane*](/u/b315363d35db77b2#aerosandbox-geometry-airplane)) –
- **op\_point** ([*aerosandbox.performance.OperatingPoint*](/u/ef68b15c282639e3#aerosandbox-performance-operatingpoint)) –
- **xyz\_ref** (*List**[**float**]*) –
- **model\_size** (*str*) –
- **run\_symmetric\_if\_possible** (*bool*) –
- **verbose** (*bool*) –
- **spanwise\_resolution** (*int*) –
- **spanwise\_spacing\_function** (*Callable**[**[**float**,* *float**,* *float**]**,* *aerosandbox.geometry.np.ndarray**]*) –
- **vortex\_core\_radius** (*float*) –
- **align\_trailing\_vortices\_with\_wind** (*bool*) –
airplane
op\_point
xyz\_ref *= None*
model\_size *= 'medium'*
verbose *= False*
spanwise\_resolution *= 4*
spanwise\_spacing\_function
vortex\_core\_radius *= 1e-08*
align\_trailing\_vortices\_with\_wind *= False*
run\_symmetric *= False*
\_\_repr\_\_()
<a id="aerosandbox.aerodynamics.aero_3D.lifting_line.LiftingLine.AeroComponentResults"></a> *class* AeroComponentResults
: s\_ref*: float*
c\_ref*: float*
b\_ref*: float*
op\_point*: [aerosandbox.performance.OperatingPoint](/u/ef68b15c282639e3#aerosandbox-performance-operatingpoint)*
F\_g*: List[float | aerosandbox.geometry.np.ndarray]*
M\_g*: List[float | aerosandbox.geometry.np.ndarray]*
\_\_repr\_\_()
*property* F\_b*: List[float | aerosandbox.geometry.np.ndarray]*
: An [x, y, z] list of forces in body axes [N]
Return type:
: List[Union[float, aerosandbox.geometry.np.ndarray]]
*property* F\_w*: List[float | aerosandbox.geometry.np.ndarray]*
: An [x, y, z] list of forces in wind axes [N]
Return type:
: List[Union[float, aerosandbox.geometry.np.ndarray]]
*property* M\_b*: List[float | aerosandbox.geometry.np.ndarray]*
: An [x, y, z] list of moments about body axes [Nm]
Return type:
: List[Union[float, aerosandbox.geometry.np.ndarray]]
*property* M\_w*: List[float | aerosandbox.geometry.np.ndarray]*
: An [x, y, z] list of moments about wind axes [Nm]
Return type:
: List[Union[float, aerosandbox.geometry.np.ndarray]]
*property* L*: float | aerosandbox.geometry.np.ndarray*
: The lift force [N]. Definitionally, this is in wind axes.
Return type:
: Union[float, aerosandbox.geometry.np.ndarray]
*property* Y*: float | aerosandbox.geometry.np.ndarray*
: The side force [N]. Definitionally, this is in wind axes.
Return type:
: Union[float, aerosandbox.geometry.np.ndarray]
*property* D*: float | aerosandbox.geometry.np.ndarray*
: The drag force [N]. Definitionally, this is in wind axes.
Return type:
: Union[float, aerosandbox.geometry.np.ndarray]
*property* l\_b*: float | aerosandbox.geometry.np.ndarray*
: The rolling moment [Nm] in body axes. Positive is roll-right.
Return type:
: Union[float, aerosandbox.geometry.np.ndarray]
*property* m\_b*: float | aerosandbox.geometry.np.ndarray*
: The pitching moment [Nm] in body axes. Positive is nose-up.
Return type:
: Union[float, aerosandbox.geometry.np.ndarray]
*property* n\_b*: float | aerosandbox.geometry.np.ndarray*
: The yawing moment [Nm] in body axes. Positive is nose-right.
Return type:
: Union[float, aerosandbox.geometry.np.ndarray]
run()
: Computes the aerodynamic forces.
Returns a dictionary with keys:
> - ‘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.
> - ‘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 LiftingLine.airplane object.
Data types:
: - The “L”, “Y”, “D”, “l\_b”, “m\_b”, “n\_b”, “CL”, “CY”, “CD”, “Cl”, “Cm”, and “Cn” keys are:
> - floats if the OperatingPoint object is not vectorized (i.e., if all attributes of OperatingPoint
>
> are floats, not arrays).
>
> - arrays if the OperatingPoint object is vectorized (i.e., if any attribute of OperatingPoint is an
>
> array).
- The “F\_g”, “F\_b”, “F\_w”, “M\_g”, “M\_b”, and “M\_w” keys are always lists, which will contain either
floats or arrays, again depending on whether the OperatingPoint object is vectorized or not.
Return type:
: Dict
run\_with\_stability\_derivatives(*alpha=True*, *beta=True*, *p=True*, *q=True*, *r=True*)
: Computes the aerodynamic forces and moments on the airplane, and the stability derivatives.
Arguments essentially determine which stability derivatives are computed. If a stability derivative is not
needed, leaving it False will speed up the computation.
Parameters:
: - **alpha** (*-*) – If True, compute the stability derivatives with respect to the angle of attack (alpha).
- **beta** (*-*) – If True, compute the stability derivatives with respect to the sideslip angle (beta).
- **p** (*-*) – If True, compute the stability derivatives with respect to the body-axis roll rate (p).
- **q** (*-*) – If True, compute the stability derivatives with respect to the body-axis pitch rate (q).
- **r** (*-*) – If True, compute the stability derivatives with respect to the body-axis yaw rate (r).
Return type:
: Dict[str, Union[Union[float, aerosandbox.geometry.np.ndarray], List[Union[float, aerosandbox.geometry.np.ndarray]]]]
Returns: a dictionary with keys:
> - ‘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.
> - ‘Cl’ : the rolling coefficient [-], in body axes
> - ‘Cm’ : the pitching coefficient [-], in body axes
> - ‘Cn’ : the yawing coefficient [-], in body axes
>
> Along with additional keys, depending on the value of the alpha, beta, p, q, and r arguments. For
> example, if alpha=True, then the following additional keys will be present:
>
> > - ‘CLa’ : the lift coefficient derivative with respect to alpha [1/rad]
> > - ‘CDa’ : the drag coefficient derivative with respect to alpha [1/rad]
> > - ‘CYa’ : the sideforce coefficient derivative with respect to alpha [1/rad]
> > - ‘Cla’ : the rolling moment coefficient derivative with respect to alpha [1/rad]
> > - ‘Cma’ : the pitching moment coefficient derivative with respect to alpha [1/rad]
> > - ‘Cna’ : the yawing moment coefficient derivative with respect to alpha [1/rad]
> > - ‘x\_np’: the neutral point location in the x direction [m]
>
> Nondimensional values are nondimensionalized using reference values in the AeroBuildup.airplane object.
>
> Data types:
> : - The “L”, “Y”, “D”, “l\_b”, “m\_b”, “n\_b”, “CL”, “CY”, “CD”, “Cl”, “Cm”, and “Cn” keys are:
>
> > - floats if the OperatingPoint object is not vectorized (i.e., if all attributes of OperatingPoint
> >
> > are floats, not arrays).
> >
> > - arrays if the OperatingPoint object is vectorized (i.e., if any attribute of OperatingPoint is an
> >
> > array).
> - The “F\_g”, “F\_b”, “F\_w”, “M\_g”, “M\_b”, and “M\_w” keys are always lists, which will contain either
>
> floats or arrays, again depending on whether the OperatingPoint object is vectorized or not.
wing\_aerodynamics()
: Return type:
: [AeroComponentResults](#aerosandbox.aerodynamics.aero_3D.lifting_line.LiftingLine.AeroComponentResults)
get\_induced\_velocity\_at\_points(*points*, *vortex\_strengths=None*)
: Computes the induced velocity at a set of points in the flowfield.
Parameters:
: - **points** (*aerosandbox.geometry.np.ndarray*) – A Nx3 array of points that you would like to know the induced velocities at. Given in geometry axes.
- **vortex\_strengths** (*aerosandbox.geometry.np.ndarray*) –
Return type:
: aerosandbox.geometry.np.ndarray
Returns: A Nx3 of the induced velocity at those points. Given in geometry axes.
get\_velocity\_at\_points(*points*, *vortex\_strengths=None*)
: Computes the velocity at a set of points in the flowfield.
Parameters:
: - **points** (*aerosandbox.geometry.np.ndarray*) – A Nx3 array of points that you would like to know the velocities at. Given in geometry axes.
- **vortex\_strengths** (*aerosandbox.geometry.np.ndarray*) –
Return type:
: aerosandbox.geometry.np.ndarray
Returns: A Nx3 of the velocity at those points. Given in geometry axes.
calculate\_fuselage\_influences(*points*)
: Parameters:
: **points** (*aerosandbox.geometry.np.ndarray*) –
Return type:
: aerosandbox.geometry.np.ndarray
calculate\_streamlines(*seed\_points=None*, *n\_steps=300*, *length=None*)
: 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.geometry.np.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'*)
: 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.geometry.np.ndarray*) –
- **cmap** (*str*) –
- **colorbar\_label** (*str*) –
- **show** (*bool*) –
- **show\_kwargs** (*Dict*) –
- **backend** (*str*) –
<a id="aerosandbox.aerodynamics.aero_3D.lifting_line.airplane"></a> aerosandbox.aerodynamics.aero\_3D.lifting\_line.airplane