OpenVSP API Documentation 3.41.2
 
Loading...
Searching...
No Matches
Parasite Drag Functions

This group of API functions is supplemental to performing a Paraste Drag analysis through the Analysis Manager. They include functions to write out Parasite Drag Tool equations, calculate atmospheric properties, and control excrescences. Click here to return to the main page. More...

Functions

void vsp::AddExcrescence (const std::string &excresName, const int &excresType, const double &excresVal)
 
void vsp::DeleteExcrescence (const int &index)
 
void vsp::UpdateParasiteDrag ()
 
void vsp::WriteAtmosphereCSVFile (const std::string &file_name, const int &atmos_type)
 
void vsp::CalcAtmosphere (const double &alt, const double &delta_temp, const int &atmos_type, double &temp, double &pres, double &pres_ratio, double &rho_ratio)
 
void vsp::WriteBodyFFCSVFile (const std::string &file_name)
 
void vsp::WriteWingFFCSVFile (const std::string &file_name)
 
void vsp::WriteCfEqnCSVFile (const std::string &file_name)
 
void vsp::WritePartialCfMethodCSVFile (const std::string &file_name)
 

Detailed Description

Function Documentation

◆ AddExcrescence()

void vsp::AddExcrescence ( const std::string & excresName,
const int & excresType,
const double & excresVal )
extern

Add an Excresence to the Parasite Drag Tool

AddExcrescence( "Miscellaneous", EXCRESCENCE_COUNT, 8.5 );
AddExcrescence( "Cowl Boattail", EXCRESCENCE_CD, 0.0003 );
@ EXCRESCENCE_COUNT
Definition APIDefines.h:483
@ EXCRESCENCE_CD
Definition APIDefines.h:484
void AddExcrescence(const std::string &excresName, const int &excresType, const double &excresVal)
See also
EXCRES_TYPE
Parameters
[in]excresNameName of the Excressence
[in]excresTypeExcressence type enum (i.e. EXCRESCENCE_PERCENT_GEOM)
[in]excresValExcressence value

◆ CalcAtmosphere()

void vsp::CalcAtmosphere ( const double & alt,
const double & delta_temp,
const int & atmos_type,
double & temp,
double & pres,
double & pres_ratio,
double & rho_ratio )
extern

Calculate the atmospheric properties determined by a specified model at input altitude and temperature deviation. This function may not be used for any manual atmospheric model types (i.e. ATMOS_TYPE_MANUAL_P_T). This function assumes freestream units are metric, temperature units are Kelvin, and pressure units are kPA.

double temp, pres, pres_ratio, rho_ratio;
double alt = 4000;
double delta_temp = 0;
CalcAtmosphere( alt, delta_temp, ATMOS_TYPE_US_STANDARD_1976, temp, pres, pres_ratio, rho_ratio );
@ ATMOS_TYPE_US_STANDARD_1976
Definition APIDefines.h:69
void CalcAtmosphere(const double &alt, const double &delta_temp, const int &atmos_type, double &temp, double &pres, double &pres_ratio, double &rho_ratio)
See also
ATMOS_TYPE
Parameters
[in]altAltitude
[in]delta_tempDeviation in temperature from the value specified in the atmospheric model
[in]atmos_typeAtmospheric model enum (i.e. ATMOS_TYPE_HERRINGTON_1966)
[out]tempoutput Temperature
[out]presoutput Pressure
[out]pres_ratioOutput pressure ratio
[out]rho_ratioOutput density ratio

◆ DeleteExcrescence()

void vsp::DeleteExcrescence ( const int & index)
extern

Delete an Excresence from the Parasite Drag Tool

AddExcrescence( "Miscellaneous", EXCRESCENCE_COUNT, 8.5 );
AddExcrescence( "Cowl Boattail", EXCRESCENCE_CD, 0.0003 );
AddExcrescence( "Percentage Example", EXCRESCENCE_PERCENT_GEOM, 5 );
DeleteExcrescence( 2 ); // Last Index
@ EXCRESCENCE_PERCENT_GEOM
Definition APIDefines.h:485
void DeleteExcrescence(const int &index)
Parameters
[in]indexint Index of the Excressence to delete

◆ UpdateParasiteDrag()

void vsp::UpdateParasiteDrag ( )
extern

Update any reference geometry, atmospheric properties, excressences, etc. in the Parasite Drag Tool

◆ WriteAtmosphereCSVFile()

void vsp::WriteAtmosphereCSVFile ( const std::string & file_name,
const int & atmos_type )
extern

Calculate the atmospheric properties determined by a specified model for a preset array of altitudes ranging from 0 to 90000 m and write the results to a CSV output file

Print( "Starting USAF Atmosphere 1966 Table Creation. \n" );
WriteAtmosphereCSVFile( "USAFAtmosphere1966Data.csv", ATMOS_TYPE_HERRINGTON_1966 );
@ ATMOS_TYPE_HERRINGTON_1966
Definition APIDefines.h:70
void WriteAtmosphereCSVFile(const std::string &file_name, const int &atmos_type)
See also
ATMOS_TYPE
Parameters
[in]file_nameOutput CSV file
[in]atmos_typeAtmospheric model enum (i.e. ATMOS_TYPE_HERRINGTON_1966)

◆ WriteBodyFFCSVFile()

void vsp::WriteBodyFFCSVFile ( const std::string & file_name)
extern

Calculate the form factor from each body FF equation (i.e. Hoerner Streamlined Body) and write the results to a CSV output file

Print( "Starting Body Form Factor Data Creation. \n" );
WriteBodyFFCSVFile( "BodyFormFactorData.csv" );
void WriteBodyFFCSVFile(const std::string &file_name)
Parameters
[in]file_nameOutput CSV file

◆ WriteCfEqnCSVFile()

void vsp::WriteCfEqnCSVFile ( const std::string & file_name)
extern

Calculate the coefficient of friction from each Cf equation (i.e. Power Law Blasius) and write the results to a CSV output file

Print( "Starting Turbulent Friciton Coefficient Data Creation. \n" );
WriteCfEqnCSVFile( "FrictionCoefficientData.csv" );
void WriteCfEqnCSVFile(const std::string &file_name)
Parameters
[in]file_nameOutput CSV file

◆ WritePartialCfMethodCSVFile()

void vsp::WritePartialCfMethodCSVFile ( const std::string & file_name)
extern

Calculate the partial coefficient of friction and write the results to a CSV output file

Print( "Starting Partial Friction Method Data Creation. \n" );
WritePartialCfMethodCSVFile( "PartialFrictionMethodData.csv" );
void WritePartialCfMethodCSVFile(const std::string &file_name)
Parameters
[in]file_nameOutput CSV file

◆ WriteWingFFCSVFile()

void vsp::WriteWingFFCSVFile ( const std::string & file_name)
extern

Calculate the form factor from each wing FF equation (i.e. Schemensky 4 Series Airfoil) and write the results to a CSV output file

Print( "Starting Wing Form Factor Data Creation. \n" );
WriteWingFFCSVFile( "WingFormFactorData.csv" );
void WriteWingFFCSVFile(const std::string &file_name)
Parameters
[in]file_nameOutput CSV file