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

SetVSPAEROModeID(mode_id)

Set the mode the VSPAERO analysis uses when its use-mode flag is on, kept with the model, or an empty string for none.

GetVSPAEROModeID()

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

SetVSPAEROCGModeID(mode_id)

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.

GetVSPAEROCGModeID()

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

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

openvsp.SetVSPAEROModeID(mode_id)[source]

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" )

mid = CreateAndAddMode( "Clean", SET_ALL, SET_NONE )

SetVSPAEROModeID( mid )

assert GetVSPAEROModeID() == mid, "SetVSPAEROModeID did not set the mode"

See also: GetVSPAEROModeID :param [in]: mode_id string Mode ID, or an empty string

openvsp.GetVSPAEROModeID()[source]

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

AddGeom( "POD" )

mid = CreateAndAddMode( "Clean", SET_ALL, SET_NONE )

SetVSPAEROModeID( mid )

assert GetVSPAEROModeID() == mid, "GetVSPAEROModeID did not return the mode set"

See also: SetVSPAEROModeID :rtype: string :return: string Mode ID, or an empty string for none

openvsp.SetVSPAEROCGModeID(mode_id)[source]

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" )

mid = CreateAndAddMode( "Clean", SET_ALL, SET_NONE )

SetVSPAEROCGModeID( mid )

assert GetVSPAEROCGModeID() == mid, "SetVSPAEROCGModeID did not set the mode"

See also: GetVSPAEROCGModeID :param [in]: mode_id string Mode ID, or an empty string

openvsp.GetVSPAEROCGModeID()[source]

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

AddGeom( "POD" )

mid = CreateAndAddMode( "Clean", SET_ALL, SET_NONE )

SetVSPAEROCGModeID( mid )

assert GetVSPAEROCGModeID() == mid, "GetVSPAEROCGModeID did not return the mode set"

See also: SetVSPAEROCGModeID :rtype: string :return: string Mode ID, or an empty string for none