VSP Aero python API integration - errors

256 views
Skip to first unread message

Hemant Sriram

unread,
Oct 6, 2021, 1:55:21 AM10/6/21
to OpenVSP
Hi,

I am trying to use OpenVSP for some Aerodynamic estimates and I have found some code on git that integrates the OpenVSP with Python through the API. I have installed the recommended version of Python and OpenVSP as given on the website ( which is   OpenVSP 3.21.2 Win64 requires Python 3.6-x64) and the installation does work. I do have some issues with the tutorial file which I will get to later.

Currently I am trying to use the following files to compute the aerodynamic coefficients over a simple wing planform geometry. I have attached the code and the geometry file. What I am trying to find is the different types of analysis methods that can be passed through to the ExecAnalysis() function which then runs that analysis on OpenVSP. The code initially called VSPAeroSweep as the analysis method, but I found that my system hangs and doesn't go beyond line

> "rid = vsp.ExecAnalysis(analysis_name)"

I even put some time function to find out the time elapsed between the runs but the system never completed the analysis. It would be really helpful if you could help me with understanding this code. Please let me know what I can do to improve the code. I was facing some errors which I was able to resolve based on finding the geometry types and getting the wing ids.

Hope to hear from you soon.
-Hemant
wing.vsp3
vspaero.py

Rob McDonald

unread,
Oct 6, 2021, 11:13:21 AM10/6/21
to ope...@googlegroups.com
You might want to start by looking at the 'TestAnalysis.vspscript' example script that comes with OpenVSP.  It includes code that uses the API to print out all analyses available via ExecAnalysis().  It can also list all the inputs for those analyses.

If you are specifically looking at VSPAERO, you may also want to check out TestAnalysisVSPAERO.vspscript in the same directory.

Although these are in Angelscript, you will find that the commands map pretty much 1:1 to the Python API (at least they should).

In terms of your case crashing or hanging -- have you tried running an otherwise identical case through the GUI?

Rob


--
You received this message because you are subscribed to the Google Groups "OpenVSP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openvsp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openvsp/0c5e134b-9968-4725-8f8b-1d6c1c24420fn%40googlegroups.com.

Hemant Sriram

unread,
Apr 11, 2022, 9:30:48 AM4/11/22
to OpenVSP
Hi Rob,

Thank you for getting back to me on my previous query. After months of not looking into the integration, I decided to take another gander at OpenVSP integration with Python. I had a look at the Scripts folder within OpenVSP, I believe they are all in Angel script and are .vspscript files. Could you maybe help me understand how can I run and test these files?

I want to understand if the problem is an underlying problem with the python and OpenVSP version that I have installed. I am using the recommended version of python and OpenVSP as suggested on the website. Hope you can help out with this query.

Is the issue resolved in the newer versions of OpenVSP? To build OpenVSP with the latest versions of Python, what steps do I need to follow?

Best Regards
Hemant

Reply all
Reply to author
Forward
0 new messages