|
[Sponsors] |
[blockMesh] Tool Block generation with blender |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 19, 2008, 10:19 |
Tool Block generation with blender
|
#1 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
Hi,
since snappy came to life, blockMesh has become a more interesting tool. Therefore I have written a small blender plugin to help in the tedious generation of the blockMeshDict block structure. The plugin is in an early stage, and lacks exception handling and gui, but it can be used as follows (blender should be launched from terminal so messages from the plugin can be seen): 1) Create the block topology in blender (Must be orhtogonal blocks) All blocks must reside in the same blender object. 2) Assert there are no duplicate vertices (remove doubles in edit mode). 3) In edit mode, select 8 vertices forming your first block. 4) Export to a file using the attached plugin. 5) Select 8 vertices forming your second block. 6) Export to the same file using the attached plugin (it will be appended to). 7) Repeat for all blocks. 8) OPTIONAL: To produce a skewed block structure, move the nodes in blender and export to a new file. Then replace the vertices in the first file with the vertices in this new file. 9) Hand edit the blockMesh file. NOTE: Since I haven't grasped how to handle tolerances in blender yet, the exported vertices only include 3 decimal digits! I know this is not very userfriendly, but hand editing blockMeshDict is worse by far, imho. To install a blender plugin, simply put it in $HOME/.blender/scripts/ exportBlockMeshVertices.py Please feel free to enhance this embryo of a tool. cheers Niklas |
|
December 19, 2008, 10:22 |
And a new version:
http://
|
#2 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
||
December 22, 2008, 10:09 |
And a GUI version:
1) Creat
|
#3 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
And a GUI version:
1) Create block topology (orthogonal blocks!) 2) Remove duplicate vertices 3) Open a "Scripts Window" in blender 3) Select from Scripts->Export menu "BlockMesh Export GUI" (Some buttons should appear) 4) Select output file, or accept default 5) In edit mode select 8 vertices forming a block 6) Press "Register block" 7) Repeat 5) and 6) until all blocks are registred 8) Optional: Now, you can move the vertices around, to create a "skewed" block structure. 8) Press "Write and quit" blockMeshExporterGUI.py /N It takes about 1 minute to create |
|
December 29, 2008, 09:05 |
Some enhancements and changes.
|
#4 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
||
December 29, 2008, 11:50 |
Later updates can be fetched a
|
#5 |
Member
Niklas Wikstrom
Join Date: Mar 2009
Posts: 86
Rep Power: 17 |
||
July 27, 2009, 16:25 |
|
#6 |
Senior Member
Fabian Braennstroem
Join Date: Mar 2009
Posts: 407
Rep Power: 19 |
Hi Niklas,
nice approach. Could you suggest some tutorials for hex mesh creation in blender in combination with your scripts? Thanks! Fabian |
|
July 28, 2009, 08:10 |
|
#7 |
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18 |
Dear All,
I had a go with blender, but I haven't tried creating blockMesh files with it. It's all very interesting and I just want to make sure that you are aware of this presentation: http://www.imac.unavarra.es/Cursos/A...FOAMCharts.pdf Douglas released the code. Maybe somebody can post up-to-date pointers. Henrik |
|
August 12, 2009, 18:03 |
|
#8 | |
Senior Member
Ahmed
Join Date: Mar 2009
Location: NY
Posts: 251
Rep Power: 18 |
Quote:
Thanks and good luck |
||
August 12, 2009, 18:09 |
|
#9 |
Senior Member
Henrik Rusche
Join Date: Mar 2009
Location: Wernigerode, Sachsen-Anhalt, Germany
Posts: 281
Rep Power: 18 |
Just did. Works for me. Henrik
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[swiftBlock/swiftSnap] SwiftSnap and SwiftBlock, GUIs for OpenFOAM's meshers | kalle | OpenFOAM Community Contributions | 292 | May 20, 2023 10:50 |
[ICEM] Replay not working properly - Creating the mesh for Free Block. | Wingman | ANSYS Meshing & Geometry | 4 | January 17, 2017 04:57 |
[blockMesh] blockMesh error - Negative Volume Block | adoledin | OpenFOAM Meshing & Mesh Conversion | 2 | June 22, 2016 11:44 |
[ICEM] Quest for seemingly simple Blocking (degenerate block) | la7low | ANSYS Meshing & Geometry | 0 | July 12, 2011 20:48 |
Latest news in mesh generation | Robert Schneiders | Main CFD Forum | 0 | March 2, 1999 05:07 |