|
[Sponsors] |
[swiftBlock/swiftSnap] SwiftSnap and SwiftBlock, GUIs for OpenFOAM's meshers |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
November 27, 2013, 07:04 |
|
#121 |
New Member
Shane Slater
Join Date: Nov 2013
Posts: 7
Rep Power: 13 |
Oh dear, do I have a lot to learn or what!
Just realised that the finer, snapped mesh which is in another directory, you need to tell paraFoam to go to that "time" to use those cell layers. You could see the snapped mesh in there. blimey. steep learning curve. |
|
November 27, 2013, 09:14 |
|
#122 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Good to hear you solved it! I did not have any immediate clue what was going on...
K |
|
November 27, 2013, 09:46 |
|
#123 |
New Member
Shane Slater
Join Date: Nov 2013
Posts: 7
Rep Power: 13 |
Kalle,
if you are still online, perhaps you could advise on this: in swiftsnap, is it important to specify boundary patches which: a) do not overlap (in other words, that STL triangles are not shared between patches b) together cover the whole surface? I think A) must be true, otherwise OF will get confused. The reason I ask is that swiftsnap seems to start with all mesh surfaces by default in the defaultname wall. So, I believe I have to deselect mesh surfaces that would be used in other patches, such as an inlet? For B) it would be much easier just to identify the inlet/outlet patches, and then hopefully OF treats everything else as a default wall patch. So, I could not have the defaultname wall patch, and just make inlet and outlet patches. However I do not see a way to remove the defaultname patch from the list of patches....? Thanks Shane |
|
November 27, 2013, 14:55 |
|
#124 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hi
A) True, you cannot have overlapping STLs. As SwiftSnap handles the whole geometry in one Blender mesh object, this comes naturally. Different patches are handled in Blender using Blender materials (with different colors). Upon initialization, all the objects faces are given the material named "defaultName". The user should then select faces and assign them proper names, hence defining the patches. B) For sHM, there are no default patches, except those that are remaining from the blockMesh-mesh. For external flows, this is natural and wanted. For such flows, the user has to create the blockMeshDict (maybe using SwiftBlock), and define patches, like inlet and outlet. For internal flows, like the pipe bend example, none of the patches from the blockMesh-mesh remains in the final mesh. Then the user should define patches in the SwiftSnap Blender object, like described in A). Further, like you ask, the Blender object has to be "water tight", otherwise, mesh will "leak" out (or leak in, in the case of external flow), and fill parts of the domain, which the user did not intend to be meshed. Hope things got clearer, otherwise post again! Kalle |
|
November 27, 2013, 17:55 |
|
#125 |
New Member
Shane Slater
Join Date: Nov 2013
Posts: 7
Rep Power: 13 |
Thanks Kalle,
actually this is surprisingly easy to do. Blender just confused me. For anyone else that had the same problem (maybe not many!): when you first go to the patch settings, all of the stl faces will be highlighted as being part of the defaultName. To make an inlet you input the patch name, say its a patch, but then you need to DESELECT ALL (faces) before choosing the inlet faces you want. Probably obvious to the blenders out there but not to me! This is the case for all subsequent patches, should you want to make a new patch, you have to deselect the previous faces before choosing those to be in the new patch. Kalle, I have to say, that one of the biggest problems I've seen with an openfoam workflow, is to take a single STL mesh and define the boundary patches for Openfoam. (In other words, as per the previous posts, break it into non overlapping stl meshes). I now see that you've done this in blender. I've spent a while trying to find a workflow for this, thanks so much. (PS one reason I had a problem - aside from being a bit thick, is that my ubuntu version of blender is on a virtual machine, and it has terrible problems with windows changing sizes and jumping around a lot. Something to do with 3D acceleration. I've done the above in the windows partition and its easy.) cheers Shane |
|
December 1, 2013, 10:55 |
|
#126 |
New Member
Zhong, Hong Min
Join Date: Oct 2012
Location: UESTC, Chengdu in China
Posts: 8
Rep Power: 14 |
Hi Kalle and anybody,
I am a newer for blender and swiftBlock&swiftSnap, My blender is 2.69.2 and my openfoam is 2.2.2. , and I can run your tutorial example such as SwiftBlockExample.tar. But I don't know how "block" is create in your example. In addition, if I have a STL geometric file, could I get blockMeshDist by swiftBlock+blender? Thank you, HM, Zhong. |
|
December 1, 2013, 20:09 |
|
#127 |
New Member
Shane Slater
Join Date: Nov 2013
Posts: 7
Rep Power: 13 |
Hi,
well as I've just been doing this recently then I may answer. Yes, in swiftsnap you need to tick the box "make base mesh". That writes a blockmesh.dict using the bounding box for the active swiftsnap mesh. When you write the files you need to put things in the right directories. So: blockmesh.dict = constant/polymesh/ snappyHexmesh.dict = system/ trisurface directory should be in constant/ if you have a STL file that you want to mesh inside (like the pipe example) then you can do it all in swiftsnap. if you want to build a big box mesh around your STL (like a wind tunnel), the you could still use swiftsnap, then when blockmesh.dict is written, just go in and change the dimensions to the ones you want. Maybe this is easier in swiftblock, but I've never used that. cheers Shane |
|
December 3, 2013, 01:02 |
|
#128 | |
New Member
Zhong, Hong Min
Join Date: Oct 2012
Location: UESTC, Chengdu in China
Posts: 8
Rep Power: 14 |
Hi, Shane,
Thank you for your quick reply. I re-scanned the thread just now, and notice several key points about creating "block" which are mainly from Kalle: Quote:
In addition, my interest is wind-turbine simulating in a tunnel, my tunnel includes a nozzle and a collector, not wind-turbine because an ALM method is used. I try to mesh them by using the fluent3DMeshToFoam(get based-Mesh) and snappHexMesh tools, and in my snappHexMeshDist (created manually) there are both STL geometries of the nozzle and collector. But the result seems not correct (see the attachments, checkMesh -allGeometry -allTopology ), and in paraview I found the regions around the nozzle and collector sufaces cannot always refined (maybe this leads to bad results). Thanks, HM, Zhong. |
||
January 14, 2014, 09:46 |
swiftBlock usage
|
#129 |
Member
|
Good day All
I have been using Pointwise for my meshing until recently and now need to find an alternate method to generate meshes. I have been 'playing' with Salome, enGrid and more recently Blender in combination with swiftBlock / swiftSnap. Blender and swiftBlock / Snap appear to be the most versatile and I would like to (and need to for study purposes) use these packages for my investigation. I should indicate that I am using Blender 2.69.8 and the latest version of swiftBlock/Snap from git. However, I am not following the workflow required to generate a mesh using swiftBlock (hex mesh is desired). Based upon forums and my own interpretation I have undertaken the following:
I do not understand what is required with the remainder of the edge settings. I understand that grading etc are required to be set however I cannot see how these grading (etc) are attributed to each boundary as defined by the user specified materials. Could someone please provide some concise points / comments on the remainder of the procedure to generate a mesh. A copy of the blender file I am using can be downloaded from: https://skydrive.live.com/redir?resi...92D8AD0%214201 A brief description on how to blockMesh this MEL culvert with, for instance, a higher grading resolution over the weir would be beneficial. Any assistance will be greatly appreciated, and hopefully I can return the favour one day. Kind regards JFM Last edited by JFM; January 14, 2014 at 09:47. Reason: grammar |
|
January 15, 2014, 00:59 |
Help making swiftBlock/swiftSnap appear in Add-ons Menu
|
#130 |
New Member
Richard
Join Date: Jan 2014
Posts: 5
Rep Power: 12 |
Hi,
I am relatively experienced in 3d modeling but am new to Ubuntu/OpenFOAM/Blender. My challenge is that after copying swiftBlock and swiftSnap files to the blender/2.69/scripts/addons/swiftBlock and /swiftSnap folder, I cannot find the scripts in the Add-ons Community menu. The path up to the swiftBlock and swiftSnap folders is the same as the add-ons that do appear in the window. I tried this in blender 2.66a and 2.69/Ubuntu 13.10... no luck with either version. What am I doing wrong? Thanks! -Richard Last edited by pirsquared; January 15, 2014 at 01:05. Reason: clarity |
|
January 16, 2014, 05:32 |
|
#131 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
John,
it sounds as if you have clicked "enable swiftblock" on your imported STL object. Is so, please have a look at the examples to find out that the geometry/edges carrying object (your stl-object) is a different object than the block-structure-carrying object. Rickard, To the left in your screen dump you have the Categories list. Can you find OpenFOAM in that list? If so, the addons should be visible if click it. Let me know how you progress, guys. Kalle |
|
January 21, 2014, 09:48 |
swiftBlock/swiftSnap installation
|
#132 |
New Member
Richard
Join Date: Jan 2014
Posts: 5
Rep Power: 12 |
Kalle,
No luck getting openFoam to appear int eh Categories on Blender versions 2.63, 2.66a and 2.69. I did successfully install and use the enGrid blender add-ons for v. 2.63. Not sure why I can't see the swift scripts though. Thanks, Richard |
|
January 21, 2014, 10:44 |
|
#133 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hmm.. strange. I have no clue what could be wrong. The Engrid addon is not under the OpenFOAM category, but sorts under "Mesh". You could try to manually edit the __init__.py files. It is easy. Compare with the Engrid addon and see if you can get it to work!
K |
|
February 26, 2014, 03:58 |
|
#134 |
New Member
Andrew
Join Date: Feb 2014
Location: Russia
Posts: 20
Rep Power: 12 |
kalle
Thanks for your SwiftSnap scripts. I found them really useful. But may I ask a question? When I importing STL geometry in Blender (2.68 with upt-to-date swiftsnap) I can assign patch names and write snappyHexMeshDict + STL geometry for OpenFOAM with your tool. But when the meshing with snappy is done I can't load the mesh into paraFoam (OpenFOAM 2.2) because patch names in geometry STL files and in mesh are different (as a result, paraFoam reports several errors). The reason is that STL files generated with script begin with line "solid Exported from Blender-2.68 (sub 0)" instean of just "solid". I've inspected your scripts and have not a clue where this string is generated so I think that Blender generetes it itself when exporting to STL. Is there any workaround to avoid editing STL's "by hand" or the only way is to processing them with "sed" or some other stream editor to remove "Exported..." trails? pirsquared Had similar difficulties. Installing add-on from Blender GUI didn't work. I had to copy directories (not just files) with swiftblock and swiftsnap to Blender add-on dir (scripts/addons) to make them work (Blender 2.63, 2.66 and 2.68 tested with corresponding versions of swift tools). Thanks for attention... Sorry if there are any language problems, my native is russian... Last edited by Antech; February 26, 2014 at 04:02. Reason: Update |
|
March 7, 2014, 14:51 |
|
#135 |
New Member
Zhong, Hong Min
Join Date: Oct 2012
Location: UESTC, Chengdu in China
Posts: 8
Rep Power: 14 |
Let myself answer the question about "create a block" in floor 128.
In fact, creating a block is the same as creating a geometrical model, just ensure no seperate points and faces in the block. If any, you should remove them with the "fusing" commands in blender. hope useful to some guys. |
|
March 8, 2014, 14:32 |
|
#136 |
New Member
Zhong, Hong Min
Join Date: Oct 2012
Location: UESTC, Chengdu in China
Posts: 8
Rep Power: 14 |
Hi, Andrew,
You can alter your script files, i.e. several line codes starting from line 190 in "/usr/share/blender/2.69/scripts/addons/io_mesh_stl/stl_utils.py" to what you want. Of course, if you just confront a few files you maybe modify them manually, zhm |
|
March 11, 2014, 02:20 |
|
#137 |
New Member
Andrew
Join Date: Feb 2014
Location: Russia
Posts: 20
Rep Power: 12 |
iamacloud
Thanks! I've found the lines around 190 in stl_utils.py and I see that keyword "solid" is followed by a "header" that is a version info of Blender. File slt_utils.py in my case located in other directory, not /usr/share... (because I just unpacked official Blender archive and it is running OK, I didn't "install" it). I'll edit these lines nex time I use Blender for meshing. |
|
March 12, 2014, 09:37 |
|
#138 |
New Member
romainRH
Join Date: Jul 2012
Posts: 24
Rep Power: 14 |
Hi.
I would like to try swiftblock. I have both blender 2.62 and 2.70. I am just starting with blender so it took me few minutes to found how to activate the addons. Now i am looking for the swiftblock in the propertie tab of the object but there is nothing. Could someone post a screenshot to show me where swiftblock is located in blender ? Thanks |
|
March 13, 2014, 02:22 |
|
#139 |
New Member
Andrew
Join Date: Feb 2014
Location: Russia
Posts: 20
Rep Power: 12 |
romianRH
If you have activated Swift addons in User preferences, you just need to click on the cube (Object) in the right toolbar in Blender, scroll down and click "Enable SwiftBlock" button. |
|
March 13, 2014, 02:28 |
|
#140 |
New Member
romainRH
Join Date: Jul 2012
Posts: 24
Rep Power: 14 |
Hi Antech.
That is exactly wath I was looking for. Thank you |
|
|
|