aerosandbox.aerodynamics.aero_3D.vortex_lattice_method ====================================================== .. py:module:: aerosandbox.aerodynamics.aero_3D.vortex_lattice_method Attributes ---------- .. autoapisummary:: aerosandbox.aerodynamics.aero_3D.vortex_lattice_method.geometry_folder Classes ------- .. autoapisummary:: aerosandbox.aerodynamics.aero_3D.vortex_lattice_method.VortexLatticeMethod Functions --------- .. autoapisummary:: aerosandbox.aerodynamics.aero_3D.vortex_lattice_method.tall aerosandbox.aerodynamics.aero_3D.vortex_lattice_method.wide Module Contents --------------- .. py:function:: tall(array) .. py:function:: wide(array) .. py:class:: VortexLatticeMethod(airplane, op_point, xyz_ref = None, run_symmetric_if_possible = False, verbose = False, spanwise_resolution = 10, spanwise_spacing_function = np.cosspace, chordwise_resolution = 10, chordwise_spacing_function = np.cosspace, vortex_core_radius = 1e-08, align_trailing_vortices_with_wind = False) Bases: :py:obj:`aerosandbox.ExplicitAnalysis` An explicit (linear) vortex-lattice-method aerodynamics analysis. Usage example: >>> analysis = asb.VortexLatticeMethod( >>> 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 >>> ) >>> ) >>> aero_data = analysis.run() >>> analysis.draw() .. py:attribute:: airplane .. py:attribute:: op_point .. py:attribute:: xyz_ref :value: None .. py:attribute:: verbose :value: False .. py:attribute:: spanwise_resolution :value: 10 .. py:attribute:: spanwise_spacing_function .. py:attribute:: chordwise_resolution :value: 10 .. py:attribute:: chordwise_spacing_function .. py:attribute:: vortex_core_radius :value: 1e-08 .. py:attribute:: align_trailing_vortices_with_wind :value: False .. py:attribute:: run_symmetric :value: False .. py:method:: __repr__() .. py:method:: 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 VortexLatticeMethod.airplane object. .. py:method:: 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. :param - alpha: If True, compute the stability derivatives with respect to the angle of attack (alpha). :type - alpha: bool :param - beta: If True, compute the stability derivatives with respect to the sideslip angle (beta). :type - beta: bool :param - p: If True, compute the stability derivatives with respect to the body-axis roll rate (p). :type - p: bool :param - q: If True, compute the stability derivatives with respect to the body-axis pitch rate (q). :type - q: bool :param - r: If True, compute the stability derivatives with respect to the body-axis yaw rate (r). :type - r: bool 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 VortexLatticeMethod.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. .. py:method:: get_induced_velocity_at_points(points) Computes the induced velocity at a set of points in the flowfield. :param points: A Nx3 array of points that you would like to know the induced velocities at. Given in geometry axes. Returns: A Nx3 of the induced velocity at those points. Given in geometry axes. .. py:method:: get_velocity_at_points(points) Computes the velocity at a set of points in the flowfield. :param points: A Nx3 array of points that you would like to know the velocities at. Given in geometry axes. Returns: A Nx3 of the velocity at those points. Given in geometry axes. .. py:method:: 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. :param seed_points: A Nx3 ndarray that contains a list of points where streamlines are started. Will be :param auto-calculated if not specified.: :param n_steps: The number of individual streamline steps to trace. Minimum of 2. :param length: The approximate total length of the streamlines desired, in meters. Will be auto-calculated if :param not 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. :rtype: streamlines .. py:method:: 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: .. py:data:: geometry_folder