ModelType of a model using Python API

Skip to first unread message

Alexandre Rubenstrunk

Mar 19, 2024, 4:37:49 PMMar 19
to OpenVSP

Hello everyone,

I'm attempting to utilize the VLM method of OpenVSP with the API. To do this, I'm using VSPAero and specifying the method I want to use like this:

analysis_method = [vsp.VORTEX_LATTICE]

vsp.SetIntAnalysisInput( analysis_name, "AnalysisMethod", analysis_method, 0 )

However, when I execute VSPAero, I notice in the Python terminal the following line: Modeltype:PANEL.

From what I've observed, this indicates that even though I specified the method I want to use, it reverts back to the Panel Method. Does anyone have an idea on how to change this parameter?

Best regards,


Peter Hauschild

Apr 10, 2024, 11:45:47 AMApr 10
to OpenVSP
I have some to try, but i do not know any of theses are the right answer.
Firstly, i might think that, the API does not find the DegenGeom, or it finds a CompGeom, which is compatible with the Panel method solver not the VLM.
Maybe skip the line of code, as i think vsp.SetAnalysisInputDefaults(analysis_name) sets the solver to VLM automatically.
Lastly, it might just be a bug. If you only see a DegenGeom file, and there are no other files in the folder it has to be VLM.

Alexandre Rubenstrunk

Apr 10, 2024, 12:13:11 PMApr 10
to OpenVSP
I actually find the solution, if someone need the code it this one: 
    # Make sur that the model use is VLM
    analysis_name = "VSPAEROComputeGeometry"
    analysis_method = list(vsp.GetIntAnalysisInput(analysis_name, "AnalysisMethod" ))
    analysis_method[0] = vsp.VORTEX_LATTICE
    vsp.SetIntAnalysisInput(analysis_name, "AnalysisMethod", analysis_method)
    res_id = vsp.ExecAnalysis( analysis_name )
It is may be not perfect but it work how it needed to be
Reply all
Reply to author
0 new messages