RCAIDE.Framework.External_Interfaces.OpenVSP.vsp_wing

vsp_wing#

Functions

convert_sweep(sweep, sweep_loc, ...)

This converts arbitrary sweep into a desired sweep given wing geometry.

get_vsp_trim_from_RCAIDE_trim(...)

Compute OpenVSP span trim coordinates based on RCAIDE coordinates

read_vsp_wing(wing_id[, main_wing_tag, ...])

This reads an OpenVSP wing vehicle geometry and writes it into a RCAIDE wing format.

write_vsp_control_surface(wing, wing_id, ...)

This writes a control surface in a wing.

write_vsp_wing(vehicle, wing, area_tags, ...)

This write a given wing into OpenVSP format

write_wing_conformal_fuel_tank(vehicle, ...)

This writes a conformal fuel tank in a wing.

read_vsp_wing(wing_id, main_wing_tag=None, units_type='SI', write_airfoil_file=True, use_scaling=True)[source]#

This reads an OpenVSP wing vehicle geometry and writes it into a RCAIDE wing format.

Assumptions: 1. OpenVSP wing is divided into segments (“XSecs” in VSP). 2. Written for OpenVSP 3.21.1

Source: N/A

Inputs: 1. VSP 10-digit geom ID for wing. 2. units_type set to ‘SI’ (default) or ‘Imperial’. 3. Boolean for whether or not to write an airfoil file(default = True). 4. Boolean for whether or not to use the scaling from OpenVSP (default = True).

Outputs: Writes RCAIDE wing object, with these geometries, from VSP:

Wings.Wing. (* is all keys)

origin [m] in all three dimensions spans.projected [m] chords.root [m] chords.tip [m] aspect_ratio [-] sweeps.quarter_chord [radians] twists.root [radians] twists.tip [radians] thickness_to_chord [-] dihedral [radians] symmetric <boolean> tag <string> areas.reference [m^2] areas.wetted [m^2] Segments.

tag <string> twist [radians] percent_span_location [-] .1 is 10% root_chord_percent [-] .1 is 10% dihedral_outboard [radians] sweeps.quarter_chord [radians] thickness_to_chord [-] airfoil <NACA 4-series, 6 series, or airfoil file>

Properties Used: N/A

write_vsp_wing(vehicle, wing, area_tags, fuel_tank_set_ind, OML_set_ind)[source]#

This write a given wing into OpenVSP format

Assumptions: If wing segments are defined, they must cover the full span. (may work in some other cases, but functionality will not be maintained)

Source: N/A

Inputs: vehicle [-] vehicle data structure wing.

origin [m] in all three dimensions spans.projected [m] chords.root [m] chords.tip [m] sweeps.quarter_chord [radians] twists.root [radians] twists.tip [radians] thickness_to_chord [-] dihedral [radians] tag <string> Segments.*. (optional)

twist [radians] percent_span_location [-] .1 is 10% root_chord_percent [-] .1 is 10% dihedral_outboard [radians] sweeps.quarter_chord [radians] thickness_to_chord [-]

area_tags <dict> used to keep track of all tags needed in wetted area computation fuel_tank_set_index <int> OpenVSP object set containing the fuel tanks

Outputs: area_tags <dict> used to keep track of all tags needed in wetted area computation wing_id <str> OpenVSP ID for given wing

Properties Used: N/A

write_vsp_control_surface(wing, wing_id, ctrl_surf)[source]#

This writes a control surface in a wing.

Assumptions: None

Source: N/A

Inputs: wind_id <str> ctrl_surf [-] n_segments int, number of wing segments

Outputs: Operates on the active OpenVSP model, no direct output

Properties Used: N/A

write_wing_conformal_fuel_tank(vehicle, wing, wing_id, fuel_tank, fuel_tank_set_ind)[source]#

This writes a conformal fuel tank in a wing.

Assumptions: None

Source: N/A

Inputs: vehicle [-] vehicle data structure wing.segments.*.percent_span_location [-] wing.spans.projected [m] wind_id <str> fuel_tank.

inward_offset [m] start_chord_percent [-] .1 is 10% end_chord_percent [-] start_span_percent [-] end_span_percent [-] fuel_type.density [kg/m^3]

fuel_tank_set_ind <int>

Outputs: Operates on the active OpenVSP model, no direct output

Properties Used: N/A

get_vsp_trim_from_RCAIDE_trim(seg_span_percents, vsp_segment_breaks, trim)[source]#

Compute OpenVSP span trim coordinates based on RCAIDE coordinates

Assumptions: Wing does not have end caps

Source: N/A

Inputs: seg_span_percents [-] range of 0 to 1 vsp_segment_breaks [-] range of 0 to 1 trim [-] range of 0 to 1 (RCAIDE value)

Outputs: trim [-] OpenVSP trim value

Properties Used: N/A

convert_sweep(sweep, sweep_loc, new_sweep_loc, AR, taper)[source]#

This converts arbitrary sweep into a desired sweep given wing geometry.

Assumptions: None

Source: N/A

Inputs: sweep [degrees] sweep_loc [unitless] new_sweep_loc [unitless] AR [unitless] taper [unitless]

Outputs: quarter chord sweep

Properties Used: N/A