Changing Airfoil shape parameters

85 views
Skip to first unread message

Vivian Kaspar

unread,
Mar 23, 2025, 12:13:18 PMMar 23
to OpenVSP

Hi OpenVSP Team,


I’m working on a parametric model variation pipeline using Python and the OpenVSP API. Everything works great so far -- most parameters like Span, Twist, and Dihedral are being modified correctly. However, I’m facing an issue where airfoil shape parameters like ThickChord, Camber, and CamberLoc are not visually updating, even though, the code sets their values using vsp.SetParmVal(). And I’m setting the cross-section type explicitly to vsp.FOUR_SERIES to ensure it’s editable. Despite all this, the wing shape stays the same--. I suspect that while parameters are technically changing, the section type might not be truly switching or updating the geometry.

Is there another step required to properly “activate” the new airfoil shape? And/Or Is setting the "Type" parameter sufficient to trigger a change to FOUR_SERIES?

Thank you guys in advance for any help.

Vivian 

Screenshot 2025-03-23 at 17.11.17.pngScreenshot 2025-03-23 at 17.11.59.png

Rob McDonald

unread,
Mar 23, 2025, 6:52:41 PMMar 23
to OpenVSP
The Parms of an airfoil or a cross section curve are buried in an extra layer.  To access these, you need to use some different API calls...


Do you have your script spitting out any errors it comes across?  Do you have the ability to see the output console from this program?

I expect that you should have seen some errors from VSP's error stack stating that the Parms could not be found.

Rob

deenri...@gmail.com

unread,
Sep 15, 2025, 5:36:03 AM (7 days ago) Sep 15
to OpenVSP
For anyone following, here is a quick example I wrote using the python API


xsec1 = vsp.GetXSec(xsecsurf,0)

wid = vsp.GetXSecParm(xsec1, 'ThickChord')
vsp.SetParmVal(wid, wing.thickness_to_chord)

wid = vsp.GetXSecParm(xsec1, 'Camber')
vsp.SetParmVal(wid, wing.geometry.camber_coordinates)

wid = vsp.GetXSecParm(xsec, 'CamberLoc')
vsp.SetParmVal(wid, wing.geometry.camber_location)

Omer Kandemir

unread,
Sep 15, 2025, 5:46:29 AM (7 days ago) Sep 15
to ope...@googlegroups.com
Hi Vivian,

I think you need to call "vsp.Update()" after changing XSecShape as follows:
            airfoil_vsp_types = [vsp.XS_SIX_SERIES]
            vsp.ChangeXSecShape(xsecsurf,i_segs,airfoil_vsp_types[0])
            vsp.ChangeXSecShape(xsecsurf,i_segs+1,airfoil_vsp_types[0])
            vsp.Update()
Best regards,
Ömer

--
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 visit https://groups.google.com/d/msgid/openvsp/68b22f6a-0929-4edf-bd90-7aad3b22a729n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages