![]() |
Hi,
since snappy came to li
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/ http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif exportBlockMeshVertices.py Please feel free to enhance this embryo of a tool. cheers Niklas |
And a new version:
http://
|
And a GUI version:
1) Creat
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" http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif blockMeshExporterGUI.py /N It takes about 1 minute to create |
Some enhancements and changes.
Some enhancements and changes.
http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif blockMeshExporterGUI.py /N |
Later updates can be fetched a
|
Hi Niklas,
nice approach. Could you suggest some tutorials for hex mesh creation in blender in combination with your scripts? Thanks! Fabian |
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 |
Quote:
Thanks and good luck |
Just did. Works for me. Henrik
|
| All times are GMT -4. The time now is 04:35. |