VSPAERO Functions

The following group of functions are specific to VSPAERO. However, their relevance has been mostly replaced by Analysis Manager capabilities.

GetVSPAERORefWingID()

Get ID of the current VSPAERO reference Geom

SetVSPAERORefWingID(geom_id)

Set the current VSPAERO reference Geom ID

Details

openvsp.GetVSPAERORefWingID()[source]

Get ID of the current VSPAERO reference Geom

wid = AddGeom( "WING" )

Update()

SetVSPAERORefWingID( wid )

assert GetVSPAERORefWingID() == wid, "GetVSPAERORefWingID did not report the wing that was set"
Return type:

string

Returns:

string Reference Geom ID

openvsp.SetVSPAERORefWingID(geom_id)[source]

Set the current VSPAERO reference Geom ID

#==== Add Wing Geom and set some parameters =====//
wing_id = AddGeom( "WING" )

SetGeomName( wing_id, "MainWing" )

#==== Add Vertical tail and set some parameters =====//
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 )

print( GetVSPAERORefWingID() )

assert GetVSPAERORefWingID() == wing_id, "SetVSPAERORefWingID did not take"

# Naming a Geom that does not exist has to be rejected.  The error queue is
# reached through the error manager singleton in Python.
err_mgr = ErrorMgrSingleton.getInstance()

SetVSPAERORefWingID( "NOSUCHGEOM" )

assert err_mgr.GetNumTotalErrors() > 0, "SetVSPAERORefWingID accepted a bad Geom ID"

# That error was raised deliberately, so take it back off the queue.
while err_mgr.GetNumTotalErrors() > 0 :
    err = err_mgr.PopLastError()
Parameters:

[in] – geom_id string Reference Geom ID