CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [swiftBlock/swiftSnap] SwiftSnap and SwiftBlock, GUIs for OpenFOAM's meshers (https://www.cfd-online.com/Forums/openfoam-community-contributions/100604-swiftsnap-swiftblock-guis-openfoams-meshers.html)

rmcfd September 8, 2014 05:35

oh, thank you for your quick reply! now it's working, thx!

kjw September 9, 2014 07:15

blender 2.70 + swiftSnap
 
Hello,
Your contribution in development of swiftSnap and swiftBlock must be admired. :)
Today I started testing of blender 2.70 with swiftSnap. Previous version was 2.66 and everything worked great.
I don't know if I'm doing something wrong but when I write snappyHexMeshDict in triSurface directory I have only one patch. In snappyHexMeshDict I have that patch mentioned four times because my model consists of four patches.
I seems that swiftSnap wrote only one obj file instead of four of them.

I hope I made some stupid mistake :)

Regards

Krzysztof

kcn September 17, 2014 05:27

Generating STL file
 
Hello,

I am trying to simulate airflow over an aircraft. I downloaded an stl file for a cassena aircraft. However it is not present as a single object in blender (I can move some parts such as propellers from rest of the plane). It also contains cracks (near rudder). Is there any way to modify it in blender to get a well connected surface?

Thanks
kcn

kalle September 17, 2014 06:34

Hi,

for swiftsnap you need to have them in one object. Also it should be watertight. There is plenty of info on the web how to do this in Blender.

Regards,
Kalle

rgpeters October 14, 2014 11:26

Quote:

Originally Posted by kjw (Post 509647)
Hello,
Your contribution in development of swiftSnap and swiftBlock must be admired. :)
Today I started testing of blender 2.70 with swiftSnap. Previous version was 2.66 and everything worked great.
I don't know if I'm doing something wrong but when I write snappyHexMeshDict in triSurface directory I have only one patch. In snappyHexMeshDict I have that patch mentioned four times because my model consists of four patches.
I seems that swiftSnap wrote only one obj file instead of four of them.

I hope I made some stupid mistake :)

Regards

Krzysztof

I am having the same issue. Even with the inital cube object that appears. If I name one face inlet and the others walls, I only get one obj file called inlet. SnappyHexMeshDict also lists inlet twice.

Robert

kalle October 17, 2014 11:04

Hi Krzysztof and Robert,

seems gmail put cfd-online messages as spam again. Sorry for missing both your questions. I did not use 2.70 yet so I missed the issue you have discovered. There was a stupid typo that somehow did not cause trouble in older versions of Blender. Thanks for complaining here and bringing it up! I have fixed it and pushed it to github!

Regards,
Kalle

kjw October 22, 2014 05:57

Unexpected connection of number of cells
 
Hi Kalle,
I am working on block mesh which consists of about 20 blocks. Recently, I found out something unwanted and quite annoying. When I change the number of cells in one edge then , unintentionally, number of cells in edge perpendicular to the first one is changed. When I tried to correct this, I turned out that the both edges are connected "to the death". I tried to differentiate them by diffrent grading but nothing seems to be the solution. I also tried it in blender 2.7 and 2.66.1 with the same result.
Maybe you could find the answer.

Regards

Krzysztof

kalle October 22, 2014 08:04

Hi!

Sounds indeed annoying. Could you send me the blend-file?

Kalle

kalle October 24, 2014 15:35

I could not repeat Krzysztof's problems, but the book-keeping for grading and force resolution was messed up. I have implemented a better strategy for this now. It is now more space conservative - you can always use up to 100 different gradings and forced resolutions in a model. Previously it would not delete unused entries, and you could after some trials with different settings (100 of them) run out of space.

This can be used also on old models - no need to start from scratch.

Kalle

vaina74 November 5, 2014 10:46

Hi everybody.
I'm going to install and test SwiftSnap with Blender and OpenFOAM. I'm not experienced, so I made no manual installation and tried to look for the add-on through the User Preference panel. I can't find the category OpenFOAM nor the add-on SwiftSnap. My configuration:

Ubuntu 12.04 LTS
Blender 2.62
OpenFOAM 2.3

Am I wrong with the 'automatic' installation procedure? Is SwiftSnap compatible with OpenFOAM 2.3 too? Thanks for your help.

kalle November 5, 2014 11:40

Hi!

I have not used "install from file" myself, but it seems that you should just download a zip from github, and feed it to Blender. Probably you wont be able to do a "git pull" later, though. Anyway, manual installation is so simple so it cannot be a big deal (at least in a system with git), plus you can update it anytime.

Unless you use a really old version of swiftsnap, which I do not recommend, you need to use a more recent Blender, like 2.70 for instance. Code from github will surely not work on 2.62.

SwiftSnap works well with OF 2.3!

Kalle

vaina74 November 6, 2014 05:02

Hi Kalle, thanks for your help. Just a feedback to share with other newbies (with Ubuntu 12.04 LTS) :)

Blender
Don't install from synaptic, it's a very stable release but too old for the SwiftSnap addon. You can install Blender from a PPA providing more recent versions, but I simply downloaded the pre-compiled version from Blender homesite.
- Download the appropriated zipped file (32 or 64 bit)
- Extract in your applications folder (home is the default folder)
- Launch Blender with the executable file Blender in the extracted folder (I simply rename it as blender)
- If you want to lock Blender in the launcher, the usual procedure doesn't work (the icon flashes but anything happens). Save a blender.desktop file in usr/share/applications, something like
Code:

[Desktop Entry]
Version=1.0
Name=Blender
Comment=Blender 3D Graphics
Exec=/home/userHome/blender/blender
Icon=/home/userHome/blender/icons/scalable/apps/blender.svg
Terminal=false
Type=Application
Categories=Graphics;3D;Application;

and run Blender to lock it in the launcher.

SwiftSnap
This is not a clean procedure because I'm not experienced with Blender and addons installing, so I walked by trial and error.
- Download the zipped file from GitHub (not in the addson directory of your Blender installation folder)
- From the User Preferences panel in Blender (Addons tab), choose Install from File and select the SwiftSnap archive
- The SwiftSnap item appears in the addons list, but I couldn't enable it because Blender complains about the missing SwiftSnap folder and python files. I extracted the SwiftSnap archive in the Blender addons folder (e.g. /home/userHome/blender/2.72/scripts/addons), anyway Blender warned about more files related to the same addon. I tried to remove the addon from the list but the remove button seemed not to work. I closed and launched again blender and I could enable the SwiftSnap addon without warnings, so I could overwrite the User Preferences file.
- I have not used the addon so far, but I can see the SwiftSnap entries in the Properties window.

If someone explains what was wrong with the described addon installing procedure, I'll correct and update this post.

kcn November 27, 2014 02:27

Adding an inlet to a wall using swiftblock
 
1 Attachment(s)
Dear Kalle,

I have a problem in which I have to add a small opening for an air flow into a square room. I tried to do this by adding a block in blender and then using a boolean difference operator I cut a small opening in a face and add a new face there and defined a new patch type for it using swiftblock. How ever I couldn't draw the mesh that way. (no preview mesh is generated). Can you please tell me a way to add such an inlet? I attached a drawing with red square showing the inlet.

kalle November 27, 2014 05:31

Hi!

You need to manually create the needed block structure. In this case you need 9 blocks. A boolean operation will not do this for you, but it is possible that you can use it as a starting point. Study the provided examples carefully, and you will understand how a block structure is designed.

Regards,
Kalle

zfaraday November 28, 2014 10:16

Quote:

Originally Posted by kalle (Post 492980)
Hi Richard,

glad you've got them working. Wouldn't have guessed that problem. Good you found out. Thank you for your kind words!

Maybe it should be clearified that you can easily install this way:

cd Your_Blender_dir
cd Your_Blender_version
cd scripts/addons
git clone https://github.com/nogenmyr/swiftBlock.git
git clone https://github.com/nogenmyr/swiftSnap.git

I have never used git on Windows, but I guess there is a similar way as above.

K

Hello everybody,

I'm trying to install swiftBlock as stated above, but I'm having some troubles and I don't understand why. Could anyone help me with it? After I try yo clone the repo this error is shown in the terminal...

Code:

Cloning into 'swiftBlock'...
error: SSL certificate problem: unable to get local issuer certificate while accessing https://github.com/nogenmyr/swiftBlock.git/info/refs?service=git-upload-pack
fatal: HTTP request failed

Many thanks in advance,

Alex

zfaraday December 2, 2014 14:49

1 Attachment(s)
Finally I could get rid of that error, it was a matter of protocols, I downloaded under git protocol instead of https and that was it!

Now I'm facing a problem with the plug-in itself. I'm modelling a simple set of walls of a house. The geometry in this case is quite simple as you can see in the picture.It only consists of a front wall and a couple of side walls. The front wall has a window in it... and here comes the problem!

I want every wall to be in its own region/set and that the window has its own region/set aswell, that is to say, I need to define 4 regions: front, window, side1 and side2. To do so, I did it as it's said in the wiki page:

Quote:

Block's name settings - This is simply an interface to Blenders Vertex Group also found under the "Object Data" tab. If all vertices in a block are members of the same Vertex Group, the block will be named as the group (and blockMesh will create cellZones/Sets). If all vertices are members of several groups, the name from the group appearing first in the list will be used. Vertex groups are sometimes used by experienced Blender users to create objects. To allow for such usage, SwiftBlock will ignore groups whose name starts with an under score "_". If all vertices belongs to a group named "disabled", that block will not be present in the blockMeshDict (or preview mesh). This is particulary useful when meshing, for instance, annualar pipes. See the structural part example.
I have no problem with the side walls but I can't say the same about the front wall and the window... The way I proceeded the window is, obviously, a hole in the wall with glass in the middle. Thus, I pick the eight vertices belonging to the window region and put it to the top of the list (as you can see in the picture). After that I pick the eight vertices in front of the previous ones (4 of them are common in both regions) and name them hole1. Then I do the same with the vertices behind the window (hole 2). What I want to get by doing this is all blocks from the front wall in a zone named front, except three blocks named as said before so that I can simply remove manually from de blockMeshDict file the blocks called hole1 and hole2. I proceed this way because I also tried the "disabled" trick but I couldn't make it work since the output was all the front blocks (window and disabled included) in the region front.

The output I get with the alternative of creating hole's blocks is the same that I get with the "disabled" trick. At this point, I wonder if it's correct or not what I marked in red in the text extracted from the wiki. What am I doing wrong? Why am I not able to get the window region?

Note: My OF and blender versions are 2.3.x and 2.70

Many thanks in advance!

Alex

kalle December 6, 2014 05:12

Alex' issue was solved in private communication. A few bugs were discovered in the process. Since Blender 2.68 a change in the Python API gave problems with the user interface on block naming. Also, if a block was found in two groups, the last group's name was used... and not as stated in the manual on openfoamwiki. Those two issues are now fixed. Thanks for helping me finding them, Alex!

Kalle

aminem January 14, 2015 05:20

1 Attachment(s)
The swiftblock addon is very interesting, but we have only one tutorial (https://www.youtube.com/watch?v=8P7vj7SccDM) and its not enough. I have try to do this tutorial (I work under ubuntu 14.04 LTS and blender 2.69) but i don't have good result (see picture). I hope that people who are more experiments on SwiftBlock can set up tutorials for users of OpenFOAM.

kalle January 14, 2015 05:33

You are right, usage information is lacking. Main limitation is time to do this.

However, to a large extent successful use of the addons depends on the users knowledge of Blender. If one is well familiar with Blender, the written information should provide enough information on how to use the tools. It more or less also needed that the user is well familiar with how to set up the input files (manually) for blockMesh and sHM. Else, a lot of concepts in the addons becomes unclear.

Becoming a skilled Blender user needs some devotion. However, I would encourage people to learn Blender. It is really useful for making, for instance, presentation material. There are tons of material on the web for learning Blender.

Regards,
Kalle

aminem January 14, 2015 05:58

1 Attachment(s)
Dear Kalle,

I have six month experience on Blender, but when I try to do the tutorial I don't have a good result (see picture). I try to do a same mesh like ICEM on Hydrocyclone problems. I will try to make Youtube tutorial if I have success with Swiftblock.

Best regards


All times are GMT -4. The time now is 01:20.