Scripting creation of fuselage geometry with super ellipse cross sections

172 views
Skip to first unread message

Jeyadave Nuntha Kumar

unread,
Jul 5, 2024, 10:44:53 PMJul 5
to OpenVSP
Hi all,

I'm working on a research project which involves a CFD analysis of generic helicopter fuselages. I'm working on a Python script which will automate native fuselage geometry creation. The generic fuselage -- Robin fuselage -- is defined by super-ellipse equations for the cross-section of the fuselage all along the length.

It seems most natural to me to generate the fuselage by specifying the super ellipse XSecs along the length of the fuselage. Because the super ellipse shape varies all along the length, I'm thinking of creating around 100 XSecs with a clustering of XSecs toward the nose and tail to nicely capture the geometry. 

Could you point me to the functions I should take note of that will help me accomplish this? Any thoughts you have about how I should (or shouldn't) approach this are appreciated. 

Sincerely,
Jeyadave




Rob McDonald

unread,
Jul 6, 2024, 12:42:18 AMJul 6
to OpenVSP
DO NOT DO THIS.

OpenVSP's skinning will create a smoother varying surface than you can by specifying 100 XSecs.  Instead, you should aim to define a fuselage using 3-6 XSecs or so.

Rob

Jeyadave Nuntha Kumar

unread,
Jul 6, 2024, 1:51:50 AMJul 6
to OpenVSP
Rob,

Okay I understand. Thanks for your input. I'll try to work with fewer XSecs. Particularly, I plan to have a point XSec for the nose tip, followed by 4 SUPER_ELLIPSE XSecs, and then a point XSec for the tail end. So that's 6 XSecs. However, I do not understand how to translate my mathematical description of the geometry to the skinning.

I want to specify exactly how I'm generating the geometry. The height, width, and power N of the super ellipses are functions of the X location along the fuselage. So is the Z coordinate of the super ellipse center, which gives the fuselage a small camber. The equations used to calculate the values of these 4 geometric parameters are not trivial, and involve several coefficients that are specific to each section of the fuselage. Though I can approximately model the geometry from the features in the GUI, I plan on describing thousands of slightly different geometries using my equations. Thus, I find it critical that I build my geometry from the equations somehow.

So, is there a way I can input my equations somewhere in the OpenVSP geometry tools? In so doing, specify how those 4 geometric parameters change as a function of the X location along the fuselage?

Thanks

Rob McDonald

unread,
Jul 6, 2024, 4:03:01 PMJul 6
to OpenVSP
Do you need to do this once, or for many different shapes in an automated manner?

Was 4 intermediate XSecs arbitrary, or did you have a reason for that?  Can you post an image of the shape you're aiming for?  I usually start with one at the point of maximum thickness and then look for inflection points or other significant features.

I would recommend you take your mathematical description in Matlab of Python, or even Excel and generate a table of points - x,y,z.  These can be simply down the center line (y=0) from start to finish.  These can be written to a *.pts file that can be read into OpenVSP.

Then I would start fitting the Stack (I generally recommend using a Stack instead of Fuselage) to the points manually.  I would get things somewhat close and then I would look at using Fit Model to do the final adjustment.  Fit Model is a tool that performs a least squares fit of and OpenVSP geometry to a cloud of points.  This will also give you an idea of the amount of error in the approximation of your points.

Jeyadave Nuntha Kumar

unread,
Jul 6, 2024, 7:04:07 PMJul 6
to OpenVSP
Resending this message because it wasn't sent to the group.

The choice of 4 intermediate XSecs is not arbitrary. Here is how I'm calculating H, W, Z0 (camber), and N.
 image.png
The reason for 4 intermediates is because the fuselage is split into 5 sections. That is, the domain of the function x/R is split into 5 distinct intervals, where each section has different values for the coefficients C1 to C8.
In my first attempts at using VSPAero, I assumed that an imported STL geometry would be compatible with the Panel method analysis. I quickly realized that would not be the case. This is what my geometry would looks like:

image.png
You may be able to tell from the picture where the 5 intervals are. The canopy, constant-area body, ramp section, tail boom, and tail caps are those 5 sections. As you suggested, it wouldn't be hard to skin the XSecs to get this shape. But my project requires me to use super ellipse equations, and to generate many different models by varying the coefficients. I'm doing this because the geometries and their aerodynamics analyses will be used in a Design of Experiments study. 

Now that you mention the Stack method, I can see the similarities of that method to building the STL file. I built the STL by calculating the vertices on super ellipse cross sections from nose to tail. I can use the coordinates as inputs to Stack geometry. 

As I initially approached VSPAero with an STL file, I'm willing to accept the errors introduced by this method of generating the geometry. Thanks for notifying me of the Fit Model tool. The Stack method seems very promising and I'll try it out.

Thanks for your inputs! 

Jeyadave Nuntha Kumar

unread,
Jul 6, 2024, 7:08:24 PMJul 6
to OpenVSP
Here are the pictures.
eqn.png
fuselage.png

Rob McDonald

unread,
Jul 6, 2024, 7:23:13 PMJul 6
to ope...@googlegroups.com
Is this the Robin Fuselage?  Or is it just similar?

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/004b858b-95fe-4e6c-bff6-7da61c0ae455n%40googlegroups.com.
Message has been deleted
Message has been deleted
Message has been deleted

Jeyadave Nuntha Kumar

unread,
Jul 6, 2024, 11:20:06 PMJul 6
to OpenVSP
Google kept deleting my messages earlier. 

Anyway, it's the non-proprietary Robin-MOD7 fuselage.

On Saturday, July 6, 2024 at 7:04:07 PM UTC-4 Jeyadave Nuntha Kumar wrote:

Rob McDonald

unread,
Jul 7, 2024, 1:27:16 AMJul 7
to ope...@googlegroups.com
OK,  I thought I might have a Robin fuselage model laying around, but it is for the original Robin, not the MOD7.

Fuselage and Stack can be used interchangeably most of the time.  The only real difference is that Fuselage is parameterized in terms of overall length, with the XSecs placed at a fraction of the length -- whereas Stack XSecs are stacked one after another (dimensionally) and consequently the overall length is a fallout.

When matching an existing aircraft, it is often attractive to use the Fuselage -- you know the overall length after all.  However, the difference comes when you want to make changes to the design.  For example, you want to model a family of aircraft, the 737-700, 800, and 900.  With a stack, all you have to do is lengthen the middle body section and you get a stretched fuselage -- the nose and tail all stay the same.  However, with a Fuselage, when you change the overall length, the nose and tail get stretched out.  You then must go back in and re-scale them to what was intended.  I find that working with Stacks is usually less work in the long run.

You've done a good job identifying the main sections to model for the fuselage.

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.

Jeyadave Nuntha Kumar

unread,
Jul 7, 2024, 6:37:00 AMJul 7
to OpenVSP

Noted, I understand the tradeoffs.

I want to clarify one more thing. Previously you said the Stacks must be fitted to the points manually. Does that mean in an algorithmic manner which I can do using my script?

Jeyadave Nuntha Kumar

unread,
Jul 7, 2024, 8:54:31 PM (13 days ago) Jul 7
to OpenVSP
I looked into the Fit Model tool, and I understand what you mean now. I can do a manual fit, but is it not possible to use the Fit Model tool from the Python API?

Rob McDonald

unread,
Jul 8, 2024, 1:01:35 AM (13 days ago) Jul 8
to OpenVSP
It is not possible to use Fit Model from the API.

If you've already generated an STL of the Robin-MOD7, you can import that and convert it to a cloud of points for use with Fit Model.

Another trick that works well with FM -- when you import the STL, use the Planar Slice feature to extract a row of points down the centerline (or any other desired cross section).  That will help you extract a set of points where you want to focus your attention.

Rob

Jeyadave Nuntha Kumar

unread,
Jul 8, 2024, 3:45:47 PM (13 days ago) Jul 8
to OpenVSP
I understand. 

I'm also having difficulty finding a way to edit the "N" value for the super ellipses. The ParmID is "Super_N" but it is under the group XSecCurve instead of XSec, which I'm suspecting is why GetXSecParm didn't work. 

Rob McDonald

unread,
Jul 8, 2024, 4:34:04 PM (13 days ago) Jul 8
to OpenVSP
The ParmID is a random group of 11 upper case letters such as:  ZVNINNILPEZ.  This ID is unique and immutable.  When a Geom is created, it has a set of Parms.  Every Parm has a unique ParmID.

Super_N is a Parm's Name -- not its ID.  If you have multiple XSecs that are super-ellipse's, they will all share the same Name, but they will have different ParmID's.

GeomID's (and other ParmContainers) are similar 10 character random strings.



string xsec_surf = GetXSecSurf( geomid, 0 );
string xsecid = GetXSec( geomid, 0 );
string pid = GetXSecParm( xsecid, "Super_N" );
SetParmVal( pid, 1.5 );

Rob



Jeyadave Nuntha Kumar

unread,
Jul 8, 2024, 7:48:49 PM (12 days ago) Jul 8
to OpenVSP
Great to know! Thanks for all your help, it has really opened my eyes to what OpenVSP is capable of!

Jeyadave Nuntha Kumar

unread,
Jul 14, 2024, 12:25:35 AM (7 days ago) Jul 14
to OpenVSP
Unsure why Google is deleting my messages from the other email. 

Anyway, yes it's the non-proprietary Robin-MOD7 fuselage.

-Jeyadave

Jeyadave Nuntha Kumar

unread,
Jul 14, 2024, 12:25:40 AM (7 days ago) Jul 14
to OpenVSP
It's the Robin-MOD7 fuselage. NON-PROPRIETARY

Jeyadave Nuntha Kumar

unread,
Jul 14, 2024, 12:25:46 AM (7 days ago) Jul 14
to OpenVSP
It's the Robin-Mod7 fuselage

Jeyadave Nuntha Kumar

unread,
Jul 14, 2024, 12:26:00 AM (7 days ago) Jul 14
to ope...@googlegroups.com
The choice of 4 intermediate XSecs is not arbitrary. Here is how I'm calculating H, W, Z0 (camber), and N.
 image.png
The reason for 4 intermediates is because the fuselage is split into 5 sections. That is, the domain of the function x/R is split into 5 distinct intervals, where each section has different values for the coefficients C1 to C8.
In my first attempts at using VSPAero, I assumed that an imported STL geometry would be compatible with the Panel method analysis. I quickly realized that would not be the case. This is what my geometry would looks like:

image.png
You may be able to tell from the picture where the 5 intervals are. The canopy, constant-area body, ramp section, tail boom, and tail caps are those 5 sections. As you suggested, it wouldn't be hard to skin the XSecs to get this shape. But my project requires me to use super ellipse equations, and to generate many different models by varying the coefficients. I'm doing this because the geometries and their aerodynamics analyses will be used in a Design of Experiments study. 

Now that you mention the Stack method, I can see the similarities of that method to building the STL file. I built the STL by calculating the vertices on super ellipse cross sections from nose to tail. I can use the coordinates as inputs to Stack geometry. 

As I initially approached VSPAero with an STL file, I'm willing to accept the errors introduced by this method of generating the geometry. Thanks for notifying me of the Fit Model tool. The Stack method seems very promising and I'll try it out.

Thanks for your inputs! 


Jeyadave Nuntha Kumar

Aerospace Engineering Undergraduate | University of Maryland

uid: 116653312

mobile:  (408) 763 2417

email: jnun...@terpmail.umd.edu




--
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.
Reply all
Reply to author
Forward
0 new messages