Python API analysis automation of .vsp3 models

285 views
Skip to first unread message

Luis Alves

unread,
Dec 16, 2023, 12:58:27 PM12/16/23
to OpenVSP
Dear OpenVSP crew.

   I'm trying to build an iterative script that does analysis of a model and make slight modifycations to it. But right now I'm facing an issue that, when trying to run the geometry computation, vspaero complains abount not finding the .adb file, being referenced in other question on the form as the "Could not load AsaMista_DegenGeom VSP Degen Geometry, CART3D Tri, or VSPGEOM Tri file..." error.
    Seems to be an initialization issue, since once I bring files made with manual analysis, the script works just fine. I may be missing an initialization API call.
    My importing lines are:
...
vsp.ReadVSPFile("AsaMista.vsp3")  # Opening a more featured wing file
vsp.Update()

comp_geom = "VSPAEROComputeGeometry"
vsp.SetAnalysisInputDefaults(comp_geom)
vsp.SetIntAnalysisInput(comp_geom, "AnalysisMethod", (1, vsp.VORTEX_LATTICE))

# Executing Analysis
comp_geom_results = vsp.ExecAnalysis(comp_geom)
....
Then a VSPAERO analysis...

   Once again, if there are files from other manual analyses inside the script folder, everything seems to work well. Thanks in advance! 

Kevin Mammar

unread,
Dec 16, 2023, 4:05:14 PM12/16/23
to OpenVSP
I've also had this problem. Creating and deleting a new geometry after the file read made it work for me

Tim Swait

unread,
Dec 22, 2023, 7:11:11 AM12/22/23
to OpenVSP
I was also having problems with the analysis files not being created and read from the correct directory when using the Python API (although it only seemed to be an issue when using Panel mode, and I mostly use VLM, so didn't cause too much problem). This could be related: https://groups.google.com/g/openvsp/c/lcI8GT9KgWA

Islam M. Zaid

unread,
May 3, 2024, 6:45:21 PM5/3/24
to OpenVSP
So, what is the right answer here? 
How can we do the analysis parametrically? 

Thanks

Reply all
Reply to author
Forward
0 new messages