openvsp package¶
degen geom parse¶
parasite drag¶
- class openvsp.parasite_drag.ParasiteDragResults(results)[source]¶
Bases:
objectClass that contains all of the results from a parasite drag sweep in OpenVSP
- openvsp.parasite_drag.parasitedrag_sweep(speeds, alts_ft, sref=None, length_unit=None, speed_unit=6, set=None, vsp_instance=None)[source]¶
Runs a parasite drag sweep over a range of speeds and altitudes. For subsonic data only.
- Parameters:
speeds – list of speeds to sweep over
alts_ft – list of altitudes to sweep over
speed_unit – units of speed array
set – vsp geometry set to use for build up
length_unit – length unit of the vsp model
sref – reference area
vsp_instance – optional instance of vsp if using the multifacade
- Returns:
named tuple with results
surface patches¶
- class openvsp.surface_patches.SurfacePatch(comp_id, surf_index, patch_index, x, y, z, nx, ny, nz)[source]¶
Bases:
object
- openvsp.surface_patches.export_surface_patches(export_set: int, remove_degenerate=True, vsp_instance=None)[source]¶
Function that export surfaces patches of current set :param export_set: vsp set to export :param remove_degenerate: if true, degenerate surface patches are removed :param vsp_instance: optional instance of vsp if using the multifacade :return: list components with surface patches
- openvsp.surface_patches.plot_surface_components(components: List[SurfaceComponent], plot_normals=True, quiver_len=0.2, vsp_instance=None)[source]¶
Plots a list of surface components :param components: list of surface components to plot :param plot_normals: set to true to plot normal vectors, set to false to turn off normal vector plotting :param vsp_instance: optional instance of vsp if using the multifacade :return: handle to plotted figure
utilities¶
- class openvsp.utilities.PropInfo(geom_id, thrust_vector, rotation_direction, hub_center, transmat, diameter)[source]¶
Bases:
object- property area¶
- openvsp.utilities.convert_vec3d_array_to_list_matrix(vec3d_array)[source]¶
Converts an array of vec3d objects into a list of x,y,z points :param vec3d_array: array of vec3d objects :return: list of x,y,z pairs
- openvsp.utilities.convert_double_tuple_to_list_matrix(tuple_matrix)[source]¶
Converts a double matrix of tuples into a maxtrix of lists :param tuple_matrix: matrix of tuples :return: matrix of lists
- openvsp.utilities.parse_results_object(res_id, vsp_instance=None)[source]¶
Function to parse a generic results object from openvsp results manager :param res_id: id of the results object to parse :param vsp_instance: optional instance of vsp if using the multifacade :return: named tuple of results values
- openvsp.utilities.get_wing_reference_quantities(wing_name=None, wing_id=None, vsp_instance=None)[source]¶
Gets wing reference area, reference span, and reference chord (sref, bref, cref) from the TotalArea, TotalSpan, and TotalChord properties of Wing component
- Parameters:
wing_name – Name of the wing (will find the first wing with this name)
wing_id – ID of the wing object, if None wing name will be used to find the wing id. Wing ID takes precedence over wing_name
vsp_instance – optional instance of vsp if using the multifacade
- Returns:
sref, bref, and cref
- openvsp.utilities.get_propeller_thrust_vectors(prop_set, alternate_rotation_direction=False, vsp_instance=None)[source]¶
Returns propeller thrust vector directions and rotation direction for all propellers in the input set :param prop_set: set containing all propellers (no other geometries should be included) :param vsp_instance: optional instance of vsp if using the multifacade :return: Named Tuple with (geom_id, thrust_vector, rotation_direction, hub_center)
- openvsp.utilities.get_single_propeller_info(prop_dg, vsp_instance=None)[source]¶
Gets propeller info for a single propeller degen geom object :param prop_dg: propeller degen geom object :param vsp_instance: optional instance of vsp if using the multifacade :return: propeller info named tuple
- openvsp.utilities.plot_propeller_info(prop_infos, vector_scale=10.0, markersize=2.0, mutation_scale=20.0)[source]¶
Plots an array of propeller info tuples to visually inspect thrust and rotation directions :param prop_infos: array of prop info tuples :param vector_scale: length of each thrust vector :param markersize: size of marker for hub location :param mutation_scale: mutation scale applied to arrow objects :return: figure handle
- openvsp.utilities.run_degen_geom(set_index=None, set_name=None, vsp_instance=None)[source]¶
Runs degen geom on input set :param set_index: set index, will take precedence if both set index and set name are specified :param set_name: name of set, will be used if set index is not specified :param vsp_instance: optional instance of vsp if using the multifacade :return: degen geom manager object