SUAVE  2.5.2
An Aerospace Vehicle Environment for Designing Future Aircraft

Functions needed to work with OpenVSP. More...

Functions

def SUAVE.Input_Output.OpenVSP.get_fuel_tank_properties.get_fuel_tank_properties (vehicle, tag, fuel_tank_set_index=3, slices_for_calculation=100)
 
def SUAVE.Input_Output.OpenVSP.get_fuel_tank_properties.apply_properties (vehicle, fuel_tanks)
 
def SUAVE.Input_Output.OpenVSP.get_fuel_tank_properties.get_fuel_tanks (vehicle)
 
def SUAVE.Input_Output.OpenVSP.get_vsp_measurements.get_vsp_measurements (filename='Unnamed_CompGeom.csv', measurement_type='wetted_area')
 
def SUAVE.Input_Output.OpenVSP.vsp_fuselage.read_vsp_fuselage (fuselage_id, fux_idx, sym_flag, units_type='SI', fineness=True, use_scaling=True)
 
def SUAVE.Input_Output.OpenVSP.vsp_fuselage.write_vsp_fuselage (fuselage, area_tags, main_wing, fuel_tank_set_ind, OML_set_ind)
 
def SUAVE.Input_Output.OpenVSP.vsp_fuselage.find_fuse_u_coordinate (x_target, fuse_id, fuel_tank_tag)
 
def SUAVE.Input_Output.OpenVSP.vsp_fuselage.write_fuselage_conformal_fuel_tank (fuse_id, fuel_tank, fuel_tank_set_ind)
 
def SUAVE.Input_Output.OpenVSP.vsp_nacelle.write_vsp_nacelle (nacelle, OML_set_ind)
 
def SUAVE.Input_Output.OpenVSP.vsp_nacelle.read_vsp_nacelle (nacelle_id, vsp_nacelle_type, units_type='SI')
 
def SUAVE.Input_Output.OpenVSP.vsp_propeller.read_vsp_propeller (prop_id, units_type='SI', write_airfoil_file=True)
 
def SUAVE.Input_Output.OpenVSP.vsp_propeller.write_vsp_propeller_bem (vsp_bem_filename, propeller)
 
def SUAVE.Input_Output.OpenVSP.vsp_propeller.make_header_text (vsp_bem, prop)
 
def SUAVE.Input_Output.OpenVSP.vsp_propeller.make_section_text (vsp_bem, prop)
 
def SUAVE.Input_Output.OpenVSP.vsp_propeller.make_airfoil_text (vsp_bem, prop)
 
def SUAVE.Input_Output.OpenVSP.vsp_read.vsp_read (tag, units_type='SI', specified_network=None, use_scaling=True)
 
def SUAVE.Input_Output.OpenVSP.vsp_wing.read_vsp_wing (wing_id, units_type='SI', write_airfoil_file=True, use_scaling=True)
 
def SUAVE.Input_Output.OpenVSP.vsp_wing.write_vsp_wing (vehicle, wing, area_tags, fuel_tank_set_ind, OML_set_ind)
 
def SUAVE.Input_Output.OpenVSP.vsp_wing.write_vsp_control_surface (wing_id, ctrl_surf, n_segments)
 
def SUAVE.Input_Output.OpenVSP.vsp_wing.write_wing_conformal_fuel_tank (vehicle, wing, wing_id, fuel_tank, fuel_tank_set_ind)
 
def SUAVE.Input_Output.OpenVSP.vsp_wing.get_vsp_trim_from_SUAVE_trim (seg_span_percents, vsp_segment_breaks, trim)
 
def SUAVE.Input_Output.OpenVSP.vsp_wing.convert_sweep (sweep, sweep_loc, new_sweep_loc, AR, taper)
 
def SUAVE.Input_Output.OpenVSP.vsp_write.write (vehicle, tag, fuel_tank_set_ind=3, verbose=True, write_file=True, OML_set_ind=4, write_igs=False)
 
def SUAVE.Input_Output.OpenVSP.write_vsp_mesh.write_vsp_mesh (geometry, tag, half_mesh_flag, growth_ratio, growth_limiting_flag)
 
def SUAVE.Input_Output.OpenVSP.write_vsp_mesh.set_sources (geometry)
 
def SUAVE.Input_Output.OpenVSP.write_vsp_mesh.add_segment_sources (comp, cr, ct, ii, u_start, num_secs, custom_flag, wingtip_flag, seg)
 

Detailed Description

Functions needed to work with OpenVSP.

Function Documentation

◆ add_segment_sources()

def SUAVE.Input_Output.OpenVSP.write_vsp_mesh.add_segment_sources (   comp,
  cr,
  ct,
  ii,
  u_start,
  num_secs,
  custom_flag,
  wingtip_flag,
  seg 
)
This sets meshing sources for the wing segments according to their size and position.

Assumptions:
None

Source:
https://github.com/OpenVSP/OpenVSP (with some modifications)

Inputs:
comp             <string> - OpenVSP component ID
cr               [m]      - root chord
ct               [m]      - tip chord
ii               [-]      - segment index
u_start          [-]      - OpenVSP parameter determining the u dimensional start point
num_secs         [-]      - number of segments on the corresponding wing
custom_flag      <boolean> - determines if custom source settings are to be used
wingtip_flag     <boolean> - indicates if the current segment is a wingtip
seg.vsp_mesh.    (only used if custom_flag is True)
  inner_length   [m]       - length of inboard element edge
  outer_length   [m]       - length of outboard element edge
  inner_radius   [m]       - radius of influence for inboard source
  outer_radius   [m]       - radius of influence for outboard source

Outputs:
None - sources are added to OpenVSP instance                             

Properties Used:
N/A

◆ apply_properties()

def SUAVE.Input_Output.OpenVSP.get_fuel_tank_properties.apply_properties (   vehicle,
  fuel_tanks 
)
Apply fuel tank properties from OpenVSP to the SUAVE vehicle.

Assumptions:
Fuel tanks exists in the fuselage and wings only

Source:
N/A

Inputs:
vehicle.fuselages.*.Fuel_Tanks.*.tag     [-]
vehicle.wings.*.Fuel_Tanks.*.tag         [-]
fuel_tanks.
  tag                                    [-]
  center_of_gravity                      [m]
  fuel_mass_when_full                    [kg]
  volume                                 [m^3]
  

Outputs:    
vehicle.fuselages.*.Fuel_Tanks.*.mass_properties.
  center_of_gravity                      [m]
  fuel_mass_when_full                    [kg]
  fuel_volume_when_full                  [m^3]
vehicle.wings.*.Fuel_Tanks.*.mass_properties.
  center_of_gravity                      [m]
  fuel_mass_when_full                    [kg]
  fuel_volume_when_full                  [m^3]
  

Properties Used:
N/A

◆ convert_sweep()

def SUAVE.Input_Output.OpenVSP.vsp_wing.convert_sweep (   sweep,
  sweep_loc,
  new_sweep_loc,
  AR,
  taper 
)
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

◆ find_fuse_u_coordinate()

def SUAVE.Input_Output.OpenVSP.vsp_fuselage.find_fuse_u_coordinate (   x_target,
  fuse_id,
  fuel_tank_tag 
)
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

◆ get_fuel_tank_properties()

def SUAVE.Input_Output.OpenVSP.get_fuel_tank_properties.get_fuel_tank_properties (   vehicle,
  tag,
  fuel_tank_set_index = 3,
  slices_for_calculation = 100 
)
This function computes the center of gravity, total possible fuel mass,
the available volume of each fuel tank in the vehicle through a mass
properties computation in OpenVSP.

Assumptions:
Fuel tanks exists in the fuselage and wings only
All fuel tanks have unique names

Source:
N/A

Inputs:
vehicle.fuselages.*.Fuel_Tanks.*.tag     [-]
vehicle.wings.*.Fuel_Tanks.*.tag         [-]

Outputs:    
vehicle.fuselages.*.Fuel_Tanks.*.mass_properties.
  center_of_gravity                      [m]
  fuel_mass_when_full                    [kg]
  fuel_volume_when_full                  [m^3]
vehicle.wings.*.Fuel_Tanks.*.mass_properties.
  center_of_gravity                      [m]
  fuel_mass_when_full                    [kg]
  fuel_volume_when_full                  [m^3]
  

Properties Used:
N/A

◆ get_fuel_tanks()

def SUAVE.Input_Output.OpenVSP.get_fuel_tank_properties.get_fuel_tanks (   vehicle)
Creates a data structure with fuel tanks based on 
fuel tanks present in the vehicle

Assumptions:
Fuel tanks exists in the fuselage and wings only

Source:
N/A

Inputs:
vehicle.fuselages.*.Fuel_Tanks.*.tag     [-]
vehicle.wings.*.Fuel_Tanks.*.tag         [-]

Outputs:    
fuel_tanks.tag                           [-]

Properties Used:
N/A

◆ get_vsp_measurements()

def SUAVE.Input_Output.OpenVSP.get_vsp_measurements.get_vsp_measurements (   filename = 'Unnamed_CompGeom.csv',
  measurement_type = 'wetted_area' 
)
This calls OpenVSP to compute the wetted areas or volumes of a previously written vehicle.

Assumptions:
Vehicle must be open in OpenVSP (via recently used vsp_write)
All components have different tags. Repeated tags are added together under the
assumption that this represents multiple engines or similar. Values computed from
repeated tags in this way may need to be divided by the number of entities later 
before assignment. This is because some analyses may multiply an assigned area
by number of engines, for example.

Source:
N/A

Inputs:
None

Outputs:
measurement   [m^2 or m^3] - Dictionary with values for each component, 
  with component tags as the keys.

Properties Used:
N/A

◆ get_vsp_trim_from_SUAVE_trim()

def SUAVE.Input_Output.OpenVSP.vsp_wing.get_vsp_trim_from_SUAVE_trim (   seg_span_percents,
  vsp_segment_breaks,
  trim 
)
Compute OpenVSP span trim coordinates based on SUAVE 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 (SUAVE value)

Outputs:
trim                [-] OpenVSP trim value

Properties Used:
N/A

◆ make_airfoil_text()

def SUAVE.Input_Output.OpenVSP.vsp_propeller.make_airfoil_text (   vsp_bem,
  prop 
)
This function writes the airfoil geometry into the vsp file
Assumptions:
    None

Source:
    None
Inputs:
    vsp_bem - OpenVSP .bem file
    prop    - SUAVE propeller data structure

Outputs:
    NA
Properties Used:
    N/A

◆ make_header_text()

def SUAVE.Input_Output.OpenVSP.vsp_propeller.make_header_text (   vsp_bem,
  prop 
)
This function writes the header of the OpenVSP .bem file
Assumptions:
    None

Source:
    None
Inputs:
    vsp_bem - OpenVSP .bem file
    prop    - SUAVE propeller data structure

Outputs:
    NA
Properties Used:
    N/A

◆ make_section_text()

def SUAVE.Input_Output.OpenVSP.vsp_propeller.make_section_text (   vsp_bem,
  prop 
)
This function writes the sectional information of the propeller
Assumptions:
    None

Source:
    None
Inputs:
    vsp_bem - OpenVSP .bem file
    prop    - SUAVE propeller data structure

Outputs:
    NA
Properties Used:
    N/A

◆ read_vsp_fuselage()

def SUAVE.Input_Output.OpenVSP.vsp_fuselage.read_vsp_fuselage (   fuselage_id,
  fux_idx,
  sym_flag,
  units_type = 'SI',
  fineness = True,
  use_scaling = True 
)
This reads an OpenVSP fuselage geometry and writes it to a SUAVE 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.
3. 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.
4. 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).
5. Written for OpenVSP 3.21.1

Source:
N/A

Inputs:
0. Pre-loaded VSP vehicle in memory, via vsp_read.
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 SUAVE 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

◆ read_vsp_nacelle()

def SUAVE.Input_Output.OpenVSP.vsp_nacelle.read_vsp_nacelle (   nacelle_id,
  vsp_nacelle_type,
  units_type = 'SI' 
)
This reads an OpenVSP stack geometry or body of revolution and writes it to a SUAVE nacelle format.
If an airfoil is defined in body-of-revolution, its coordinates are not read in due to absence of
API functions in VSP.

Assumptions: 

Source:
N/A

Inputs:
0. Pre-loaded VSP vehicle in memory, via vsp_read.
1. VSP 10-digit geom ID for nacelle.
2. Units_type set to 'SI' (default) or 'Imperial'. 

Outputs:
Writes SUAVE nacelle, with these geometries:           (all defaults are SI, but user may specify Imperial)

    Nacelles.Nacelle.   
        origin                  [m] in all three dimensions
        width                   [m]
        lengths                 [m]
        heights                 [m]
        tag                     <string>
        segment[].   (segments are in ordered container and callable by number) 
          percent_x_location    [unitless]
          percent_z_location    [unitless]
          height                [m]
          width                 [m]

Properties Used:
N/A

◆ read_vsp_propeller()

def SUAVE.Input_Output.OpenVSP.vsp_propeller.read_vsp_propeller (   prop_id,
  units_type = 'SI',
  write_airfoil_file = True 
)
This reads an OpenVSP propeller geometry and writes it into a SUAVE propeller format.

Assumptions:
1. Written for OpenVSP 3.24.0

Source:
N/A

Inputs:
1. VSP 10-digit geom ID for prop.
2. units_type set to 'SI' (default) or 'Imperial'.
3. write_airfoil_file set to True (default) or False
4. number_of_radial_stations is the radial discretization used to extract the propeller design from OpenVSP

Outputs:
Writes SUAVE propeller/rotor object, with these geometries, from VSP:
    prop.
        origin                                  [m] in all three dimensions
        orientation             [deg] in all three dimensions
        number_of_blades            [-]
        tip_radius              [m]
        hub_radius              [m]
        twist_distribution          [deg]
        chord_distribution          [m]
        radius_distribution         [m]
        sweep_distribution          [deg]
        mid_chord_alignment         [m]
        max_thickness_distribution      [m]
        thickness_to_chord          [-]
        blade_solidity              [-]
        rotation                    [-]
        thickness_to_chord                      [-]
            beta34                                  [radians]
            pre_cone                                [radians]
            rake                                    [radians]
            skew                                    [radians]
            axial                                   [radians]
            tangential                              [radians]
        dihedral                                [radians]
        symmetric                               <boolean>
        tag                                     <string>
        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

◆ read_vsp_wing()

def SUAVE.Input_Output.OpenVSP.vsp_wing.read_vsp_wing (   wing_id,
  units_type = 'SI',
  write_airfoil_file = True,
  use_scaling = True 
)
This reads an OpenVSP wing vehicle geometry and writes it into a SUAVE 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 SUAVE 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

◆ set_sources()

def SUAVE.Input_Output.OpenVSP.write_vsp_mesh.set_sources (   geometry)
This sets meshing sources in a way similar to the OpenVSP default. Some source values can
also be optionally specified as below.

Assumptions:
None

Source:
https://github.com/OpenVSP/OpenVSP (with some modifications)

Inputs:
geometry.
  wings.*.                              (passed to add_segment_sources())
    tag                                 <string>
    Segments.*.percent_span_location    [-] (.1 is 10%)
    Segments.*.root_chord_percent       [-] (.1 is 10%)
    chords.root                         [m]
    chords.tip                          [m]
    vsp_mesh                            (optional) - This holds settings that are used in add_segment_sources
  fuselages.*.
    tag                                 <string>
    vsp_mesh.                           (optional)
      length                            [m]
      radius                            [m]
    lengths.total                       (only used if vsp_mesh is not defined for the fuselage)

Outputs:
<tag>.stl                               

Properties Used:
N/A

◆ vsp_read()

def SUAVE.Input_Output.OpenVSP.vsp_read.vsp_read (   tag,
  units_type = 'SI',
  specified_network = None,
  use_scaling = True 
)
This reads an OpenVSP vehicle geometry and writes it into a SUAVE vehicle format.
Includes wings, fuselages, and propellers.

Assumptions:
1. OpenVSP vehicle is composed of conventionally shaped fuselages, wings, and propellers. 
1a. OpenVSP fuselage: generally narrow at nose and tail, wider in center). 
1b. 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.
1c. 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:
1. A tag for an XML file in format .vsp3.
2. Units_type set to 'SI' (default) or 'Imperial'
3. User-specified network
4. Boolean for whether or not to use the scaling from OpenVSP (default = True).

Outputs:
Writes SUAVE vehicle with these geometries from VSP:    (All values default to SI. Any other 2nd argument outputs Imperial.)
    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>

    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>

    Propellers.Propeller.
        location[X,Y,Z]                            [radians]
        rotation[X,Y,Z]                            [radians]
        tip_radius                                 [m]
            hub_radius                                 [m] 

Properties Used:
N/A

◆ write()

def SUAVE.Input_Output.OpenVSP.vsp_write.write (   vehicle,
  tag,
  fuel_tank_set_ind = 3,
  verbose = True,
  write_file = True,
  OML_set_ind = 4,
  write_igs = False 
)
This writes a SUAVE vehicle to OpenVSP format. It will take wing segments into account
if they are specified in the vehicle setup file.

Assumptions:
Vehicle is composed of conventional shape fuselages, wings, and networks. Any network
that should be created is tagged as 'turbofan'.

Source:
N/A

Inputs:
vehicle.
  tag                                       [-]
  wings.*.    (* is all keys)
    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                    [-]
  networks.turbofan. (optional)
    number_of_engines                       [-]
    nacelle_diameter                        [m]
    origin                                  [m] in all three dimension, should have as many origins as engines
    OpenVSP_simple (optional)               <boolean> if False (default) create a flow through nacelle, if True creates a roughly biparabolic shape
  fuselages.fuselage (optional)
    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%)
fuel_tank_set_index                         <int> OpenVSP object set containing the fuel tanks    

Outputs:
<tag>.vsp3           This is the OpenVSP representation of the aircraft

Properties Used:
N/A

◆ write_fuselage_conformal_fuel_tank()

def SUAVE.Input_Output.OpenVSP.vsp_fuselage.write_fuselage_conformal_fuel_tank (   fuse_id,
  fuel_tank,
  fuel_tank_set_ind 
)
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

◆ write_vsp_control_surface()

def SUAVE.Input_Output.OpenVSP.vsp_wing.write_vsp_control_surface (   wing_id,
  ctrl_surf,
  n_segments 
)
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_vsp_fuselage()

def SUAVE.Input_Output.OpenVSP.vsp_fuselage.write_vsp_fuselage (   fuselage,
  area_tags,
  main_wing,
  fuel_tank_set_ind,
  OML_set_ind 
)
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

◆ write_vsp_mesh()

def SUAVE.Input_Output.OpenVSP.write_vsp_mesh.write_vsp_mesh (   geometry,
  tag,
  half_mesh_flag,
  growth_ratio,
  growth_limiting_flag 
)
This create an .stl surface mesh based on a vehicle stored in a .vsp3 file.

Assumptions:
None

Source:
N/A

Inputs:
geometry.                                 - Also passed to set_sources
  wings.main_wing.chords.mean_aerodynamic [m]
half_mesh_flag                            <boolean>  determines if a symmetry plane is created
growth_ratio                              [-]        growth ratio for the mesh
growth_limiting_flag                      <boolean>  determines if 3D growth limiting is used

Outputs:
<tag>.stl                               

Properties Used:
N/A

◆ write_vsp_nacelle()

def SUAVE.Input_Output.OpenVSP.vsp_nacelle.write_vsp_nacelle (   nacelle,
  OML_set_ind 
)
This converts nacelles into OpenVSP format.

Assumptions: 
1. If nacelle segments are defined, geometry written to OpenVSP is of type "StackGeom". 
   1.a  This type of nacelle can be either set as flow through or not flow through.
   1.b  Segments are defined in a similar manner to fuselage segments. See geometric 
        documentation in SUAVE-Components-Nacelles-Nacelle

2. If nacelle segments are not defined, geometry written to OpenVSP is of type "BodyofRevolution".
   2.a This type of nacelle can be either set as flow through or not flow through.
   2.b BodyofRevolution can be either be a 4 digit airfoil (type string) or super ellipse (default)
Source:
N/A
Inputs: 
  nacelle.
  origin                              [m] in all three dimension, should have as many origins as engines 
  length                              [m]
  diameter                            [m]
  flow_through                        <boolean> if True create a flow through nacelle, if False create a cylinder
  segment(optional).
     width                            [m]
     height                           [m]
     lenght                           [m]
     percent_x_location               [m]     
     percent_y_location               [m]        
     percent_z_location               [m] 
   
Outputs:
Operates on the active OpenVSP model, no direct output
Properties Used:
N/A

◆ write_vsp_propeller_bem()

def SUAVE.Input_Output.OpenVSP.vsp_propeller.write_vsp_propeller_bem (   vsp_bem_filename,
  propeller 
)
This functions writes a .bem file for OpenVSP
Assumptions:
    None

Source:
    None
Inputs:
    OpenVSP .bem filename
    SUAVE Propeller Data Structure
Outputs:
    OpenVSP .bem file
Properties Used:
    N/A

◆ write_vsp_wing()

def SUAVE.Input_Output.OpenVSP.vsp_wing.write_vsp_wing (   vehicle,
  wing,
  area_tags,
  fuel_tank_set_ind,
  OML_set_ind 
)
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_wing_conformal_fuel_tank()

def SUAVE.Input_Output.OpenVSP.vsp_wing.write_wing_conformal_fuel_tank (   vehicle,
  wing,
  wing_id,
  fuel_tank,
  fuel_tank_set_ind 
)
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