User Tools

Site Tools


airfoilexport

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

airfoilexport [2018/04/17 14:23] (current)
jgravett Creates Airfoil Export Wiki
Line 1: Line 1:
 +====== Airfoil Export ======
  
 +As of v3.16.0, OpenVSP has the ability to export the airfoil stacks for wing and propeller geometries. Wing and propeller geometries in OpenVSP are defined as piecewise surfaces, in which each end of the surface is a specific airfoil cross-section (XSec). All a user needs to do is adjust the shape of a cross-section and OpenVSP will parametrically redefine the surfaces the cross-section is connected to. Between two airfoil sections, OpenVSP will interpolate intermediary airfoil sections at locations determined by the spanwise (U) tessellation,​ as seen in the on-screen wire-frame view.
 +
 +==== Airfoil File Formats ====
 +
 +The airfoil export feature supports two representations of the 2D airfoils: points in Selig *.dat format and curves in Bezier *.bz format.
 +
 +=== Selig Format ===
 +
 +The Selig airfoil file format simply lists the 2D airfoil coordinate points by starting at the trailing edge, progressing to the leading edge along the upper surface, and returning to the trailing edge along the lower surface. The Selig airfoil file format is supported in many 2D airfoil analysis programs without requiring any modifications. The location of each coordinate point in a Selig airfoil file exported from OpenVSP is determined by the chordwise (W) tessellation,​ considering parameters such as leading and trailing edge clustering.
 +
 +=== Bezier Format ===
 +
 +The Bezier airfoil file format has been created by the OpenVSP development team. The first two lines of the *.bz file list the file name followed by the total number of Bezier segments. The third line is a header describing each column in the comma delimited data section that ensues. Each line in the data section describes a single Bezier segment. For each segment, the order is first listed. Next, the global starting and ending t values for the segment are identified, for which the entire Bezier curve is defined on a 0 ≤ t ≤ 1 basis. The rest of the line lists the 2D coordinate points of each control point for the segment. To discretize the Bezier airfoil from the piecewise Bezier segments, the following equation is used:
 +
 +{{ :​bezierequation.png?​400 |}}
 +
 +where n is the Bezier order and 𝑃𝑖 is each control point. An example MATLAB function, “BezierCtrlToCoordPnts.m”,​ and script, “BezierAirfoilExample.m”,​ were developed to demonstrate how to discretize a Bezier airfoil file exported from OpenVSP. These files can be found in the matlab folder of the OpenVSP software.
 +
 +=== Airfoil Metadata File ===
 +
 +The airfoil metadata *.csv file is automatically generated when exporting an airfoil stack from OpenVSP. Its main purpose is to identify airfoil information that can not be included in the individual airfoil files. The file begins by listing the directory that all individual airfoil files are placed in when exported from OpenVSP. The metadata information for each exported airfoil file is then listed. Examples of metadata for each airfoil include the airfoil file name and index, leading and trailing edge coordinate points, chord length, and an indicator if the airfoil is located at a defined cross-section.
 +
 +==== GUI Operations ====
 +
 +The airfoil export feature in OpenVSP is accessed by first opening the Export GUI by selecting “Export…” from the File dropdown in the top menu bar. After indicating the export set, the buttons labeled “Airfoil Points (.dat)” and “Airfoil Curves (.bz)” can be clicked to indicate Selig or Bezier file format. Note, only airfoils from wing and propeller geometries will be included from the export set. For the Selig airfoil file format, an option is available to temporarily increase the chordwise (W) tessellation by a specified factor for the export set. Each airfoil file is automatically named using the following convention: GeomName_GeomID_AirfoilIndex,​ followed by the airfoil file format extension. Including the Geom ID in the airfoil file name is optional. Once the desired options have been set, clicking “OK” will bring up a file selector to specify the name and location of the airfoil metadata *.csv file.
 +
 +==== API, Scripting, and Examples ====
 +
 +API support has been developed to allow for individual airfoil file export of any constant u curve on a wing or propeller geometry. To export a single Selig airfoil file, vsp::​WriteSeligAirfoil( const std::string & file_name, const std::string & geom_id, const double foilsurf_u ) is called. If a Bezier file format is desired, vsp::​WriteBezierAirfoil( const std::string & file_name, const std::string & geom_id, const double foilsurf_u ) can be used. In each function, “foilsurf_u” is the spanwise location along a propeller or wing’s airfoil surface. The
 +airfoil surface is essentially the entire surface of the geometry that lies between the first and last airfoil cross-sections,​ so therefore does not include wing caps or tips. 
 +
 +Export of a single airfoil file in Selig and Bezier format is demonstrated in the example script “SingleAirfoilExport.vspscript”,​ located in the scripts directory of the OpenVSP software. An additional example script, “AirfoilExport.vspscript” has been added to demonstrate export of an entire airfoil set through the OpenVSP API, similar to what can be done using the export GUI.
 +
 +[[start|Back to Landing Page]]
 +
 +This page was created and edited by:  --- //​[[justin.gravett@esaero.com|Justin Gravett]] 2018/04/17 12:00//
airfoilexport.txt · Last modified: 2018/04/17 14:23 by jgravett