Coder Social home page Coder Social logo

robin's Introduction

I used these python script to generate three-dimensional, tetrahedral mesh in my PhD study.

The ROBIN (ROtor Body INteraction) is a generic helicopter configuration consists of a fuselage and a pylon. From now on, the fuselage and pylon configuration is termed as main body. Blades, hub and other features which are not included in the main body need to be generated separately. In this code, in addition to the main body, four NACA0012-profiled blades and a hub are modelled.

CAD models are modelled in FreeCAD with python scripting. FreeCAD can be invoked with either freecadcmd fuselage_pylon.py or freecad fuselage_pylon.py which additionally opens up the FreeCAD GUI. It is possible to generate surface mesh of the main body or go further and generate three-dimensional mesh given an outer shape. In my case, the ROBIN body is cut out from a sphere and the remaining portion is meshed with tetrahedral elements. mesh.py can be modified according to your needs. FreeCAD produces mesh files in native GMSH format, that is, .geo. FreeCAD can set geometry and mesh parameters. To name a few, FreeCAD can set dimension of elements (2D or 3D), the meshing algorithm and define mesh groups in order to distinguish different regions of geometry such as walls, outer boundary and so on.

It is not expected that all GMSH features to be integrated to FreeCAD, therefore, you might want to add/remove lines from the geo file generated by FreeCAD. Since CAD modelling requires multiple iterations, it is recommended to write a script to modify the produced geo file after every iteration. modify_geo.py is the script which I used to modify the produced geo file. For example, I use few fields in order to control element volume such that the elements closer to walls have smaller volumes.

The blades and the hub are modelled/meshed with the same machinery of FreeCAD and GMSH.

Warning: Surface points of main body are obtained with super-ellipse equations. The coefficients which are used in super-ellipse equations of Mineck are wrong as pointed out here and here. The coefficients that are used in this work are in coef_fuselage.py and coef_pylon.py and are taken from the appendix of this where modified coefficients are pointed out.

Tested on: FreeCAD version: 0.18.4 GMSH 4.7.1

robin's People

Contributors

orxshi avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.