p-chambers / occ_airconics

Aircraft Configuration through Integrated Cross-disciplinary Scripting, Python package built on PythonOCC
http://occ-airconics.readthedocs.io/en/latest/index.html
BSD 3-Clause "New" or "Revised" License
14 stars 9 forks source link

Split the Airfoil Curve according to Leading Edge Point #23

Open TsingQAQ opened 7 years ago

TsingQAQ commented 7 years ago

Hi Paul, This may be a feature request, Since some times it is really important to make use of the leading edge point, or control the upper and lower cuves individually, (e.g adjust the grid distribustion in CFD according to the upper and lower curves), two upper and lower curves may be a better choice of a whole curve. I've tried to implement this using pythonocc, though I'm greenhand of it and failed to use BRepBuilderAPI_MakeEdge to trim the airfoil curve for not finding the leading edge point on the geometry curve. Some times it can work by useing the gp_Pnt(0., 0., 0.) to cut the curve, but most cases this point is not on the curve and will return an error, even the datasets used to interpolate the airfoil curve contains a [0, 0, 0] coordinate.

p-chambers commented 7 years ago

This may be easier to implement in your meshing software, as the continuity in the loft is likely to not be as good if the curves are split. You'll probably want to use a multiblock mesh and split it at certain locations, but I think this something that needs to be done in the meshing software. I can't really provide support for that as I haven't tried it at all. I did briefly try to create a an inviscid panel method style wing mesh in gmsh using a 'Bump' progression to make it finer at the LE, but that's probably not much use to you:

screenshot from 2017-03-29 12-05-58

I'd like to use SMESH for doing this eventually from within python, at which point it would make sense to provide support for quilting the Bspline surface and multi-block decomposition, but it's not currently supported (I mentioned this in #18). @jf--- is there any update on that?

TsingQAQ commented 7 years ago

sounds like a plan, seems that SMESH will be a great integration if this could be done, looking foward to see that.

trelau commented 7 years ago

I've been working on PythonOCC + SMESH + Netgen in case you find it useful. See the branch here. I'm trying to clear a path to get this back into the main pythonocc repo. I have it available on the Anaconda cloud for Windows 64 Python 3.5. I could compile it on other platforms if someone could help get Netgen ci working for Mac and Linux...

TsingQAQ commented 7 years ago

Wow seems many people are doing this, cool work wish to help but I haven't use Mac or Linux ever nor do I have a PC using such operating system..

p-chambers commented 7 years ago

Thanks @trelau, I'll keep an eye on your pythonocc fork in the coming months - it looks like SMESH is not as far away as I had thought. I'm working on a side project at the moment, but is there an issue on your fork describing what isn't currently working for the Netgen ci?

trelau commented 7 years ago

@p-chambers no but i'll work on it a little today. i have little experience with the ci platforms, so i think it was probably something that someone with a little familiarity could fix. i remember trying to turn on the travis-ci builds and it broke the appveyor builds for some reason. after i take another look at it i'll let you know in case you spot something obvious.