The following group of functions provide API capability for setting up actuator disks (Disk tab of VSPAERO GUI) and propellers (Propeller tab of VSPAERO GUI) for VSPAERO analysis. If a propeller geometry is used to model the actuator disk, the "PropMode" must be set to PROP_DISK or PROP_BOTH. Alternatively, the "PropMode" but be set to PROP_BLADE or PROP_BOTH for unsteady analysis. must be set to PROP_DISK or PROP_BOTH. Click here to return to the main page.
More...
◆ FindActuatorDisk()
| std::string vsp::FindActuatorDisk |
( |
int | disk_index | ) |
|
|
extern |
Get the ID of a VSPAERO actuator disk at the specified index. An empty string is returned if the index is out of range.
string prop_id =
AddGeom(
"PROP",
"" );
if ( disk_id.length() == 0 )
{
Print( "ERROR: FindActuatorDisk found nothing" );
__failure++;
}
std::string AddGeom(const std::string &type, const std::string &parent=std::string())
std::string FindParm(const std::string &parm_container_id, const std::string &parm_name, const std::string &group_name)
double SetParmVal(const std::string &parm_id, double val)
std::string FindActuatorDisk(int disk_index)
void Update(bool update_managers=true)
- See also
- PROP_MODE
- Parameters
-
| [in] | disk_index | int Actuator disk index for the current VSPAERO set |
- Returns
- string Actuator disk ID
◆ FindUnsteadyGroup()
| std::string vsp::FindUnsteadyGroup |
( |
int | group_index | ) |
|
|
extern |
Get the ID of the VSPAERO unsteady group at the specified index. An empty string is returned if the index is out of range.
string wing_id =
AddGeom(
"WING" );
string prop_id =
AddGeom(
"PROP",
"" );
if ( disk_id.length() == 0 )
{
Print( "ERROR: FindUnsteadyGroup found nothing" );
__failure++;
}
std::string FindUnsteadyGroup(int group_index)
- See also
- PROP_MODE
- Parameters
-
| [in] | group_index | int Unsteady group index for the current VSPAERO set |
- Returns
- string Unsteady group ID
◆ GetNumActuatorDisks()
| int vsp::GetNumActuatorDisks |
( |
| ) |
|
|
extern |
Get the number of actuator disks in the current VSPAERO set. This is equivalent to the number of disk surfaces in the VSPAERO set.
string prop_id =
AddGeom(
"PROP",
"" );
if ( num_disk != 0 )
{
Print( "ERROR: a bladed propeller counts as an actuator disk" );
__failure++;
}
if ( num_disk != 1 )
{
Print( "ERROR: GetNumActuatorDisks did not count the disk" );
__failure++;
}
for ( int i = 0; i < num_disk; i++ )
{
{
Print( "ERROR: GetNumActuatorDisks counted a disk that cannot be found" );
__failure++;
}
}
std::string FindContainer(const std::string &name, int index)
double SetParmValUpdate(const std::string &parm_id, double val)
int GetNumActuatorDisks()
- See also
- PROP_MODE
- Returns
- int Number of actuator disks in the current VSPAERO set
◆ GetNumUnsteadyGroups()
| int vsp::GetNumUnsteadyGroups |
( |
| ) |
|
|
extern |
Get the number of unsteady groups in the current VSPAERO set. Each propeller is placed in its own unsteady group. All symmetric copies of propellers are also placed in an unsteady group. All other component types are placed in a single fixed component unsteady group.
string prop_id =
AddGeom(
"PROP" );
if ( num_group != 0 )
{
Print( "ERROR: an actuator disk counts as an unsteady group" );
__failure++;
}
if ( num_group != 1 )
{
Print( "ERROR: the bladed propeller was not counted" );
__failure++;
}
string wing_id =
AddGeom(
"WING" );
if ( num_group != 2 )
{
Print( "ERROR: the fixed component group was not counted" );
__failure++;
}
{
Print( "ERROR: GetNumUnsteadyGroups disagrees with GetNumUnsteadyRotorGroups" );
__failure++;
}
int GetNumUnsteadyGroups()
int GetNumUnsteadyRotorGroups()
- See also
- PROP_MODE, GetNumUnsteadyRotorGroups
- Returns
- int Number of unsteady groups in the current VSPAERO set
◆ GetNumUnsteadyRotorGroups()
| int vsp::GetNumUnsteadyRotorGroups |
( |
| ) |
|
|
extern |
Get the number of unsteady rotor groups in the current VSPAERO set. This is equivalent to the total number of propeller Geoms, including each symmetric copy, in the current VSPAERO set. While all fixed components (wings, fuseleage, etc.) are placed in their own unsteady group, this function does not consider them.
string prop_id =
AddGeom(
"PROP" );
if ( num_group != 0 )
{
Print( "ERROR: an actuator disk counts as a rotor group" );
__failure++;
}
if ( num_group != 1 )
{
Print( "ERROR: the bladed propeller was not counted" );
__failure++;
}
string wing_id =
AddGeom(
"WING" );
if ( num_group != 1 )
{
Print( "ERROR: the wing was counted as a rotor group" );
__failure++;
}
{
Print( "ERROR: the fixed component group was not counted" );
__failure++;
}
- See also
- PROP_MODE, GetNumUnsteadyGroups
- Returns
- int Number of unsteady rotor groups in the current VSPAERO set
◆ GetUnsteadyGroupCompIDs()
| std::vector< std::string > vsp::GetUnsteadyGroupCompIDs |
( |
int | group_index | ) |
|
|
extern |
Get an array of IDs for all components in the unsteady group at the specified index.
string pod_id =
AddGeom(
"POD",
"" );
string wing_id =
AddGeom(
"WING", pod_id );
SetParmVal( wing_id,
"X_Rel_Location",
"XForm", 2.5 );
if ( comp_ids.size() != 3 )
{
Print( "ERROR: GetUnsteadyGroupCompIDs" );
__failure++;
}
std::vector< std::string > GetUnsteadyGroupCompIDs(int group_index)
- See also
- GetUnsteadyGroupSurfIndexes
- Parameters
-
| [in] | group_index | int Unsteady group index for the current VSPAERO set |
- Returns
- vector <string> Array of component IDs
◆ GetUnsteadyGroupName()
| std::string vsp::GetUnsteadyGroupName |
( |
int | group_index | ) |
|
|
extern |
Get the name of the unsteady group at the specified index. The name is derived from the group contents – a rotor group takes the name of its propeller and every other group is the fixed component group – so there is no matching setter.
string pod_id =
AddGeom(
"POD",
"" );
string wing_id =
AddGeom(
"WING", pod_id );
SetParmVal( wing_id,
"X_Rel_Location",
"XForm", 2.5 );
{
Print( "ERROR: GetUnsteadyGroupName did not name the fixed component group" );
__failure++;
}
{
Print( "ERROR: the fixed group does not hold the components" );
__failure++;
}
if ( GetNumTotalErrors() == 0 )
{
Print( "ERROR: GetUnsteadyGroupName accepted an index past the end" );
__failure++;
}
while ( GetNumTotalErrors() > 0 )
{
}
std::string GetUnsteadyGroupName(int group_index)
- Parameters
-
| [in] | group_index | int Unsteady group index for the current VSPAERO set |
- Returns
- string Unsteady group name
◆ GetUnsteadyGroupSurfIndexes()
| std::vector< int > vsp::GetUnsteadyGroupSurfIndexes |
( |
int | group_index | ) |
|
|
extern |
Get an array of surface indexes for all components in the unsteady group at the specified index.
string pod_id =
AddGeom(
"POD",
"" );
string wing_id =
AddGeom(
"WING", pod_id );
SetParmVal( wing_id,
"X_Rel_Location",
"XForm", 2.5 );
if ( surf_indexes.size() != 3 )
{
Print( "ERROR: GetUnsteadyGroupSurfIndexes" );
__failure++;
}
std::vector< int > GetUnsteadyGroupSurfIndexes(int group_index)
- See also
- GetUnsteadyGroupCompIDs
- Parameters
-
| [in] | group_index | int Unsteady group index for the current VSPAERO set |
- Returns
- vector <int> Array of surface indexes