OpenVSP API Documentation 3.55.0
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)
void vsp::SetVSPAEROModeID (const std::string &mode_id)
std::string vsp::GetVSPAEROModeID ()
void vsp::SetVSPAEROCGModeID (const std::string &mode_id)
std::string vsp::GetVSPAEROCGModeID ()

Detailed Description

Function Documentation

◆ GetVSPAEROCGModeID()

std::string vsp::GetVSPAEROCGModeID ( )
extern

Get the mode the VSPAERO mass properties (CG) analysis uses, kept with the model.

AddGeom( "POD" );
string mid = CreateAndAddMode( "Clean", SET_ALL, SET_NONE );
if ( GetVSPAEROCGModeID() != mid )
{
Print( "ERROR: GetVSPAEROCGModeID did not return the mode set" );
__failure++;
}
void Print(const std::string &data, bool new_line=true)
@ SET_NONE
@ SET_ALL
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
std::string CreateAndAddMode(const std::string &name, int normal_set, int degen_set)
std::string GetVSPAEROCGModeID()
void SetVSPAEROCGModeID(const std::string &mode_id)
See also
SetVSPAEROCGModeID
Returns
string Mode ID, or an empty string for none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetVSPAEROModeID()

std::string vsp::GetVSPAEROModeID ( )
extern

Get the mode the VSPAERO analysis uses, kept with the model.

AddGeom( "POD" );
string mid = CreateAndAddMode( "Clean", SET_ALL, SET_NONE );
if ( GetVSPAEROModeID() != mid )
{
Print( "ERROR: GetVSPAEROModeID did not return the mode set" );
__failure++;
}
std::string GetVSPAEROModeID()
void SetVSPAEROModeID(const std::string &mode_id)
See also
SetVSPAEROModeID
Returns
string Mode ID, or an empty string for none
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetVSPAERORefWingID()

std::string vsp::GetVSPAERORefWingID ( )
extern

Get ID of the current VSPAERO reference Geom

string wid = AddGeom( "WING" );
if ( GetVSPAERORefWingID() != wid ) { Print( "ERROR: GetVSPAERORefWingID" ); __failure++; }
std::string SetVSPAERORefWingID(const std::string &geom_id)
std::string GetVSPAERORefWingID()
void Update(bool update_managers=true)
Returns
string Reference Geom ID
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVSPAEROCGModeID()

void vsp::SetVSPAEROCGModeID ( const std::string & mode_id)
extern

Set the mode the VSPAERO screen's Mass Prop button uses to find the CG when its CG use-mode flag is on, kept with the model, or an empty string for none. Only that button uses it: the CGModeID input of the VSPAEROSweep analysis has no effect. The flag is the "CGUseMode" Parm, group "VSPAERO", of the "VSPAEROSettings" container.

AddGeom( "POD" );
string mid = CreateAndAddMode( "Clean", SET_ALL, SET_NONE );
if ( GetVSPAEROCGModeID() != mid )
{
Print( "ERROR: SetVSPAEROCGModeID did not set the mode" );
__failure++;
}
See also
GetVSPAEROCGModeID
Parameters
[in]mode_idstring Mode ID, or an empty string
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetVSPAEROModeID()

void vsp::SetVSPAEROModeID ( const std::string & mode_id)
extern

Set the mode the VSPAERO analysis uses when its use-mode flag is on, kept with the model, or an empty string for none. The analysis input overrides it for one run. The flag is the "UseMode" Parm, group "VSPAERO", of the "VSPAEROSettings" container.

AddGeom( "POD" );
string mid = CreateAndAddMode( "Clean", SET_ALL, SET_NONE );
if ( GetVSPAEROModeID() != mid )
{
Print( "ERROR: SetVSPAEROModeID did not set the mode" );
__failure++;
}
See also
GetVSPAEROModeID
Parameters
[in]mode_idstring Mode ID, or an empty string
Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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)
double SetParmValUpdate(const std::string &parm_id, double val)
Parameters
[in]geom_idstring Reference Geom ID
Here is the call graph for this function:
Here is the caller graph for this function: