Cannot access actuator disk or set RPM/CT/CP after ComputeGeometry (Python API, v3.46.0)

53 views
Skip to first unread message

Steven Zhu

unread,
Oct 9, 2025, 6:24:35 PMOct 9
to OpenVSP
Hi, I found a reproducible issue with the Python API in 3.46.0 on Windows and would appreciate help confirming whether this is a bug or a user mistake.  

I add a PROP in disk mode via the Python API and run ExecAnalysis("VSPAEROComputeGeometry"). If I do not add a WING first, I can access the actuator disk and set/read RotorRPM, RotorCT, RotorCP. If I add a WING before running compute-geometry, the disk becomes inaccessible: GetNumActuatorDisks() returns 0 and FindActuatorDisk(0) raises FindActuatorDisk::disk_index 0 out of range, so I cannot read or modify RPM/CT/CP after the analysis.

I attach a minimal reproducible Python script that toggles the add-wing / no-wing cases. Is this a known regression in 3.46.0, or is there a required analysis input I should set so the actuator disk remains accessible?

Thanks.

Steven

disktest.py

Rob McDonald

unread,
Oct 9, 2025, 6:32:29 PMOct 9
to OpenVSP
You're likely using the 'Shown' Set for your analysis.

When the geometry is prepared, the geometry is no-show'ed.  That makes the Shown Set empty -- which means that the actuator disk is not in the active analysis Set anymore.

Use an explicit Set, put your desired geometry (including the actuator disk) into that Set.  It should work as desired from there.

Rob

Steven Zhu

unread,
Oct 9, 2025, 6:40:19 PMOct 9
to OpenVSP
Hi, 

Thank you for your reply. I created the prop using following command:     
prop_id = vsp.AddGeom( "PROP", "" )
vsp.SetParmVal( prop_id, "PropMode", "Design", vsp.PROP_DISK )
vsp.SetSetFlag(prop_id, vsp.SET_FIRST_USER + 0, True)
vsp.Update()

I should have put the disk in set 3, which is the set after shown and not-shown, and the problems persists. 

Thank you

Yixuan


Rob McDonald

unread,
Oct 9, 2025, 6:52:12 PMOct 9
to OpenVSP
That places the prop in the desired Set, but you also have to tell VSPAERO to use that Set.  And you have to tell it twice -- once for the geometry preparation, another time for the analysis.

You should use Sets for all your Geom's (including the wing, etc).

vsp.SetIntAnalysisInput(compgeom_name, 'GeomSet', [vsp.SET_NONE], 0) # Thick geometry
vsp.SetIntAnalysisInput(compgeom_name, 'ThinGeomSet', [vsp.SET_FIRST_USER + 0], 0) # Thin geometry - VLM

vsp.SetIntAnalysisInput(analysis_name, 'GeomSet', [vsp.SET_NONE], 0)
 # Thick geometry
vsp.SetIntAnalysisInput(analysis_name, 'ThinGeomSet', [vsp.SET_FIRST_USER + 0], 0) # Thin geometry - VLM

My main recommendation is to start with the GUI -- and to start simple.  Get something simple working, then start adding features and complexity a bit at a time.

Once you have something working in the GUI, then start over in the API.  Start simple, add complexity a little at a time.

Rob

Steven Zhu

unread,
Oct 9, 2025, 7:17:25 PMOct 9
to OpenVSP
I tried put prop and wing in an expilcit set and successfully set the Ct, Cp and RPM in GUI. In API, I put prop and wing in  vsp.SET_FIRST_USER + 0, set and used  
vsp.SetIntAnalysisInput(analysis_name, 'GeomSet', [vsp.SET_NONE], 0) # Thick geometry
vsp.SetIntAnalysisInput(analysis_name, 'ThinGeomSet', [vsp.SET_FIRST_USER + 0], 0) # Thin geometry - VLM
before executing the ComputeGeometry analysis, but after the analysis I was still unable to edit the Ct, Cp and RPM. I tried edit Ct, Cp and RPM before compute geometry, but the edited value were not written to vsp3 file. I have copied my code here. 

import openvsp as vsp
import os

def runaero():
    vsp.DeleteAllResults()
    compgeom_name = "VSPAEROComputeGeometry"
    # Set defaults
    vsp.SetAnalysisInputDefaults( compgeom_name )
    vsp.SetIntAnalysisInput(compgeom_name, 'GeomSet', [vsp.SET_NONE], 0) # Thick geometry
    vsp.SetIntAnalysisInput(compgeom_name, 'ThinGeomSet', [vsp.SET_FIRST_USER + 0], 0) # Thin geometry - VLM

    disk_id = vsp.FindActuatorDisk(0)
    parm_ct  = vsp.FindParm(disk_id, "RotorCT",  "Rotor")
    print("Before ExecAnalysis: disk", "CT=", vsp.GetParmVal(parm_ct))

    print( "\tExecuting..." )
    compgeom_resid = vsp.ExecAnalysis( compgeom_name)
    print( "COMPLETE" )
    # Get & Display Results
    vsp.PrintResults( compgeom_resid )
   
    disk_id = vsp.FindActuatorDisk(0)
    vsp.SetParmValUpdate( vsp.FindParm(disk_id, "RotorRPM", "Rotor"), 1000 )  
    vsp.SetParmValUpdate( vsp.FindParm(disk_id, "RotorCT",  "Rotor"),  0.1)
    vsp.SetParmValUpdate( vsp.FindParm(disk_id, "RotorCP",  "Rotor"),  0.1)

script_dir = os.path.dirname(os.path.abspath(__file__))
output_dir = os.path.join(script_dir, "outputs")
os.makedirs(output_dir, exist_ok=True)
os.chdir(output_dir)

vsp.ClearVSPModel()
#Add prop
prop_id = vsp.AddGeom( "PROP", "" )
vsp.SetParmVal( prop_id, "PropMode", "Design", vsp.PROP_DISK )
vsp.SetSetFlag(prop_id, vsp.SET_FIRST_USER + 0, True)
vsp.Update()
#Add wing
wid = vsp.AddGeom( "WING", "" ) # if don't add a wing, no error
vsp.SetSetFlag(wid, vsp.SET_FIRST_USER + 0, True)
vsp.Update()
runaero()

Thank you for your time.

Steven

Steven Zhu

unread,
Oct 12, 2025, 9:03:22 AMOct 12
to OpenVSP
I did some more tests with API, I think maybe the geometry generation process flushed all disk settings. Here is the procedure I tried: 

Created a prop and set it as disk
put it in vsp.SET_FIRST_USER + 0 by  vsp.SetSetFlag(prop_id, vsp.SET_FIRST_USER + 0, True) and Update
Set compute geometry to have  vsp.SET_FIRST_USER + 0 as thin set as None as thick set by: 
vsp.SetIntAnalysisInput(compgeom_name, 'GeomSet', [vsp.SET_NONE], 0) # Thick geometry
vsp.SetIntAnalysisInput(compgeom_name, 'ThinGeomSet', [vsp.SET_FIRST_USER + 1], 0) # Thin geometry - VLM

Run compute geometry. 
Attempt to adjust Ct, CP, RPM, but GetNumActuatorDisks() returns 0. 

Is it the right procedure to set disk parameters? Any suggestion will be appreciated!

Best
Steven

Drew Mason

unread,
Nov 29, 2025, 9:58:08 AM (15 hours ago) Nov 29
to OpenVSP
Hi Steven. I know this thread is a little old, but did you find a solution? I'm running into this issue now. I can build a simple wine and prop with the Python API, but when I got to set CT or CP, I can't find any of the props. GenNumActuatorDisks returns 0. I can load the vsp3 file and confirm the disks were made. 

Thanks,
Drew

Reply all
Reply to author
Forward
0 new messages