Creating mesh CFD mesh from points imported as wireframe

282 views
Skip to first unread message

Avijeet Acharya

unread,
Aug 16, 2021, 12:18:02 AM8/16/21
to OpenVSP
Hi everyone,

I'm a new OpenVSP user. I am trying to use it for an application where I'll import the different components of the aircraft as wireframes. I'll have the components as n number of closed curves/sections with m points in each curve.
I'm able to import the components in Plot3d format, export them as tri. Open those tri back again and create intersecting mesh through compgeom. But I'm unable to go beyond that. I'm unable to create a CFD mesh through the CFD mesh option.
What I wish to do seems like a pretty standard use of OpenVSP, so if there's any tutorial/guide for the same, it'd be very very helpful if someone can point me towards it. Or if not, could you suggest the basic steps to do the same.

Thanks
Avijeet

Rob McDonald

unread,
Aug 16, 2021, 12:28:34 AM8/16/21
to ope...@googlegroups.com
OpenVSP can only run the 'CFDMesh' operation on a geometry it represents via smooth Bezier curves.  These can not be imported, but must be represented by the native OpenVSP components.

In order to go from a point cloud, Plot3D file, or *.tri file to this, you will need to use built-in components to represent your model.

You can start by placing and adjusting these objects manually.  Once you have a rough start, then you can look at using the "Fit Model" capability to do a least-squares fit of the shape to your points.  There are some papers and videos online to help with Fit Model.

OpenVSP's CFDMesh capability is only able to generate isotropic unstructured surface meshes.  You will then need to use another tool to generate a volume mesh.  Depending on your starting point (did this all come from CAD?) and your ending point (What CFD solver and meshing tool do you plan on using), there may be other paths that are better to take.

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/979947ef-9d82-4bf2-b685-eb674e85bb5fn%40googlegroups.com.

Avijeet Acharya

unread,
Aug 17, 2021, 12:12:13 AM8/17/21
to OpenVSP
Thank you for replying.
The geometry will not come from CAD, rather from a MDO subroutine which will generate a parameterized wing/fuselage geometry and output it as curves and points. I'm trying to import the same in OpenVSP in Plot3D format.
I can also import each individual curve as a separate airfoil (with required offsets and scale), if OpenVSP will allow me to build a wing that way.
The idea is to run it without a man in the loop. That's why adjusting OpenVSP's library objects to fit my shapes might not work.
Nevertheless, per your suggestions I'll check out the papers and videos on Fit Model.
Unstructured surface mesh will suffice for me, as I can then generate the tetra mesh from ICEM using scripts. I'll most likely use the Euler solver on SU2 as my CFD solver.

Regards
Avijeet

Rob McDonald

unread,
Aug 17, 2021, 1:14:39 AM8/17/21
to ope...@googlegroups.com
You won't want to run FitModel in an MDO setting -- it is good for one-off conversions, not for an automated process.

Why not use OpenVSP to create the geometry natively?  What are you doing in your MDO geometry generator that can't be done in OpenVSP?

Why not go directly from your MDO representation to ICEM?

I suspect it will be easier to modify OpenVSP's geometry generation to do what you need than it will be to achieve a satisfactory import of an external geometry.

To be blunt -- OpenVSP is a much better parametric modeler than it is a mesh generator.  Avoiding and fighting its modeling capability in order to make use of the mesher is flattering -- but probably not a good idea.

Rob


Avijeet Acharya

unread,
Aug 17, 2021, 4:25:35 AM8/17/21
to OpenVSP
I understand what you are saying. One of the main reason I don't wish to go directly to ICEM is intersecting components. I saw that OpenVSP is able to generate a single water-tight triangulation, which will really serve my needs very well.
Also my MDO geometry generator doesn't really work with standard airfoils as such, the wings are generated in a fashion somewhat analogous to the CST option in OpenVSP.
I understand what you mean by OpenVSP being much better in parametric geometry generation, I'll try to work out how I can best use that.
Thanks for your inputs.

Avijeet

Rob McDonald

unread,
Aug 17, 2021, 11:54:41 AM8/17/21
to ope...@googlegroups.com
Can you detail how you are attempting to generate your wing?

This may seem overly difficult, but I actually think a good approach may be for you to modify OpenVSP (serious C++ development) to have a new built-in component that does exactly what you want it to.  In that way, you get your custom parameterization, but you also generate a native OpenVSP geometry...

If you can provide more information about how you are generating your geometry, I can provide some clues about how to approach this and how feasible it is.

Rob


Avijeet Acharya

unread,
Aug 18, 2021, 8:54:15 AM8/18/21
to OpenVSP
So the way the wing is generated, basically there are parameters that control the thickness, camber, LE radius, twist etc. for the airfoils at different sections, somewhat like CST. But then, the airfoils are further modified in order to fit internal volume requirements, in three dimensions. Something similar happens for the fuselage as well, albeit with much more circular cross sections.

After your last message, I began looking at what way I could use the existing abilities of OpenVSP. So I took each constant y cross-section available to me, normalized it to represent an airfoil. Then using the "create wing geometry" option of OpenVSP, I read those airfoils at different sections to build a multi-section wing. Of course I had to do a little bit of coding, to extract the equivalent sweep, dihedral, span, etc., but it was nothing difficult. Then using the scripting option, I was able to generate the wing automatically through a .vspscript file.
I've been able to get a very good match for my Wing and Horizontal Tail. I plan to do the same for fuselage and Vertical tail, though that will involve rotating the geometry once it is generated in OpenVSP.

Avijeet

Rob McDonald

unread,
Aug 18, 2021, 12:38:47 PM8/18/21
to ope...@googlegroups.com
That sounds like great progress.

When you go to work on the fuselage -- use the Stack component, not the Fuselage one.  Trust me.

Rob


Avijeet Acharya

unread,
Aug 19, 2021, 11:05:50 AM8/19/21
to OpenVSP
Thanks for the suggestion, I had already modeled the fuselage too using the Wing component itself. But I'll try to do the same with stack component in future as well.

I actually am stuck in an another problem. The surfaces generated with my approach work out quite well, when I'm generating individual CFD meshes.
They can also be used to generate intersecting wireframes from the CompGeom module, though that is not of particular interest to me.
I am trying to generate a CFD mesh for the entire aircraft (Fuselage, Wing, Horizontal tail, etc.) together, so that it intersects the surfaces and generates an airtight mesh. Problem is the CFD mesh crashes every time before finishing the intersection stage. I'm running OpenVSP on a 16 core, 32 GB RAM workstation. Is it due to lack of resources for it to be able to do the required tasks?
Similar thing happens with the Vertical Tail geometry, the generation of trias start but OpenVSP crashes abruptly. This cannot be simply due to resource shortages, as OpenVSP is able to generate the CFD mesh for much heavier fuselage geometry.
I can share the geometries (.vsp) if required, am anyways using a generic transport aircraft model to get a hang of OpenVSP.

Regards
Avijeet

Rob McDonald

unread,
Aug 19, 2021, 11:26:28 AM8/19/21
to ope...@googlegroups.com
This is not due to lack of resources.

Please share the geometry so someone can possibly check it out.

Are you using point defined airfoils or one of the built-in airfoil types, or something else?

Rob


Avijeet Acharya

unread,
Aug 20, 2021, 1:50:22 AM8/20/21
to OpenVSP
I'm using point defined airfoils. As I already mentioned this doesn't cause any issues as long as I generate the CFD mesh individually for each component. The problem occurs when I try to generate the CFD mesh for the whole geometry together.
Also, for the vertical tail, for someone reason the mesher always starts and suddenly crashes.
I'm attaching all the relevant geometries is .vsp3 format. Dimensions are in mm.
Thanks
Avijeet
Fus2.vsp3
HT2.vsp3
Wing.vsp3
VT.vsp3
Aircraft.vsp3

Rob McDonald

unread,
Aug 20, 2021, 1:01:58 PM8/20/21
to ope...@googlegroups.com
Your vertical tail airfoils (and perhaps others) are defined totally wrong.  You need to look closely at working examples of whichever file format you've selected and make sure you match it.  As is, the topological 'leading' edge is the upper surface middle of the foil - and the 'trailing' edge is the lower surface middle of the foil.

Please do not use a Wing component to describe your fuselage.

In addition, you are over-specifying the geometry.  Your cylindrical section of the fuselage should be described with two XSecs - one at the start, another at the end.  You have dozens.

All of your wing surfaces are similarly over-defined.

I know you are trying to mash your geometry generator and OpenVSP together in order to use our mesher.  However, the performance of our mesher simply does not scale to a case where someone is abusing OpenVSP the way you are.

As you notice, the problem is when you have multiple components in the model -- the problem is with the intersection algorithm.  Your geometry is unnecessarily complex.

Your current approach is not going to work.  If you want to use the OpenVSP mesher, you are going to need to embrace OpenVSP's means of modeling.

Rob


Avijeet Acharya

unread,
Aug 23, 2021, 8:07:21 AM8/23/21
to ope...@googlegroups.com
First of all, thanks for pointing out the problems with my vertical tail airfoils. I used a bad file, it's now sorted and the tail geometry works with the corrected files.

Secondly, the reason I was overspecifying the geometry is I'm expecting significant spanwise variation in my actual wing and similar longitudinal variation in the fuselage. Having said that, the number of sections I'd taken is still way too high and I've now corrected that.
I plan to move to stack geometry to define the fuselage.

But now that other things are sorted out, I'm left with one small problem.
I've used a horizontal tail with only 4 sections and a test fuselage defined manually within Openvsp. When I go for the "CFD mesh", everything works, intersection, mesh generation, and a final mesh is also exported. But this final mesh is missing the lower surface of the HT, hene it's not a water tight mesh. I've tried experimenting with the VT instead of HT. My older fuselage instead of this simplified one. But everytime I get the same error. Only the upper surface of the 'wing' geometry is meshed, the lower surface is discarded. I'm attaching one of the files. Please let me know where I'm going wrong.

Avijeet

You received this message because you are subscribed to a topic in the Google Groups "OpenVSP" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/openvsp/D42Jz-1WoLA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to openvsp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openvsp/CAEppYpFEF_d52KBV9tTzX1WomMdNNm0avKN15aqvrRa7yq4OsQ%40mail.gmail.com.
Test.vsp3

jvgr...@gmail.com

unread,
Aug 23, 2021, 11:43:20 AM8/23/21
to OpenVSP
It looks like there is still something wrong with your model. If you look at the last section of your vertical tail the surface self-intersects. I'm guessing there is something wrong with your airfoil files since everything looks fine if I switch to a built-in airfoil type life a Four Series. 

There isn't a horizontal tail in the file you linked above so I'm not sure what the problem is with that component but I'm guessing it's also something to do with the formatting of the airfoil files being used. 

-Justin 

Avijeet Acharya

unread,
Aug 24, 2021, 8:08:43 AM8/24/21
to ope...@googlegroups.com
Thanks Justin, I regenerated all the airfoils, so as to avoid the self intersection problem.
Now both the top and bottom surfaces of the "wing" components are generated properly during the mesh after intersection. However, I'm yet to get a perfect water-tight mesh. I'm still getting the "NOT Water Tight : XX Border Edges, 0 Edges > 2 Tris" flag everytime.
I've tried playing with the various mesh parameters. Only parameter that seems to affect it is the "Max Gap", but it only decreases the number of border edges to a certain extent, beyond which increasing the parameter doesn't have any beneficial effect.
Please suggest how I can go towards generating a fully watertight mesh.

Avijeet

Test.vsp3

Rob McDonald

unread,
Aug 24, 2021, 11:58:40 AM8/24/21
to ope...@googlegroups.com
Usually this kind of problem is due to the surface intersection problem - not the mesh generation part.  This means that adjusting the mesh parameters is unlikely to help fix it -- you need to adjust the geometry.

Once a mesh fails, there is an option to visualize the bad triangles - you can turn them red and turn off other (good) triangles.  This will let you find the part of the geometry that is giving trouble.  You can turn on visualization of the intersection curves which might be useful -- you probably want to look at the raw points, not the adapted ones.

Justin had success when he changed your airfoils to built-in ones, so I would still expect problems to start there.  Are your airfoil trailing edges sharp in the file?  If there is a blunt trailing edge, you should leave it slightly open.  The bottom TE point and top TE point should leave a slight gap that OpenVSP will notice and fill.  If you repeat the first/last point, OpenVSP will try to spline smoothly across the tiny corner at the trailing edge - this can cause problems for the mesher.

Rob


jvgr...@gmail.com

unread,
Aug 24, 2021, 1:10:20 PM8/24/21
to OpenVSP
Like Rob said, this is likely an intersection issue since I'm also unable to export a trimmed surface successfully to STEP or IGES. I recommend trying to isolate the problem to just the wing - fuselage mesh and then the tail - fuselage mesh. Try making slight adjustments to the X, Y, and Z location of the wings relative to the fuselage. Often times these types of changes can allow OpenVSP to find a better solution for the intersection curves.

I did try changing your airfoils to 4-Series again but that didn't appear to help. It's still worth looking into if there are issues with your airfoil file definitions but I'm not sure if this is what is causing the problems. Zooming in on the raw vs binary adapted intersection curves is a useful feature. I'd specifically target where the curves meet the leading or trailing edge to see if there are any gaps, jagged lines, or other inconsistencies. 

Another thing to try is adjusting the scale of your model. We try to use relative units where possible but the default scaling in OpenVSP is tested the most. Since your model is in a larger scale than default, you can try reducing it to a larger unit size (i.e. inches to feet) to see if that helps. 

-Justin 

Avijeet Acharya

unread,
Aug 26, 2021, 12:43:24 AM8/26/21
to ope...@googlegroups.com
Thanks Justin and Rob for your suggestions. About 1/3 rd of the issues were sorted by switching to a sharp trailing edge airfoil. The remaining 2/3 rd were solved by scaling the model, moving from mm to m. I'd have never thought of solving the issue in this fashion.

Regards
Avijeet


jvgr...@gmail.com

unread,
Aug 26, 2021, 11:10:32 PM8/26/21
to OpenVSP
Glad to hear that helped. Scaling is something that definitely shouldn't be an issue but we just haven't had a chance to weed it out. I'm guilty of mostly testing in the default scale which doesn't help the issue. 

What's the remaining 1/3 of your problem?

-Justin 

Avijeet Acharya

unread,
Aug 26, 2021, 11:37:03 PM8/26/21
to ope...@googlegroups.com
The remaining 1/3rd of the problem had to do with what Rob had suggested. My wing airfoils were having a slight thickness in the trailing edge which was not getting approximated properly by the geometry module I guess. This was leading to a gap in the mesh, not visible without zooming in a lot. The problem was solved by switching to a sharp trailing edge.

Avijeet

Reply all
Reply to author
Forward
0 new messages