Array of airfoils - pre-processing for CFD

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
onekk
Veteran
Posts: 6144
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Array of airfoils - pre-processing for CFD

Post by onekk »

MM1991 wrote: Mon Jan 17, 2022 8:18 am Thank you for the advice, I will for sure make my code more readable. I am new to programming, but I understand that it might be necessary if the code is intended to be read and understood by others. Also, a big thank you for all the help!

Now I will try to generate the points that gives the airfoil within FreeCAD using numpy.
You are welcome.

Readability is one of the most important thing, with comments too, and not only for "others".

When you try to read your code maybe after some time, readability and good comments, are very important, as what "now" is clear, maybe after some time it will be not.

So it is a very good habit to learn and apply.

(Stop Teacher mode. (command for me) :D )

You could use numpy as it is already in the FreeCAD bundle, as it is used by some code in FreeCAD.

It will not be difficult to generate airfoils, (provided you have a "formula", or some more complicated math methods).

IMHO this is a better way, as "all the relevant code" is in one place, the "script file".


Good work and keep us informed about your work (if it is not reserved), some examples and some code are always welcomed, as maybe it will give some ideas to others.

It is an easy way to help other users too.

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
Post Reply