RCAIDE.Framework.External_Interfaces.OpenVSP.vsp_fuselage

vsp_fuselage#

Functions

compute_fuselage_fineness(fuselage, x_locs, ...)

This computes fuselage finenesses for nose and tail.

find_fuse_u_coordinate(x_target, fuse_id, ...)

Determines the u coordinate of an OpenVSP fuselage that matches an x coordinate

get_fuselage_height(fuselage, location)

This linearly estimates fuselage height at any percentage point (0,100) along fuselage length.

read_vsp_fuselage(fuselage_id, fux_idx, sym_flag)

This reads an OpenVSP fuselage geometry and writes it to a RCAIDE fuselage format.

set_section_angles(i, nose_z, tail_z, ...)

Set fuselage section angles to create a smooth (in the non-technical sense) fuselage shape.

write_fuselage_conformal_fuel_tank(fuse_id, ...)

This writes a conformal fuel tank in a fuselage.

write_vsp_fuselage(fuselage, area_tags, ...)

This writes a fuselage into OpenVSP format.

read_vsp_fuselage(fuselage_id, fux_idx, sym_flag, units_type='SI', fineness=True, use_scaling=True)[source]#

This reads an OpenVSP fuselage geometry and writes it to a RCAIDE fuselage format.

Assumptions: 1. OpenVSP fuselage is “conventionally shaped” (generally narrow at nose and tail, wider in center). 2. Fuselage is designed in VSP as it appears in real life. That is, the VSP model does not rely on

superficial elements such as canopies, stacks, or additional fuselages to cover up internal lofting oddities.

  1. This program will NOT account for multiple geometries comprising the fuselage. For example: a wingbox mounted beneath is a separate geometry and will NOT be processed.

  2. Fuselage origin is located at nose. VSP file origin can be located anywhere, preferably at the forward tip of the vehicle or in front (to make all X-coordinates of vehicle positive).

  3. Written for OpenVSP 3.21.1

Source: N/A

Inputs: 0. Pre-loaded VSP vehicle in memory, via import_vsp_vehicle. 1. VSP 10-digit geom ID for fuselage. 2. Units_type set to ‘SI’ (default) or ‘Imperial’. 3. Boolean for whether or not to compute fuselage finenesses (default = True). 4. Boolean for whether or not to use the scaling from OpenVSP (default = True).

Outputs:

Writes RCAIDE fuselage, with these geometries: (all defaults are SI, but user may specify Imperial)

Fuselages.Fuselage.

origin [m] in all three dimensions width [m] lengths.

total [m] nose [m] tail [m]

heights.

maximum [m] at_quarter_length [m] at_three_quarters_length [m]

effective_diameter [m] fineness.nose [-] ratio of nose section length to fuselage effective diameter fineness.tail [-] ratio of tail section length to fuselage effective diameter areas.wetted [m^2] tag <string> segment[]. (segments are in ordered container and callable by number)

vsp.shape [point,circle,round_rect,general_fuse,fuse_file] vsp.xsec_id <10 digit string> percent_x_location percent_z_location height width length effective_diameter tag

vsp.xsec_num <integer of fuselage segment quantity> vsp.xsec_surf_id <10 digit string>

Properties Used: N/A

write_vsp_fuselage(fuselage, area_tags, main_wing, fuel_tank_set_ind, OML_set_ind)[source]#

This writes a fuselage into OpenVSP format.

Assumptions: None

Source: N/A

Inputs: fuselage

width [m] lengths.total [m] heights.

maximum [m] at_quarter_length [m] at_wing_root_quarter_chord [m] at_three_quarters_length [m]

effective_diameter [m] fineness.nose [-] ratio of nose section length to fuselage width fineness.tail [-] ratio of tail section length to fuselage width tag <string> OpenVSP_values. (optional)

nose.top.angle [degrees] nose.top.strength [-] this determines how much the specified angle influences that shape nose.side.angle [degrees] nose.side.strength [-] nose.TB_Sym <boolean> determines if top angle is mirrored on bottom nose.z_pos [-] z position of the nose as a percentage of fuselage length (.1 is 10%) tail.top.angle [degrees] tail.top.strength [-] tail.z_pos (optional, 0.02 default) [-] z position of the tail as a percentage of fuselage length (.1 is 10%)

Segments. (optional)

width [m] height [m] percent_x_location [-] .1 is 10% length percent_z_location [-] .1 is 10% length

area_tags <dict> used to keep track of all tags needed in wetted area computation main_wing.origin [m] main_wing.chords.root [m] fuel_tank_set_index <int> OpenVSP object set containing the fuel tanks

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

Properties Used: N/A

set_section_angles(i, nose_z, tail_z, x_poses, z_poses, heights, widths, length, end_ind, fuse_id)[source]#

Set fuselage section angles to create a smooth (in the non-technical sense) fuselage shape. Note that i of 0 corresponds to the first section that is not the end point.

Assumptions: May fail to give reasonable angles for very irregularly shaped fuselages Does not work on the nose and tail sections.

Source: N/A

Inputs: nose_z [-] # 0.1 is 10% of the fuselage length widths np.array of [m] heights np.array of [m] tail_z [-] # 0.1 is 10% of the fuselage length

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

Properties Used: N/A

compute_fuselage_fineness(fuselage, x_locs, eff_diams, eff_diam_gradients_fwd)[source]#

This computes fuselage finenesses for nose and tail.

Assumptions: Written for OpenVSP 3.16.1

Source: N/A

Inputs: 0. Pre-loaded VSP vehicle in memory, via import_vsp_vehicle. 1. RCAIDE fuselage [object]. 2. Array of x_locations of fuselage segments. (length = L) 3. Array of effective diameters of fuselage segments. (length = L) 4. Array of effective diameter gradients from nose to tail. (length = L-1)

Outputs: Writes fineness values to RCAIDE fuselage, returns fuselage.

Properties Used: N/A

get_fuselage_height(fuselage, location)[source]#

This linearly estimates fuselage height at any percentage point (0,100) along fuselage length.

Assumptions: Written for OpenVSP 3.16.1

Source: N/A

Inputs: 0. Pre-loaded VSP vehicle in memory, via import_vsp_vehicle. 1. RCAIDE fuselage [object], containing fuselage.vsp_data.xsec_num in its data structure. 2. Fuselage percentage point [float].

Outputs: height [m]

Properties Used: N/A

find_fuse_u_coordinate(x_target, fuse_id, fuel_tank_tag)[source]#

Determines the u coordinate of an OpenVSP fuselage that matches an x coordinate

Assumptions: Fuselage is aligned with the x axis

Source: N/A

Inputs: x_target [m] fuse_id <str> fuel_tank_tag <str>

Outputs: u_current [-] u coordinate for the requests x position

Properties Used: N/A

write_fuselage_conformal_fuel_tank(fuse_id, fuel_tank, fuel_tank_set_ind)[source]#

This writes a conformal fuel tank in a fuselage.

Assumptions: Fuselage is aligned with the x axis

Source: N/A

Inputs: fuse_id <str> fuel_tank.

inward_offset [m] start_length_percent [-] .1 is 10% end_length_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