CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[swiftBlock/swiftSnap] SwiftSnap and SwiftBlock, GUIs for OpenFOAM's meshers

Register Blogs Community New Posts Updated Threads Search

Like Tree83Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 11, 2019, 12:17
Default
  #281
New Member
 
Join Date: Jul 2017
Posts: 28
Rep Power: 9
luca1992 is on a distinguished road
Quote:
Originally Posted by kalle View Post
For some time I have been working on writing two python plug-in scripts for Blender 3D. The two tools assists the user in creating the blockMeshDict and snappyHexMeshDict with associated files. The tools have no interdependencies, but the users may use SwiftBlock to create more advanced base meshes for snappyHexMesh than just a single block.

I have the hope that the tools are easy to use, but please read the short user guides before starting. If anyone encounters problems, please bring them up here on the forum.

The two tools are tested in Blender 2.6x (They may also work for 2.5x, but not older, as Blender has gone through major revisions) using Ubuntu Oneiric 64-bit and Windows XP. Precompiled (recommended) versions are available at http://www.blender.org

http://openfoamwiki.net/index.php/SwiftBlock

http://openfoamwiki.net/index.php/SwiftSnap

I encourage people to suggests improvements and make own versions. Based on Python 3.2, the scripts are very easy to understand and customise.

Kalle
Hi Kalle I wanted to thank you so much for these SwiftBlock extensions for Blender because it allowed me to realize the geometry of the tunnel for my thesis work and it was a salvation. This extensions is really well done. Thanks again, best regards, Luca.
luca1992 is offline   Reply With Quote

Old   March 9, 2020, 06:25
Default SwiftBlock documentation
  #282
Member
 
Tuomo Keskitalo
Join Date: Oct 2010
Posts: 57
Rep Power: 16
tkeskita is on a distinguished road
Hi,

I moved SwiftBlock docs, they are now available at https://swiftblock.readthedocs.io/

Also, I've found out how to install VTK and Numba into Blender's Python environment, see docs for instructions. Disclaimer: I haven't tried out Numba in SwiftBlock yet, though. Reply here if it's not working.
lourencosm likes this.
tkeskita is offline   Reply With Quote

Old   November 23, 2020, 10:14
Default is SwiftBlock compatible with Big Sur
  #283
New Member
 
Join Date: Nov 2020
Posts: 1
Rep Power: 0
jurzaft is on a distinguished road
I'm kinda new to UNIX and openfoam.I installed SwiftBlock add-on. However, when I click preview, I get this error(attachment):

After this I googled it and I found out I should source openfoam. I wrote source $HOME/OpenFOAM-8/etc/bashrc , which gives me this error:
Your "Darwin" operating system is not supported by this release
of OpenFOAM. For further assistance, please contact https://openfoam.org

/Users/kaanalkan/OpenFOAM-8/etc/bashrc:source:232: no such file or directory: /opt/openfoam8/etc/bashrc

Can anyone help me?
Attached Images
File Type: jpg Screen Shot 2020-11-23 at 17.10.07.jpg (46.4 KB, 22 views)
jurzaft is offline   Reply With Quote

Old   April 30, 2021, 17:54
Default
  #284
New Member
 
Dave
Join Date: Apr 2021
Posts: 2
Rep Power: 0
Ethan All is on a distinguished road
I'm working on learning OpenFoam and am attempting to use SwiftBlock for the first time. I created a geometry, edge settings, boundary patches etc, but am having trouble exporting to a blockMeshDict file. When I click the Export button in the SwitBlock panel, it saves a blender file (with extension .blender) instead of a blockMeshDict text file.


I am using Blender version 2.82 with SwiftBlock from github/tkeskita as described in SwiftBlock Addon for Blender 2.8


Am I going nuts? Yes, this is making me nuts. Am I doing something wrong?
Ethan All is offline   Reply With Quote

Old   June 29, 2021, 09:42
Default
  #285
j2l
New Member
 
Phil M
Join Date: Jun 2021
Posts: 5
Rep Power: 5
j2l is on a distinguished road
Quote:
Originally Posted by Ethan All View Post
I'm working on learning OpenFoam and am attempting to use SwiftBlock for the first time. I created a geometry, edge settings, boundary patches etc, but am having trouble exporting to a blockMeshDict file. When I click the Export button in the SwitBlock panel, it saves a blender file (with extension .blender) instead of a blockMeshDict text file.
Am I going nuts? Yes, this is making me nuts. Am I doing something wrong?

Export button opens a folder selection BUT it also fills the file name with the .blend. I simply delete the filename and it works.
j2l is offline   Reply With Quote

Old   June 29, 2021, 10:20
Default wind tunnel walls, 3D to 2D for NACA profiles
  #286
j2l
New Member
 
Phil M
Join Date: Jun 2021
Posts: 5
Rep Power: 5
j2l is on a distinguished road
Hello,
I know Blender pretty well but I'm discovering swiftBlock.
I tried the "hypercube" mesh, and the sphere example works fine.
But I have issues when I try with a NACA profile:

If I set the inner cube inside the profile, I get this meshing in preview:
https://i.imgur.com/jZSFxoG.png




If I set the inner cube around the profile:
https://i.imgur.com/YL4UJuC.png




And sometimes, I get plain errors at preview, see my ticket: https://github.com/tkeskita/swiftBlock/issues/7


And my second problem is about the walls of the domain (wind tunnel): For straight profiles (that would go wall to wall) like this NACA profile, how to tell blockMesh, through swiftblock, to simply consider the profile is going into the wind tunnel walls (slip conditions)?

Kind of 2D within 3D domain.Something like this:
https://i.imgur.com/HwOVath.png

Or is there a way to make it fully 2D?


I tried multiple ways and didn't find one that correctly export and build correctly. At checkMesh I get errors.


Any idea?
j2l is offline   Reply With Quote

Old   June 29, 2021, 11:00
Default
  #287
New Member
 
Dave
Join Date: Apr 2021
Posts: 2
Rep Power: 0
Ethan All is on a distinguished road
Quote:
Originally Posted by j2l View Post
Export button opens a folder selection BUT it also fills the file name with the .blend. I simply delete the filename and it works.

Thanks for following up. I did figure it out eventually. CFD is complicated enough without having to deal with software quirks, albeit minor ones.
Ethan All is offline   Reply With Quote

Old   July 20, 2021, 04:29
Default
  #288
j2l
New Member
 
Phil M
Join Date: Jun 2021
Posts: 5
Rep Power: 5
j2l is on a distinguished road
Any help?
Someone who successfully did it?
j2l is offline   Reply With Quote

Old   February 4, 2023, 04:07
Default SwiftBlock upgraded to Blender 3.3 LTS
  #289
Member
 
Tuomo Keskitalo
Join Date: Oct 2010
Posts: 57
Rep Power: 16
tkeskita is on a distinguished road
FYI I've just upgraded SwiftBlock to work on Blender LTS version 3.3. Previously it worked on Blender 2.83.

Please like this post if you use Swift Block so I know that upgrading work is useful!


BR,
Tuomo
lourencosm and HRubss like this.

Last edited by tkeskita; February 5, 2023 at 04:20.
tkeskita is offline   Reply With Quote

Old   February 5, 2023, 02:45
Default
  #290
Member
 
Tuomo Keskitalo
Join Date: Oct 2010
Posts: 57
Rep Power: 16
tkeskita is on a distinguished road
Quote:
Originally Posted by j2l View Post
Export button opens a folder selection BUT it also fills the file name with the .blend. I simply delete the filename and it works.
This is now fixed, the Export operator will now just ignore the file name and only use the directory path.

BR,
Tuomo
lourencosm likes this.
tkeskita is offline   Reply With Quote

Old   February 5, 2023, 04:13
Default
  #291
Member
 
Tuomo Keskitalo
Join Date: Oct 2010
Posts: 57
Rep Power: 16
tkeskita is on a distinguished road
Quote:
Originally Posted by j2l View Post
Any help?
Someone who successfully did it?
Hi j2l,

thanks for providing this inspiring example! Now that I finally had time to check it I found it so useful that I recreated it as an example, which is now included in Swift Block! Please see example/naca_airfoil_example.blend file in the add-on sources.

Several improvements were needed to make it work. First, the airfoil mesh has to extend slighly outside the block mesh in order for it to project to the airfoil edges correctly.

Secondly, all blocks must be hexahedral I think. Third, block walls must face towards the projection surface, and it must be "close by" and "above" the projection surface for projection to work. Unfortunately, this involves a lot of trial and error to see if it works. It is suggested to start with simple and then increase complexity stepwise to catch breaks early. But still, this is such a huge feature, big thanks to Mikko for that! A possibility to do this via a graphical interface is very powerful, even for simple geometry.

The export error was due to projection object name starting with a number, which confused OpenFOAM. Seems to be so that projection object name must start with a letter.

I found out that making the boundary layers is most prone to cause headache. You need to check the edge directions and possibly flip direction of some edges before setting parameters to edges. Also parameter values are important so it is possible to make the inflation for all blocks. But, it seems to work! Edge groups feature help here a lot to set settings to a bunch of edges.

I can understand why people who need boundary layers might find this add-on useful. Another alternative is to extrude mesh from a surface mesh, please see the Unstructured Grids Blender add-on.

For anyone: If you like and use Swift Block, please like this post so I know someone is actually benefitting from the add-on version upgrade work. Thanks!

BR,
Tuomo


naca1.jpg

naca2.jpg

naca3.jpg
lourencosm likes this.
tkeskita is offline   Reply With Quote

Old   May 19, 2023, 13:57
Default Blender 3.5.1
  #292
New Member
 
Simhan
Join Date: May 2023
Posts: 1
Rep Power: 0
simhan is on a distinguished road
Does the Swiftblock add-on work with Blender 3.5.1? It's my first time trying it, but I'm not seeing a panel even though it's clearly installed and "checked" as enabled.
simhan is offline   Reply With Quote

Old   May 20, 2023, 10:50
Default
  #293
Member
 
Tuomo Keskitalo
Join Date: Oct 2010
Posts: 57
Rep Power: 16
tkeskita is on a distinguished road
Quote:
Originally Posted by simhan View Post
Does the Swiftblock add-on work with Blender 3.5.1? It's my first time trying it, but I'm not seeing a panel even though it's clearly installed and "checked" as enabled.
Hi, I haven't tried. It's supported on LTS release of Blender (3.3 currently).

BR,
Tuomo
tkeskita is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 12:57.