|
[Sponsors] |
July 19, 2015, 07:18 |
|
#201 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Ok, I thought that there might be some reason why it doesn't suit to this purpose. I will give it a try and report about any problems
|
|
August 13, 2015, 08:44 |
|
#202 |
Member
Camille Bilger
Join Date: Jul 2013
Posts: 43
Rep Power: 13 |
Hello Kalle, and others,
I have a blockMeshDict file which I can transform into a .obj file using "blockMesh -blockTopology" I then can import this .obj file into Blender 3D (Using File, Import, Wavefront) I can see the outline of my mesh/blocks, but I don't seem to find how to select it/edit it. If at all possible. Can I change the dimensions,cell counts etc? Thank you |
|
August 13, 2015, 08:54 |
|
#203 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Interesting idea. Never thought of that, but it sounds good!
Else, this is a question of handling Blender. Normally, just press Tab key to enter Edit mode. There are plenty of tutorials on the web for learning Blender (which I really recommend to learn, not only for meshing) K |
|
August 13, 2015, 09:32 |
|
#204 |
Member
Camille Bilger
Join Date: Jul 2013
Posts: 43
Rep Power: 13 |
Hi Kalle,
Thank you for your quick reply,Yes I did put Edit mode ON, but I cannot seem to be able to do anything. I thought it would be worth asking if this was a common problem. |
|
August 13, 2015, 10:14 |
|
#205 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Thanks for great tip! I did not know that it is so easy to import the blocking to Blender. I just tried it for pitzDaily and it seems to work perfectly. Here are the steps to import blocking from OpenFOAM:
1. run "blockMesh -blockTopology" which creates blockTopology.obj file 2. import the blockTopology.obj to Blender (File, Import, Wavefront) 3. Press the blockTopology active in the Outliner 4. Enable swiftBlock 5. Preview works now for me and I can change the blocking Last edited by Flowkersma; August 14, 2015 at 03:00. |
|
August 14, 2015, 06:04 |
|
#206 |
Member
Camille Bilger
Join Date: Jul 2013
Posts: 43
Rep Power: 13 |
Hi Flowkersma,
I'm glad that tip worked for you I'm also trying to make it work with pitzDaily! But I cannot...maybe you can help. 1/ I have pressed the blockTopology active in the Outliner. 2/ Should I then press the "cube" icon? underneath the Outline in the horizontal bar ? 3/ I do see Enable SwiftBlock, which I did. 4/ But I still cannot change from "Solid" view to "wireframe", or select faces etc. Thank you for your help |
|
August 14, 2015, 06:28 |
|
#207 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi kmou,
Modifying the geometry (vertices, edges and faces) has nothing to do with the swiftBlock addon thus when you have imported the blocking, you can straight start modifying the geometry (=blocking). After you're satisfied with the blocking, you can activate swiftBlock and modify the meshing parameters (cell size, grading etc.). Maybe your cursor is in the wrong place when you're trying to switch from object mode to edit mode. Try to do everything with mouse: 1. Import the blocking 2. Activate the blockTopology in outliner 3. Press "Object Mode" dropdown list in the lower left corner of the 3D view and change it to "Edit Mode" 4. Now try to drag vertex/edge Does it work? |
|
August 14, 2015, 06:41 |
|
#208 |
Member
Camille Bilger
Join Date: Jul 2013
Posts: 43
Rep Power: 13 |
Hi Flowkersma,
Thanks again for a prompt reply. Ah that works, I can drag vertices and edges as you suggested. But I still cannot move to "Solid" view and select Faces to Subdivide them - create more cells. Is that's the way to do it? I know that I definitely have to learn more about using Blender and SwiftBlock... |
|
August 14, 2015, 06:56 |
|
#209 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
First you'll have to understand the concept of blockMesh In Blender you are designing the blocking which is the "fishbone" of the mesh. Then with swiftBlock you'll choose resolution of the mesh by defining the mesh size on each edge of the blocking. If you're not satisfied with the rectangular cells, you can add grading to the edges thus make one side of the cell longer than the other. So I suggest you to first learn the concept of blockmesh and then how to make a blockMesh with Blender/SwiftBlock.
If you want to change from solid view to wireframe press the dropdown on the right "Object mode" dropdown and choose "wireframe". |
|
August 14, 2015, 07:30 |
|
#210 |
Member
Camille Bilger
Join Date: Jul 2013
Posts: 43
Rep Power: 13 |
Yes I have been meshing with blockMesh for a couple of years now, it's the Blender layout that I'm new to. So if I understand correctly, once blocking is done, and I proceed with the SwiftBlock settings, I need to select an edge on the 3D object, and then modify number of cells on it, and edgeGrading. And repeat for every single edge? For the "Method to Display" the 3D object, yes I am trying to switch but it does not work. It's weird, it works for the Default Cube but not the imported blockTopology. My main need while switching to using blender is to hopefully create an internal baffle, by selecting a set of faces. |
|
August 14, 2015, 08:40 |
|
#211 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Ok, sorry I got it wrong about your blockMesh skills.
At the moment there are two ways to define the cell size. You can define a global cell size for all the edges with the "Resolution" input or you can force a number of cells to an edge/edges by first selecting the edge/edges and then defining "# cells" and pushing "force resolution" button. Latter is also the way to define grading. Note that when you import the blocking there are no faces at all and therefore the two views look the same. The faces are only necessary if you want to define boundary conditions. To create a face, select the 4 edges or vertices of the face and press "F". There are a few tutorial videos which could be helpful if you haven't already watched them. |
|
August 14, 2015, 08:45 |
|
#212 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
BTW I have been developing the blockMesh's new multi-grading feature to SwiftBlock. It is almost ready and it will be released soon (1-2 weeks). It also supports defining the grading to all parallel edges at the same time.
|
|
September 2, 2015, 13:05 |
|
#213 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Hi everyone,
Here is my fork of the SwiftBlock (https://github.com/flowkersma/swiftBlock). It supports the new BlockMesh multi-grading feature. I found a couple of bugs in the new multi-grading feature which has been fixed in the latest OpenFOAM repository release (OpenFOAM 2.4.x). Thus, the latest repository release is required for this fork. It also launches the BlockMesh in the background when previewing the mesh and therefore the BlockMesh must be in the PATH. The new meshing parameters are:
I made a short example video which shows how to use the multi-grading and copy to parallel edges https://www.youtube.com/watch?v=bwrfuQVQ7gI I made another video which shows how to mesh bended pipe with o-grid http://youtu.be/ZY7WDP6w7YA Please let me know what you think about it |
|
September 4, 2015, 05:50 |
|
#215 |
New Member
Krzysztof Wołosz
Join Date: Oct 2010
Location: Poland
Posts: 15
Rep Power: 16 |
Mikko,
You do a great job! I only have a question on version of Blender. You made the fork for blender 2.75 only? Can lower version be used as well? Regards Krzysztof |
|
September 4, 2015, 06:12 |
|
#216 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Thank you, I hope it's working for you and I'm eager to get some feedback if you try it.
Krzysztof, I must say that I have only used it successively with Blender 2.75. I know from this thread that it will not work with versions older than 2.73 (ensure_lookup_table function). The fork uses Bmesh module which was implemented in version 2.6 so I think with slight modifications it could be used with that version. -Mikko |
|
September 4, 2015, 20:05 |
|
#217 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
@Mikko: I've added a few more details to the wiki page, to include a link to your fork and to your examples: http://openfoamwiki.net/index.php/Contrib/SwiftBlock - feel free to update the wiki page!
|
|
September 9, 2015, 05:33 |
|
#218 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 |
Thanks Bruno, I will update the page next week when I'll have again time for this.
I updated the code a bit so it works now at least with the Blender 2.69 version (on Ubuntu). Note that there is a dependency on Numpy as well which was included to Blender on different versions depending on OS. |
|
October 26, 2015, 20:12 |
|
#219 |
Member
Zhifang Hu
Join Date: Sep 2015
Location: Brisbane
Posts: 54
Rep Power: 11 |
Hi there
I am new to SwiftSnap, could any one give me some guide on how to do a simple geometry using SwiftSnap. I tired to create a cylinder using blender, applied 'Make Base Mesh' and set locationInMesh being outside of cylinder, as i want all the rest geometry be meshed and leaving the cylinder hollow. However after i click Write, only a snappyHexMeshDict file was generated and it does not look like the geometry i wanted. Anyone can give me some suggestion on the steps i need to follow to make SwiftSnap working properly. |
|
November 1, 2015, 21:31 |
|
#220 |
Member
Zhifang Hu
Join Date: Sep 2015
Location: Brisbane
Posts: 54
Rep Power: 11 |
I tried to create a geometry using swiftblock, however when i try diagnose it, it shows there is some problem with the mesh. I dont know whats the problem. Could anyone give me a help.
The attachment is the picture of the geometry I interested and the blender file. |
|
|
|