This group of functions provides API control of cross-sections (XSecs). Airfoils are a type of XSec included in this group as well. API functions for Body of Revolution XSecs are incuded in the Specialized Geometry group.
Click here to return to the main page.
More...
|
void | CutXSec (const string &in geom_id, int index) |
|
void | CopyXSec (const string &in geom_id, int index) |
|
void | PasteXSec (const string &in geom_id, int index) |
|
void | InsertXSec (const string &in geom_id, int index, int type) |
|
int | GetXSecShape (const string &in xsec_id) |
|
double | GetXSecWidth (const string &in xsec_id) |
|
double | GetXSecHeight (const string &in xsec_id) |
|
void | SetXSecWidthHeight (const string &in xsec_id, double w, double h) |
|
string[] | GetXSecParmIDs (const string &in xsec_id) |
|
string | GetXSecParm (const string &in xsec_id, const string &in name) |
|
vec3d[] | ReadFileXSec (const string &in xsec_id, const string &in file_name) |
|
void | SetXSecPnts (const string &in xsec_id, vec3d[]@ pnt_arr) |
|
vec3d | ComputeXSecPnt (const string &in xsec_id, double fract) |
|
vec3d | ComputeXSecTan (const string &in xsec_id, double fract) |
|
void | ResetXSecSkinParms (const string &in xsec_id) |
|
void | SetXSecContinuity (const string &in xsec_id, int cx) |
|
void | SetXSecTanAngles (const string &in xsec_id, int side, double top, double right=- 1.0e12, double bottom=- 1.0e12, double left=- 1.0e12) |
|
void | SetXSecTanSlews (const string &in xsec_id, int side, double top, double right=- 1.0e12, double bottom=- 1.0e12, double left=- 1.0e12) |
|
void | SetXSecTanStrengths (const string &in xsec_id, int side, double top, double right=- 1.0e12, double bottom=- 1.0e12, double left=- 1.0e12) |
|
void | SetXSecCurvatures (const string &in xsec_id, int side, double top, double right=- 1.0e12, double bottom=- 1.0e12, double left=- 1.0e12) |
|
void | ReadFileAirfoil (const string &in xsec_id, const string &in file_name) |
|
void | SetAirfoilPnts (const string &in xsec_id, vec3d[]@ up_pnt_vec, vec3d[]@ low_pnt_vec) |
|
vec3d[] | GetHersheyBarLiftDist (const int &in npts, const double &in alpha, const double &in Vinf, const double &in span, bool full_span_flag=false) |
|
vec3d[] | GetHersheyBarDragDist (const int &in npts, const double &in alpha, const double &in Vinf, const double &in span, bool full_span_flag=false) |
|
vec3d[] | GetVKTAirfoilPnts (const int &in npts, const double &in alpha, const double &in epsilon, const double &in kappa, const double &in tau) |
|
double[] | GetVKTAirfoilCpDist (const double &in alpha, const double &in epsilon, const double &in kappa, const double &in tau, vec3d[]@ xydata) |
|
vec3d[] | GetEllipsoidSurfPnts (const vec3d &in center, const vec3d &in abc_rad, int u_npts=20, int w_npts=20) |
|
vec3d[] | GetFeatureLinePnts (const string &in geom_id) |
|
double[] | GetEllipsoidCpDist (vec3d[]@ surf_pnt_arr, const vec3d &in abc_rad, const vec3d &in V_inf) |
|
vec3d[] | GetAirfoilUpperPnts (const string &in xsec_id) |
|
vec3d[] | GetAirfoilLowerPnts (const string &in xsec_id) |
|
double[] | GetUpperCSTCoefs (const string &in xsec_id) |
|
double[] | GetLowerCSTCoefs (const string &in xsec_id) |
|
int | GetUpperCSTDegree (const string &in xsec_id) |
|
int | GetLowerCSTDegree (const string &in xsec_id) |
|
void | SetUpperCST (const string &in xsec_id, int deg, double[]@ coeff_arr) |
|
void | SetLowerCST (const string &in xsec_id, int deg, double[]@ coeff_arr) |
|
void | PromoteCSTUpper (const string &in xsec_id) |
|
void | PromoteCSTLower (const string &in xsec_id) |
|
void | DemoteCSTUpper (const string &in xsec_id) |
|
void | DemoteCSTLower (const string &in xsec_id) |
|
void | FitAfCST (const string &in xsec_surf_id, int xsec_index, int deg) |
|
void | WriteBezierAirfoil (const string &in file_name, const string &in geom_id, const double &in foilsurf_u) |
|
void | WriteSeligAirfoil (const string &in file_name, const string &in geom_id, const double &in foilsurf_u) |
|
vec3d[] | GetAirfoilCoordinates (const string &in geom_id, const double &in foilsurf_u) |
|
◆ ComputeXSecPnt()
vec3d ComputeXSecPnt |
( |
const string &in |
xsec_id, |
|
|
double |
fract |
|
) |
| |
Compute 3D coordinate for a point on an XSec curve given the parameter value (U) along the curve
int NUM_XSECS = 11;
for ( int i = 0 ; i < NUM_XSECS ; i++ )
{
string xsec =
GetXSec( xsec_surf, i );
}
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | fract | Curve parameter value (range: 0 - 1) |
- Returns
- 3D coordinate point
◆ ComputeXSecTan()
vec3d ComputeXSecTan |
( |
const string &in |
xsec_id, |
|
|
double |
fract |
|
) |
| |
Compute the tangent vector of a point on an XSec curve given the parameter value (U) along the curve
int NUM_XSECS = 11;
for ( int i = 0 ; i < NUM_XSECS ; i++ )
{
string xsec =
GetXSec( xsec_surf, i );
}
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | fract | Curve parameter value (range: 0 - 1) |
- Returns
- Tangent vector
◆ CopyXSec()
void CopyXSec |
( |
const string &in |
geom_id, |
|
|
int |
index |
|
) |
| |
Copy a cross-section from the specified geometry and maintain it in memory
string sid =
AddGeom(
"STACK",
"" );
- See also
- PasteXSec
- Parameters
-
[in] | geom_id | Geom ID |
[in] | index | XSec index |
◆ CutXSec()
void CutXSec |
( |
const string &in |
geom_id, |
|
|
int |
index |
|
) |
| |
Cut a cross-section from the specified geometry and maintain it in memory
string fid =
AddGeom(
"FUSELAGE",
"" );
- See also
- PasteXSec
- Parameters
-
[in] | geom_id | Geom ID |
[in] | index | XSec index |
◆ DemoteCSTLower()
void DemoteCSTLower |
( |
const string &in |
xsec_id | ) |
|
Demote the CST for the lower airfoil surface. The XSec must be of type XS_CST_AIRFOIL
- See also
- GetLowerCSTDegree
- Parameters
-
◆ DemoteCSTUpper()
void DemoteCSTUpper |
( |
const string &in |
xsec_id | ) |
|
Demote the CST for the upper airfoil surface. The XSec must be of type XS_CST_AIRFOIL
- See also
- GetUpperCSTDegree
- Parameters
-
◆ FitAfCST()
void FitAfCST |
( |
const string &in |
xsec_surf_id, |
|
|
int |
xsec_index, |
|
|
int |
deg |
|
) |
| |
Fit a CST airfoil for an existing airfoil of type XS_FOUR_SERIES, XS_SIX_SERIES, XS_FOUR_DIGIT_MOD, XS_FIVE_DIGIT, XS_FIVE_DIGIT_MOD, XS_ONE_SIX_SERIES, or XS_FILE_AIRFOIL.
- Parameters
-
[in] | xsec_surf_id | XsecSurf ID |
[in] | xsec_index | XSec index |
[in] | deg | CST degree |
◆ GetAirfoilCoordinates()
vec3d [] GetAirfoilCoordinates |
( |
const string &in |
geom_id, |
|
|
const double &in |
foilsurf_u |
|
) |
| |
Get the untwisted unit-length 2D coordinate points for the specified airfoil
- See also
- WriteSeligAirfoil
- Parameters
-
[in] | geom_id | Geom ID |
[in] | foilsurf_u | U location (range: 0 - 1) along the surface. The foil surface does not include root and tip caps (i.e. 2 section wing -> XSec0 @ u=0, XSec1 @ u=0.5, XSec2 @ u=1.0) |
◆ GetAirfoilLowerPnts()
vec3d [] GetAirfoilLowerPnts |
( |
const string &in |
xsec_id | ) |
|
Get the coordinate points for the lower surface of an airfoil. The XSec must be of type XS_FILE_AIRFOIL
string fuseid =
AddGeom(
"FUSELAGE",
"" );
- See also
- SetAirfoilPnts
- Parameters
-
- Returns
- Array of coordinate points for the lower airfoil surface
◆ GetAirfoilUpperPnts()
vec3d [] GetAirfoilUpperPnts |
( |
const string &in |
xsec_id | ) |
|
Get the coordinate points for the upper surface of an airfoil. The XSec must be of type XS_FILE_AIRFOIL
string fuseid =
AddGeom(
"FUSELAGE",
"" );
- See also
- SetAirfoilPnts
- Parameters
-
- Returns
- Array of coordinate points for the upper airfoil surface
◆ GetEllipsoidCpDist()
double [] GetEllipsoidCpDist |
( |
vec3d@[] |
surf_pnt_arr, |
|
|
const vec3d &in |
abc_rad, |
|
|
const vec3d &in |
V_inf |
|
) |
| |
Generate Analytical Solution for Potential Flow for specified ellipsoid shape at input surface points for input velocity vector. Based on Munk, M. M., 'Remarks on the Pressure Distribution over the Surface of an Ellipsoid, Moving Translationally Through a Perfect Fluid,' NACA TN-196, June 1924. Function initially created to compare VSPAERO results to theory.
const double pi = 3.14159265358979323846;
const int npts = 101;
const double alpha = 5;
const double beta = 5;
const double V_inf = 100.0;
theta_vec[0] = 0;
for ( int i = 1; i < npts; i++ )
{
theta_vec[i] = theta_vec[i-1] + (2 * pi / ( npts - 1) );
}
for ( int i = 0; i < npts; i++ )
{
x_slice_pnt_vec[i] =
vec3d( 0, abc_rad[1] * cos( theta_vec[i] ), abc_rad[2] *sin( theta_vec[i] ) );
}
- See also
- GetEllipsoidSurfPnts
- Parameters
-
[in] | surf_pnt_arr | Array of points on the ellipsoid surface to assess |
[in] | abc_rad | Radius along the A (X), B (Y), and C (Z) axes |
[in] | V_inf | 3D components of freestream velocity |
- Returns
- Array of Cp results corresponding to each point in surf_pnt_arr
◆ GetEllipsoidSurfPnts()
vec3d [] GetEllipsoidSurfPnts |
( |
const vec3d &in |
center, |
|
|
const vec3d &in |
abc_rad, |
|
|
int |
u_npts = 20 , |
|
|
int |
w_npts = 20 |
|
) |
| |
Generate the surface coordinate points for a ellipsoid at specified center of input radius along each axis. Based on the MATLAB function ellipsoid (https://in.mathworks.com/help/matlab/ref/ellipsoid.html).
- See also
- GetVKTAirfoilPnts
- Parameters
-
[in] | center | 3D location of the ellipsoid center |
[in] | abc_rad | Radius along the A (X), B (Y), and C (Z) axes |
[in] | u_npts | Number of points in the U direction |
[in] | w_npts | Number of points in the W direction |
- Returns
- Array of coordinates describing the ellipsoid surface
◆ GetFeatureLinePnts()
vec3d [] GetFeatureLinePnts |
( |
const string &in |
geom_id | ) |
|
Get the points along the feature lines of a particular Geom
- Parameters
-
- Returns
- Array of points along the Geom's feature lines
◆ GetHersheyBarDragDist()
vec3d [] GetHersheyBarDragDist |
( |
const int &in |
npts, |
|
|
const double &in |
alpha, |
|
|
const double &in |
Vinf, |
|
|
const double &in |
span, |
|
|
bool |
full_span_flag = false |
|
) |
| |
Get the theoretical drag (Cd) distribution for a Hershey Bar wing with unit chord length using Glauert's Method. This function was initially created to compare VSPAERO results to Lifting Line Theory. If full_span_flag is set to true symmetry is applied to the results.
double Vinf = 100;
double halfAR = 20;
double alpha_deg = 10;
int n_pts = 100;
- Parameters
-
[in] | npts | Number of points along the span to assess |
[in] | alpha | Wing angle of attack (Radians) |
[in] | Vinf | Freestream velocity |
[in] | span | Hershey Bar full-span. Note, only half is used in the calculation |
[in] | full_span_flag | Flag to apply symmetry to results (default: false) |
- Returns
- Theoretical coefficient of drag distribution array (size = 2*npts if full_span_flag = true)
◆ GetHersheyBarLiftDist()
vec3d [] GetHersheyBarLiftDist |
( |
const int &in |
npts, |
|
|
const double &in |
alpha, |
|
|
const double &in |
Vinf, |
|
|
const double &in |
span, |
|
|
bool |
full_span_flag = false |
|
) |
| |
Get the theoretical lift (Cl) distribution for a Hershey Bar wing with unit chord length using Glauert's Method. This function was initially created to compare VSPAERO results to Lifting Line Theory. If full_span_flag is set to true symmetry is applied to the results.
double Vinf = 100;
double halfAR = 20;
double alpha_deg = 10;
int n_pts = 100;
- Parameters
-
[in] | npts | Number of points along the span to assess |
[in] | alpha | Wing angle of attack (Radians) |
[in] | Vinf | Freestream velocity |
[in] | span | Hershey Bar full-span. Note, only half is used in the calculation |
[in] | full_span_flag | Flag to apply symmetry to results |
- Returns
- Theoretical coefficient of lift distribution array (size = 2*npts if full_span_flag = true)
◆ GetLowerCSTCoefs()
double [] GetLowerCSTCoefs |
( |
const string &in |
xsec_id | ) |
|
Get the CST coefficients for the lower surface of an airfoil. The XSec must be of type XS_CST_AIRFOIL
- See also
- SetLowerCST
- Parameters
-
- Returns
- Array of CST coefficients for the lower airfoil surface
◆ GetLowerCSTDegree()
int GetLowerCSTDegree |
( |
const string &in |
xsec_id | ) |
|
Get the CST degree for the lower surface of an airfoil. The XSec must be of type XS_CST_AIRFOIL
- See also
- SetLowerCST
- Parameters
-
- Returns
- CST Degree for lower airfoil surface
◆ GetUpperCSTCoefs()
double [] GetUpperCSTCoefs |
( |
const string &in |
xsec_id | ) |
|
Get the CST coefficients for the upper surface of an airfoil. The XSec must be of type XS_CST_AIRFOIL
- See also
- SetUpperCST
- Parameters
-
- Returns
- Array of CST coefficients for the upper airfoil surface
◆ GetUpperCSTDegree()
int GetUpperCSTDegree |
( |
const string &in |
xsec_id | ) |
|
Get the CST degree for the upper surface of an airfoil. The XSec must be of type XS_CST_AIRFOIL
- See also
- SetUpperCST
- Parameters
-
- Returns
- CST Degree for upper airfoil surface
◆ GetVKTAirfoilCpDist()
double [] GetVKTAirfoilCpDist |
( |
const double &in |
alpha, |
|
|
const double &in |
epsilon, |
|
|
const double &in |
kappa, |
|
|
const double &in |
tau, |
|
|
vec3d@[] |
xydata |
|
) |
| |
Get the pressure coefficient (Cp) along a Von Kármán-Trefftz airfoil of specified shape at specified points along the airfoil
const double pi = 3.14159265358979323846;
const int npts = 122;
const double alpha = 0.0;
const double epsilon = 0.1;
const double kappa = 0.1;
const double tau = 10;
- See also
- GetVKTAirfoilPnts
- Parameters
-
[in] | alpha | Airfoil angle of attack (Radians) |
[in] | epsilon | Airfoil thickness |
[in] | kappa | Airfoil camber |
[in] | tau | Airfoil trailing edge angle (Radians) |
[in] | xydata | Array of points on the airfoil to evaluate |
- Returns
- Array of Cp values for each point in xydata
◆ GetVKTAirfoilPnts()
vec3d [] GetVKTAirfoilPnts |
( |
const int &in |
npts, |
|
|
const double &in |
alpha, |
|
|
const double &in |
epsilon, |
|
|
const double &in |
kappa, |
|
|
const double &in |
tau |
|
) |
| |
Get the 2D coordinates an input number of points along a Von K�rm�n-Trefftz airfoil of specified shape
const double pi = 3.14159265358979323846;
const int npts = 122;
const double alpha = 0.0;
const double epsilon = 0.1;
const double kappa = 0.1;
const double tau = 10;
- Parameters
-
[in] | npts | Number of points along the airfoil to return |
[in] | alpha | Airfoil angle of attack (Radians) |
[in] | epsilon | Airfoil thickness |
[in] | kappa | Airfoil camber |
[in] | tau | Airfoil trailing edge angle (Radians) |
- Returns
- Array of points on the VKT airfoil (size = npts)
◆ GetXSecHeight()
double GetXSecHeight |
( |
const string &in |
xsec_id | ) |
|
Get the height of an XSec
string fuseid =
AddGeom(
"FUSELAGE",
"" );
if ( abs(
GetXSecHeight( xsec ) - 6.0 ) > 1e-6 ) {
Print(
"---> Error: API Get/Set Width " ); }
- Parameters
-
- Returns
- Xsec height
◆ GetXSecParm()
Get a specific Parm ID from an Xsec
string fuseid =
AddGeom(
"FUSELAGE",
"" );
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | name | Parm name |
- Returns
- Parm ID
◆ GetXSecParmIDs()
Get all Parm IDs for specified XSec Parm Container
string fuseid =
AddGeom(
"FUSELAGE",
"" );
if ( parm_array.size() < 1 ) {
Print(
"---> Error: API GetXSecParmIDs " ); }
- Parameters
-
- Returns
- Array of Parm IDs
◆ GetXSecShape()
int GetXSecShape |
( |
const string &in |
xsec_id | ) |
|
Get the shape of an XSec
string sid =
AddGeom(
"STACK",
"" );
string xsec =
GetXSec( xsec_surf, 1 );
- See also
- XSEC_CRV_TYPE
- Parameters
-
- Returns
- XSec type enum (i.e. XS_ELLIPSE)
◆ GetXSecWidth()
double GetXSecWidth |
( |
const string &in |
xsec_id | ) |
|
Get the width of an XSec
string fuseid =
AddGeom(
"FUSELAGE",
"" );
if ( abs(
GetXSecWidth( xsec ) - 3.0 ) > 1e-6 ) {
Print(
"---> Error: API Get/Set Width " ); }
- Parameters
-
- Returns
- Xsec width
◆ InsertXSec()
void InsertXSec |
( |
const string &in |
geom_id, |
|
|
int |
index, |
|
|
int |
type |
|
) |
| |
Insert a cross-section of particular type to the specified geometry after the given index
string wing_id =
AddGeom(
"WING" );
- See also
- XSEC_CRV_TYPE
- Parameters
-
[in] | geom_id | Geom ID |
[in] | index | XSec index |
[in] | type | XSec type enum (i.e. XS_GENERAL_FUSE) |
◆ PasteXSec()
void PasteXSec |
( |
const string &in |
geom_id, |
|
|
int |
index |
|
) |
| |
Paste the cross-section currently held in memory to the specified geometry
string sid =
AddGeom(
"STACK",
"" );
- See also
- CutXSec, CopyXSec
- Parameters
-
[in] | geom_id | Geom ID |
[in] | index | XSec index |
◆ PromoteCSTLower()
void PromoteCSTLower |
( |
const string &in |
xsec_id | ) |
|
Promote the CST for the lower airfoil surface. The XSec must be of type XS_CST_AIRFOIL
- See also
- GetLowerCSTDegree
- Parameters
-
◆ PromoteCSTUpper()
void PromoteCSTUpper |
( |
const string &in |
xsec_id | ) |
|
Promote the CST for the upper airfoil surface. The XSec must be of type XS_CST_AIRFOIL
- See also
- GetUpperCSTDegree
- Parameters
-
◆ ReadFileAirfoil()
void ReadFileAirfoil |
( |
const string &in |
xsec_id, |
|
|
const string &in |
file_name |
|
) |
| |
Read in XSec shape from airfoil file and set to the specified XSec. The XSec must be of type XS_FILE_AIRFOIL. Airfoil files may be in Lednicer or Selig format with *.af or *.dat extensions.
string fuseid =
AddGeom(
"FUSELAGE",
"" );
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | file_name | Airfoil XSec file name |
◆ ReadFileXSec()
Read in XSec shape from fuselage (*.fsx) file and set to the specified XSec. The XSec must be of type XS_FILE_FUSE.
string fuseid =
AddGeom(
"FUSELAGE",
"" );
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | file_name | Fuselage XSec file name |
- Returns
- Array of coordinate points read from the file and set to the XSec
◆ ResetXSecSkinParms()
void ResetXSecSkinParms |
( |
const string &in |
xsec_id | ) |
|
Reset all skining Parms for a specified XSec. Set top, bottom, left, and right strenghts, slew, angle, and curvature to 0. Set all symmetry and equality conditions to false.
string fid =
AddGeom(
"FUSELAGE",
"" );
string xsec =
GetXSec( xsec_surf, 1 );
- Parameters
-
◆ SetAirfoilPnts()
void SetAirfoilPnts |
( |
const string &in |
xsec_id, |
|
|
vec3d@[] |
up_pnt_vec, |
|
|
vec3d@[] |
low_pnt_vec |
|
) |
| |
Set the upper and lower points for an airfoil. The XSec must be of type XS_FILE_AIRFOIL.
string fuseid =
AddGeom(
"FUSELAGE",
"" );
for ( int i = 0 ; i < int( up_array.size() ) ; i++ )
{
up_array[i].scale_y( 2.0 );
low_array[i].scale_y( 0.5 );
}
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | up_pnt_vec | Array of points defining the upper surface of the airfoil |
[in] | low_pnt_vec | Array of points defining the lower surface of the airfoil |
◆ SetLowerCST()
void SetLowerCST |
( |
const string &in |
xsec_id, |
|
|
int |
deg, |
|
|
double@[] |
coeff_arr |
|
) |
| |
Set the CST degree and coefficients for the lower surface of an airfoil. The number of coefficients should be one more than the CST degree. The XSec must be of type XS_CST_AIRFOIL
- See also
- GetLowerCSTDegree, GetLowerCSTCoefs
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | deg | CST degree of lower airfoil surface |
[in] | coeff_arr | Array of CST coefficients for the lower airfoil surface |
◆ SetUpperCST()
void SetUpperCST |
( |
const string &in |
xsec_id, |
|
|
int |
deg, |
|
|
double@[] |
coeff_arr |
|
) |
| |
Set the CST degree and coefficients for the upper surface of an airfoil. The number of coefficients should be one more than the CST degree. The XSec must be of type XS_CST_AIRFOIL
- See also
- GetUpperCSTDegree, GetUpperCSTCoefs
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | deg | CST degree of upper airfoil surface |
[in] | coeff_arr | Array of CST coefficients for the upper airfoil surface |
◆ SetXSecContinuity()
void SetXSecContinuity |
( |
const string &in |
xsec_id, |
|
|
int |
cx |
|
) |
| |
Set C-type continuity enforcement for a particular XSec
string fid =
AddGeom(
"FUSELAGE",
"" );
for ( int i = 0 ; i < num_xsecs ; i++ )
{
string xsec =
GetXSec( xsec_surf, i );
}
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | cx | Continuity level (0, 1, or 2) |
◆ SetXSecCurvatures()
void SetXSecCurvatures |
( |
const string &in |
xsec_id, |
|
|
int |
side, |
|
|
double |
top, |
|
|
double |
right = - 1.0e12 , |
|
|
double |
bottom = - 1.0e12 , |
|
|
double |
left = - 1.0e12 |
|
) |
| |
Set curvatures for the specified XSec
string sid =
AddGeom(
"STACK",
"" );
for ( int i = 0 ; i < num_xsecs ; i++ )
{
string xsec =
GetXSec( xsec_surf, i );
}
- See also
- XSEC_SIDES_TYPE
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | side | Side type enum (i.e. XSEC_BOTH_SIDES) |
[in] | top | Top curvature |
[in] | right | Right curvature |
[in] | bottom | Bottom curvature |
[in] | left | Left curvature |
◆ SetXSecPnts()
void SetXSecPnts |
( |
const string &in |
xsec_id, |
|
|
vec3d@[] |
pnt_arr |
|
) |
| |
Set the coordinate points for a specific XSec. The XSec must be of type XS_FILE_FUSE.
string fuseid =
AddGeom(
"FUSELAGE",
"" );
if ( vec_array.size() > 0 )
{
vec_array[1] = vec_array[1] * 2.0;
vec_array[3] = vec_array[3] * 2.0;
}
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | pnt_arr | Array of XSec coordinate points |
◆ SetXSecTanAngles()
void SetXSecTanAngles |
( |
const string &in |
xsec_id, |
|
|
int |
side, |
|
|
double |
top, |
|
|
double |
right = - 1.0e12 , |
|
|
double |
bottom = - 1.0e12 , |
|
|
double |
left = - 1.0e12 |
|
) |
| |
Set the tangent angles for the specified XSec
string sid =
AddGeom(
"STACK",
"" );
for ( int i = 0 ; i < num_xsecs ; i++ )
{
string xsec =
GetXSec( xsec_surf, i );
}
- See also
- XSEC_SIDES_TYPE
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | side | Side type enum (i.e. XSEC_BOTH_SIDES) |
[in] | top | Top angle (degrees) |
[in] | right | Right angle (degrees) |
[in] | bottom | Bottom angle (degrees) |
[in] | left | Left angle (degrees) |
◆ SetXSecTanSlews()
void SetXSecTanSlews |
( |
const string &in |
xsec_id, |
|
|
int |
side, |
|
|
double |
top, |
|
|
double |
right = - 1.0e12 , |
|
|
double |
bottom = - 1.0e12 , |
|
|
double |
left = - 1.0e12 |
|
) |
| |
Set the tangent slew angles for the specified XSec
string sid =
AddGeom(
"STACK",
"" );
for ( int i = 0 ; i < num_xsecs ; i++ )
{
string xsec =
GetXSec( xsec_surf, i );
}
- See also
- XSEC_SIDES_TYPE
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | side | Side type enum (i.e. XSEC_BOTH_SIDES) |
[in] | top | Top angle (degrees) |
[in] | right | Right angle (degrees) |
[in] | bottom | Bottom angle (degrees) |
[in] | left | Left angle (degrees) |
◆ SetXSecTanStrengths()
void SetXSecTanStrengths |
( |
const string &in |
xsec_id, |
|
|
int |
side, |
|
|
double |
top, |
|
|
double |
right = - 1.0e12 , |
|
|
double |
bottom = - 1.0e12 , |
|
|
double |
left = - 1.0e12 |
|
) |
| |
Set the tangent strengths for the specified XSec
string sid =
AddGeom(
"STACK",
"" );
for ( int i = 0 ; i < num_xsecs ; i++ )
{
string xsec =
GetXSec( xsec_surf, i );
}
- See also
- XSEC_SIDES_TYPE
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | side | Side type enum (i.e. XSEC_BOTH_SIDES) |
[in] | top | Top strength |
[in] | right | Right strength |
[in] | bottom | Bottom strength |
[in] | left | Left strength |
◆ SetXSecWidthHeight()
void SetXSecWidthHeight |
( |
const string &in |
xsec_id, |
|
|
double |
w, |
|
|
double |
h |
|
) |
| |
Set the width and height of an XSec
string sid =
AddGeom(
"STACK",
"" );
string xsec_2 =
GetXSec( xsec_surf, 2 );
- Parameters
-
[in] | xsec_id | XSec ID |
[in] | w | Xsec width |
[in] | h | Xsec height |
◆ WriteBezierAirfoil()
void WriteBezierAirfoil |
( |
const string &in |
file_name, |
|
|
const string &in |
geom_id, |
|
|
const double &in |
foilsurf_u |
|
) |
| |
Write out the untwisted unit-length 2D Bezier curve for the specified airfoil in custom *.bz format. The output will describe the analytical shape of the airfoil. See BezierAirfoilExample.m and BezierCtrlToCoordPnts.m for examples of discretizing the Bezier curve and generating a Selig airfoil file.
string wing_id =
AddGeom(
"WING",
"" );
const double u = 0.5;
- Parameters
-
[in] | file_name | Airfoil (*.bz) output file name |
[in] | geom_id | Geom ID |
[in] | foilsurf_u | U location (range: 0 - 1) along the surface. The foil surface does not include root and tip caps (i.e. 2 section wing -> XSec0 @ u=0, XSec1 @ u=0.5, XSec2 @ u=1.0) |
◆ WriteSeligAirfoil()
void WriteSeligAirfoil |
( |
const string &in |
file_name, |
|
|
const string &in |
geom_id, |
|
|
const double &in |
foilsurf_u |
|
) |
| |
Write out the untwisted unit-length 2D coordinate points for the specified airfoil in Selig format. Coordinate points follow the on-screen wire frame W tesselation.
string wing_id =
AddGeom(
"WING",
"" );
const double u = 0.5;
- See also
- GetAirfoilCoordinates
- Parameters
-
[in] | file_name | Airfoil (*.dat) output file name |
[in] | geom_id | Geom ID |
[in] | foilsurf_u | U location (range: 0 - 1) along the surface. The foil surface does not include root and tip caps (i.e. 2 section wing -> XSec0 @ u=0, XSec1 @ u=0.5, XSec2 @ u=1.0) |
double[] GetEllipsoidCpDist(vec3d[]@ surf_pnt_arr, const vec3d &in abc_rad, const vec3d &in V_inf)
bool ValidParm(const string &in id)
void SetXSecTanStrengths(const string &in xsec_id, int side, double top, double right=- 1.0e12, double bottom=- 1.0e12, double left=- 1.0e12)
string GetXSecParm(const string &in xsec_id, const string &in name)
void WriteBezierAirfoil(const string &in file_name, const string &in geom_id, const double &in foilsurf_u)
string AppendXSec(const string &in xsec_surf_id, int type)
void SetXSecWidthHeight(const string &in xsec_id, double w, double h)
void WriteSeligAirfoil(const string &in file_name, const string &in geom_id, const double &in foilsurf_u)
int GetXSecShape(const string &in xsec_id)
void PasteXSec(const string &in geom_id, int index)
void InsertXSec(const string &in geom_id, int index, int type)
double signed_angle(const vec3d &in a, const vec3d &in b, const vec3d &in ref)
string[] GetXSecParmIDs(const string &in xsec_id)
string GetXSec(const string &in xsec_surf_id, int xsec_index)
void SetCustomXSecLoc(const string &in xsec_id, const vec3d &in loc)
void SetCustomXSecRot(const string &in xsec_id, const vec3d &in rot)
vec3d[] GetAirfoilLowerPnts(const string &in xsec_id)
void SetAirfoilPnts(const string &in xsec_id, vec3d[]@ up_pnt_vec, vec3d[]@ low_pnt_vec)
A class for representing 3D vectors.
double GetXSecWidth(const string &in xsec_id)
vec3d[] GetHersheyBarDragDist(const int &in npts, const double &in alpha, const double &in Vinf, const double &in span, bool full_span_flag=false)
void ChangeXSecShape(const string &in xsec_surf_id, int xsec_index, int type)
AngelScript ScriptExtension for representing the C++ std::vector.
void ResetXSecSkinParms(const string &in xsec_id)
string GetXSecSurf(const string &in geom_id, int index)
string AddGeom(const string &in type, const string &in parent=string())
void SetXSecContinuity(const string &in xsec_id, int cx)
vec3d ComputeXSecTan(const string &in xsec_id, double fract)
void SetXSecTanAngles(const string &in xsec_id, int side, double top, double right=- 1.0e12, double bottom=- 1.0e12, double left=- 1.0e12)
vec3d[] GetAirfoilUpperPnts(const string &in xsec_id)
void Print(const string &in data, bool new_line=true)
double[] GetVKTAirfoilCpDist(const double &in alpha, const double &in epsilon, const double &in kappa, const double &in tau, vec3d[]@ xydata)
vec3d ComputeXSecPnt(const string &in xsec_id, double fract)
void SetXSecPnts(const string &in xsec_id, vec3d[]@ pnt_arr)
void SetXSecTanSlews(const string &in xsec_id, int side, double top, double right=- 1.0e12, double bottom=- 1.0e12, double left=- 1.0e12)
int GetNumXSec(const string &in xsec_surf_id)
double GetXSecHeight(const string &in xsec_id)
vec3d[] ReadFileXSec(const string &in xsec_id, const string &in file_name)
void SetXSecCurvatures(const string &in xsec_id, int side, double top, double right=- 1.0e12, double bottom=- 1.0e12, double left=- 1.0e12)
void CopyXSec(const string &in geom_id, int index)
void CutXSec(const string &in geom_id, int index)
vec3d[] GetVKTAirfoilPnts(const int &in npts, const double &in alpha, const double &in epsilon, const double &in kappa, const double &in tau)
vec3d[] GetHersheyBarLiftDist(const int &in npts, const double &in alpha, const double &in Vinf, const double &in span, bool full_span_flag=false)
void ReadFileAirfoil(const string &in xsec_id, const string &in file_name)