Python API | Panel method | Could not load Degen Geometry, CART3D Tri, or VSPGEOM Tri file

353 views
Skip to first unread message

Jeyadave Nuntha Kumar

unread,
Jul 13, 2024, 5:20:43 PM7/13/24
to OpenVSP
Hi all,

I ran into an issue which others have previously and am seeking a solution. See:

I'm attempting to run the Panel method analysis in VSPAero with Python (code attached). My script reads in a .vsp3 file which contains the native geometry I want to analyze. Then, it sets up all the analysis inputs before executing the analysis. 

My script and the .vsp3 file is located in this work directory: 
C:\Users\cuppy\OneDrive\Documents\UMD\Summer 2024\Rotorcraft CFD\Code 

OpenVSP is installed in this directory:
C:\Program Files (x86)\OpenVSP-3.39.1-win64-Python3.11\OpenVSP-3.39.1-win64

Upon running the code, I get this error:
Could not load c:\Users\cuppy\OneDrive\Documents\UMD\Summer 2024\Rotorcraft CFD\Code\ROBIN_v1298_VSPGeom VSP Degen Geometry, CART3D Tri, or VSPGEOM Tri file...

However,  when I check the folder that it's supposedly trying to load the files from, I see the degen geom and vspgeom files with the names it's looking for.

OpenVSP also tried to look for the .history, .polar, .lod, and .adb files but of course it could not find them since there is no solution.

Also when I open the .vsp3 file, I don't see that my analysis inputs have changed. This is after VSPAero printed to the terminal the changed analysis inputs while executing the analysis.

Thanks,
Jeyadave
DebugExecWorkflow.py

Jeyadave Nuntha Kumar

unread,
Jul 17, 2024, 12:05:15 AM7/17/24
to OpenVSP
I found a solution. I just needed to run the CompGeom analysis before running the VSPAERO analysis. Then everything runs smoothly. 

C.P.

unread,
Nov 12, 2024, 4:44:37 AM11/12/24
to OpenVSP
@Jeyadave

I have a similar problem, can you please share your code that its working?

Many thanks,
Chris

Jeyadave Nuntha Kumar

unread,
Nov 12, 2024, 5:33:03 AM11/12/24
to OpenVSP
Hello Chris,

It's hard to communicate the essence of what I did by sharing the code, and also I cannot provide a good snippet of it.

I will explain what I did, however. I assume you are using the Panel solver. When interacting with the GUI, running the solver automatically runs CompGeom before running VSPAero. But in the API simply calling VSPAero to run does not do this. You should ensure that you call CompGeom separately, and specify the panel method in its parameters BEFORE calling VSPAero to run. Then the those file that would otherwise be missing will now appear and be located by VSPAero. Further, if CompGeom has already been executed once, ensure that you do not execute CompGeom again without making sure you specify what parts are going into that call. In my case, I have a single STACK geometry, so calling CompGeom with basically the default parameters successfully meshed the STACK geometry. I found that if I called CompGeom again, it tries to mesh the MeshGeom in addition, which becomes a disaster. In my code, I created a marker that keeps a record of whether CompGeom was run for my particular VSP3 file, so that every time I reopen the VSP3 file and try to run VSPAero, I'm making sure to check if CompGeom had already been run once, and avoid running it again if that is true.

Hope this helped.

Sincerely,
Jeyadave

C.P.

unread,
Nov 12, 2024, 5:48:04 AM11/12/24
to OpenVSP
Hello Jeyadave,

that really helps. Two more questions to clarify this even more.

1. Do you calculate Degen Geom also separately?
2. Is it possible to share the way you are performing the CompGeom from the API? Since there are a lot of variables there also.

Many thanks either way. 

Jeyadave Nuntha Kumar

unread,
Nov 12, 2024, 6:03:53 AM11/12/24
to OpenVSP
Hi Chris,

1. Running CompGeom creates the DegenGeom files and basically everything that should be required by VSPAero. 
2. Sure. I'm using the .tri format (aka AlternateInputFormat) because I wanted VSPAero to search for an appropriate location to place the wakes, so that's why the 3rd line is there. If you don't need that, simply remove that line.

        compGeom_analysis = "VSPAEROComputeGeometry"
        vsp.SetIntAnalysisInput(compGeom_analysis, "AnalysisMethod", aero_method)
        vsp.SetIntAnalysisInput(compGeom_analysis, "AlternateInputFormatFlag", [alternate_input_format_flag], 0)
        vsp.PrintAnalysisInputs(compGeom_analysis)
        #input("Next...")
        compGeom_results = vsp.ExecAnalysis(compGeom_analysis)

Here, aero_method = [vsp.PANEL] and alternate_input_format_flag = 1

Best,
Jeyadave
Reply all
Reply to author
Forward
0 new messages