Hi, all,
I’m running a python API (OpenVSP v3.51.3 on MacOS) for the model which include a wing, a fuselage and actuator disks.
But I can’t calculate successfully, because the parameters of the actuator disks can’t be set.
The wing and fuselage are set in set_0, the actuator disks set in set_1.
And I try to compute with wing and fuselage as Thick and actuator disks as Thin.
As a result of run, Actuator disk ID was found, however parm IDs such as RotorRPM were not found.
The error messages are as follows.
Disk #0 found as JEKPTGFGFA
Error Code: 4, Desc: FindParm::Can't Find Parm RotorRPM Rotor
Error Code: 4, Desc: SetParmVal::Can't Find Parm
Error Code: 4, Desc: FindParm::Can't Find Parm RotorCP Rotor
Error Code: 4, Desc: SetParmVal::Can't Find Parm
Error Code: 4, Desc: FindParm::Can't Find Parm RotorCT Rotor
Error Code: 4, Desc: SetParmVal::Can't Find Parm
The part of my code is as follows.
analysis_name = 'VSPAEROSweep'
vsp.SetAnalysisInputDefaults(analysis_name)
wid = vsp.FindGeomsWithName('WingGeom')
vsp.SetIntAnalysisInput(analysis_name, 'RefFlag', (ref_flag := [1]), 0)
vsp.SetStringAnalysisInput(analysis_name, 'WingID', wid, 0)
vsp.SetIntAnalysisInput(compgeom_name, 'GeomSet', [vsp.SET_FIRST_USER + 0], 0)
vsp.SetIntAnalysisInput(compgeom_name, 'ThinGeomSet', [vsp.SET_FIRST_USER + 1], 0)
…
for rotor in range(ndisk):
id = vsp.FindActuatorDisk(rotor)
rev = rt_perf_tbl[aoa][rotor]['rev']
ct = rt_perf_tbl[aoa][rotor]['ct']
cp = rt_perf_tbl[aoa][rotor]['cp']
print(f'\nDisk #{rotor} found as {id:s} ') #rev={rev:5g} Cp={cp:.6g} Ct={ct:.6g}')
vsp.SetParmVal(vsp.FindParm(id, 'RotorRPM', 'Rotor'), float(rev))
vsp.SetParmVal(vsp.FindParm(id, 'RotorCP', 'Rotor'), cp)
vsp.SetParmVal(vsp.FindParm(id, 'RotorCT', 'Rotor'), ct)
I don’t know where I’m making a mistake in my code.
Please give me some advice.
Thanks.
Thank you for your reply.
I tried to improve my script by referring VSPAERO_ActuatorDisk_CSGroup.vspscript.
But I can’t solve my problem.
Is there a problem with the vsp3 file?
I would greatly appreciate it if you could check my files.
Thanks,
Thank you for your suggestion.
The model test01.vsp3 is a file for testing my script.
It is different from the model that will actually be calculated.
I will improve my model by referring your suggestion.
My problem is setting of thin set, thick set and actuator disk parameters.
I can’t set the actuator disk parameters from the script at the moment.
I will continue to tackle the problem.
Please let me know if you find anything out about my script.
Thanks,