Generating a Blended Wing Body (BWB) through the Python API

350 views
Skip to first unread message

George Efrem

unread,
Oct 4, 2023, 3:37:00 AM10/4/23
to OpenVSP
Hello everyone,

I am trying to generate a BWB through the Python API!
With the attached code, I have managed to construct the wing geometry which is split into 4 sections (5 airfoils). The issue I am facing is when I try to blend the wing sections, in a similar manner presented in this video.

Xsec_0:
I want to set the Leading Edge --> Outboard --> Match to "ANGLES" and then reference the following parm values listed below. I Want to do the same thing with the Trailing Edge --> Outboard --> Match setting.
Screenshot 2023-10-03 181312.png

XSec_1:
Regarding the second section, I want to use the settings listed in the picture below. And so on with the rest of the wing sections.
Screenshot 2023-10-03 182022.png

As you can also see from the provided code I tried to change the parm value with the vsp.SetParmValUpdate() to the values stated in the boxes above but this does not seem to work because the mode that is defined by Match is not switched to "ANGLES".
How can I change this match Parm value?

The final result I am trying to achieve is depicted below:
Screenshot 2023-10-04 102444.png

George Efrem

unread,
Oct 4, 2023, 3:40:23 AM10/4/23
to OpenVSP
...forgot to attach the code file.
openVSP_wing_V0.py

George Efrem

unread,
Oct 4, 2023, 5:29:17 AM10/4/23
to OpenVSP
I have managed to find the issue I was facing above, but now I noticed that the airfoil is not rotating with the dihedral angle and thus the winglets have almost zero thickness.
Can you help me enable the rotate section tip foil to match Dihedral setting through the Python API?
Screenshot 2023-10-04 122706.png

George Efrem

unread,
Oct 4, 2023, 7:50:43 AM10/4/23
to OpenVSP
...nvm found it

vsp.SetParmValUpdate(wing_id, "RotateAirfoilMatchDideralFlag", "WingGeom", 1.0)

Carlos Rodriguez

unread,
Oct 22, 2024, 3:36:34 AM10/22/24
to OpenVSP
Hello,

I know I come 1 year lete but in case it helps someone.

I had a similar issue, and found out that the variable I needed to set specific section of the wing to rotate to match dihedral is using the parameter "RotateMatchDideralFlag" . Not sure about the behaviour of "RotateAirfoilMatchDideralFlag",
vsp.SetParmValUpdate(wing_id, "RotateMatchDideralFlag", "XSec_xx", 1.0)

Cheers!



Reply all
Reply to author
Forward
0 new messages