OpenVSP API Documentation 3.51.3
Loading...
Searching...
No Matches
VSPAERO Functions

The following group of functions are specific to VSPAERO. However, their relevance has been mostly replaced by Analysis Manager capabilities. Click here to return to the main page. More...

Functions

std::string vsp::GetVSPAERORefWingID ()
std::string vsp::SetVSPAERORefWingID (const std::string &geom_id)

Detailed Description

Function Documentation

◆ GetVSPAERORefWingID()

std::string vsp::GetVSPAERORefWingID ( )
extern

Get ID of the current VSPAERO reference Geom

Returns
string Reference Geom ID

◆ SetVSPAERORefWingID()

std::string vsp::SetVSPAERORefWingID ( const std::string & geom_id)
extern

Set the current VSPAERO reference Geom ID

//==== Add Wing Geom and set some parameters =====//
string wing_id = AddGeom( "WING" );
SetGeomName( wing_id, "MainWing" );
//==== Add Vertical tail and set some parameters =====//
string vert_id = AddGeom( "WING" );
SetGeomName( vert_id, "Vert" );
SetParmValUpdate( vert_id, "TotalArea", "WingGeom", 10.0 );
SetParmValUpdate( vert_id, "X_Rel_Location", "XForm", 8.5 );
SetParmValUpdate( vert_id, "X_Rel_Rotation", "XForm", 90 );
//==== Set VSPAERO Reference lengths & areas ====//
SetVSPAERORefWingID( wing_id ); // Set as reference wing for VSPAERO
Print( "VSPAERO Reference Wing ID: ", false );
if ( GetVSPAERORefWingID() != wing_id )
{
Print( "ERROR: SetVSPAERORefWingID did not take" );
__failure++;
}
// Naming a Geom that does not exist has to be rejected.
SetVSPAERORefWingID( "NOSUCHGEOM" );
if ( GetNumTotalErrors() == 0 )
{
Print( "ERROR: SetVSPAERORefWingID accepted a bad Geom ID" );
__failure++;
}
// That error was raised deliberately, so take it back off the queue.
while ( GetNumTotalErrors() > 0 )
{
ErrorObj err = PopLastError();
}
void SetGeomName(const std::string &geom_id, const std::string &name)
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
double SetParmValUpdate(const std::string &parm_id, double val)
std::string SetVSPAERORefWingID(const std::string &geom_id)
std::string GetVSPAERORefWingID()
Parameters
[in]geom_idstring Reference Geom ID