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 Members List Search Today's Posts Mark Forums Read

Like Tree70Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 11, 2013, 03:40
Default
  #81
kjw
New Member
 
Krzysztof Wołosz
Join Date: Oct 2010
Location: Poland
Posts: 15
Rep Power: 15
kjw is on a distinguished road
The heading from __init__.py says:
Code:
bl_info = {
    "name": "SwiftBlock",
    "author": "Karl-Johan Nogenmyr",
    "version": (0, 1),
    "blender": (2, 6, 4),
    "api": 44000,
    "location": "Tool Shelf",
    "description": "Writes block geometry as blockMeshDict file",
    "warning": "not much tested yet",
    "wiki_url": "http://openfoamwiki.net/index.php/SwiftBlock",
    "tracker_url": "",
    "support": 'COMMUNITY',
    "category": "OpenFOAM"}
so I think that i use a right version.

KJW

Quote:
Originally Posted by kalle View Post
I see that you use Blender 2.64a. Which version of swiftBlock are you using?

K
kjw is offline   Reply With Quote

Old   March 11, 2013, 03:57
Default
  #82
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
Good... obj['bevelToResMap'] is a python dictionary, which maps a string (str(round(e.bevel_weight*100))) to an integer. The integer tells how many cells you have requested on edge "e". For book-keeping, I use the Blender native edge feature "bevel_weight". For this reason it is important that the user does not manually edit edge's properties (floats bevel_weight and crease are used, as well as boolean use_edge_sharp). I do not know what happened in this particular case, but you should be able to reset bevel_weight by selecting all your block structure and forcing 0 cells on all edges. 0 cells means disabling forced edge resolution. If you do want to force some edges, you'll have to repeat that procedure.

Let me know if you get through.

K
kalle is offline   Reply With Quote

Old   March 11, 2013, 06:10
Default
  #83
kjw
New Member
 
Krzysztof Wołosz
Join Date: Oct 2010
Location: Poland
Posts: 15
Rep Power: 15
kjw is on a distinguished road
Thanks a lot,
Your explanation lit my brain up
Now, at least I can correct my errors.

kjw
kjw is offline   Reply With Quote

Old   March 11, 2013, 12:19
Default
  #84
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
Thanks for you input, Bruno. I'll have a look at it! Good git usage is not one of my strengths :-)

Quote:
Originally Posted by wyldckat View Post
Hi Kalle,

Nice!

Although I have a little request: could you git tag the commits for changes related to a specific Blender version?
For example, I think you can tag the previous commit on SwiftBlock as follows:
Code:
git tag -a v2.64a f42ea8c909a26cf9ea560eab10caf912acdc0aea
Then push the tag to the online repository like this:
Code:
git push origin v2.64a
Or if you have more than one tag and don't mind pushing all tags you've got:
Code:
git push origin --tags
For more on git tags: http://learn.github.com/p/tagging.html

Many thanks! Best regards,
Bruno
kalle is offline   Reply With Quote

Old   March 13, 2013, 15:37
Default
  #85
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
There was a bug in the new insert smoother feature, which was revealed when objects were scaled. Should be fixed now.

K
wyldckat likes this.
kalle is offline   Reply With Quote

Old   March 29, 2013, 12:47
Default quarter cylinder
  #86
New Member
 
Florent Henon
Join Date: Dec 2012
Posts: 7
Rep Power: 13
abacus++ is on a distinguished road
P { margin-bottom: 0.21cm; } Hello Kalle,


P { margin-bottom: 0.21cm; }
I am trying to learn to use swiftBlock and based on your cylinder example, I would like to create a quarter cylinder. I am attaching the created blender file.

P { margin-bottom: 0.21cm; }
When generating the blockMeshDict, the « fetching edge's polyLines from Circle » step is not considered. I guess this is due to the fact that, for a quarter cylinder, the Circle object is not closed. Is there a solution ?

P { margin-bottom: 0.21cm; }
Thanks in advance for your help.
Attached Files
File Type: gz quarterCylinder.blend.tar.gz (68.0 KB, 4 views)
abacus++ is offline   Reply With Quote

Old   March 29, 2013, 14:59
Default
  #87
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
I see... I took the freedom to adjust your model somewhat...

K
Attached Files
File Type: gz quarterCylinder.blend.tar.gz (72.8 KB, 12 views)
kalle is offline   Reply With Quote

Old   March 29, 2013, 15:11
Default quarter cylinder
  #88
New Member
 
Florent Henon
Join Date: Dec 2012
Posts: 7
Rep Power: 13
abacus++ is on a distinguished road
Thank you very much Kall,
I test your new blender file
abacus++ is offline   Reply With Quote

Old   March 29, 2013, 15:24
Default quarter cylinder
  #89
New Member
 
Florent Henon
Join Date: Dec 2012
Posts: 7
Rep Power: 13
abacus++ is on a distinguished road
There seems to be errors during the generation of the blockMeshDict. The blockMeshDict, and log.swiftblock remain empty ...
I use Blender 2.62. Do you have the same problem?
cheers
abacus++ is offline   Reply With Quote

Old   March 29, 2013, 15:27
Default
  #90
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
Please use 2.66 and the latest swiftblock, as I used that for saving the blend file.

K
kalle is offline   Reply With Quote

Old   March 29, 2013, 15:33
Default
  #91
New Member
 
Florent Henon
Join Date: Dec 2012
Posts: 7
Rep Power: 13
abacus++ is on a distinguished road
Ok, sorry ...

Thank you so much!
abacus++ is offline   Reply With Quote

Old   April 4, 2013, 07:58
Default
  #92
New Member
 
David Haces
Join Date: Mar 2013
Posts: 28
Rep Power: 13
Haces is on a distinguished road
Hi! I have some problems with the installation of the addons.

I have downloaded blender 2.66 and also the SwiftBlock .py documents. I've compressed all of them in a .zip. Then, in blender, in userpreferences addons I selected install from file and I select the .zip I've created before. I think this extracts the .py files in the folder - /home/$user/.config/blender/$version/scripts/addons. Still, is not working.

Does anybody have the same problem?
Haces is offline   Reply With Quote

Old   April 4, 2013, 09:31
Default
  #93
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
Hi,

I've never tried such an installation procedure. I always simply do like I wrote on the wiki

Quote:
Under your Blender installation directory locate the /scripts/addons directory. There create directory swiftBlock. Put the *.py files in there. In Blender's User Preferences, enable 'Community' addons, and locate SwiftBlock under the OpenFOAM category. Click to enable and return to 3D view.
K
Nucleophobe likes this.
kalle is offline   Reply With Quote

Old   April 22, 2013, 11:26
Default
  #94
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
I just pushed a new SwiftBlock to the repo. Now there is a button which, when clicked, allows you to delete internal patch faces and add missing patch faces to your block structure. Internal patches is merely an aesthetic problem, but it can be nice to clean them anyway. External patch faces is on the other hand tedious to create, which is also reflected in the pipe bend example, where I just left them out. Now they can be created with just a few clicks. I have not changed the old pipe bend example at the wiki, so you can try it on that case.

Kalle

p.s. there were some issues with book keeping of (forced) edge resolution and grading, which meant that you could effectively set a few different gradings. Now should be able to have up to 100 individual grading/resolution settings.
kalle is offline   Reply With Quote

Old   May 14, 2013, 00:26
Default Swiftblock Aid
  #95
New Member
 
Ryan Balmer
Join Date: Apr 2013
Posts: 6
Rep Power: 12
Balmer is on a distinguished road
Hey all

I am interested in using swiftblock to help me create a mesh for flow over a bump. But sadly I am a blender noob (and openfoam). So far I can only import a stl that I created in solidworks. How can I go about learning swiftblock.

Thnx for your time
Balmer is offline   Reply With Quote

Old   May 14, 2013, 02:26
Default
  #96
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
Hi,

I would recommend first to get familiar with blender. They have a lot of good stuff on their website. You can also find good info on youtube. You'll have to be able to do some mesh editing.

Then, I'd advice you to read the page on openfoamwiki, and download the examples there to get an idea of the concept.

Good luck, and get back here if you run into trouble.

K
Balmer likes this.
kalle is offline   Reply With Quote

Old   May 14, 2013, 23:19
Default
  #97
New Member
 
Ryan Balmer
Join Date: Apr 2013
Posts: 6
Rep Power: 12
Balmer is on a distinguished road
Thankyou for reply

I have been looking into the things you have mentioned, especially examples such as pipeblock and quarter cylinder.

With my bump profile (pretty much a cross section of an airfoil) it is quite defined, and my question is is this type of structure applicable to swiftblock. I have attached an image.

Thankyou in advance
Attached Images
File Type: jpg bump.jpg (34.9 KB, 81 views)
Balmer is offline   Reply With Quote

Old   May 15, 2013, 04:05
Default
  #98
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
Sure, that is easily done with just one single block.

I guess you run this problem in 2D. If so, remember that OpenFOAM still needs a 3D mesh, but only one cell in the non-solved-for direction, and "empty" as boundary type for patches normal to that direction.

K
kalle is offline   Reply With Quote

Old   May 15, 2013, 05:25
Default
  #99
New Member
 
Ryan Balmer
Join Date: Apr 2013
Posts: 6
Rep Power: 12
Balmer is on a distinguished road
Sorry for the bad picture but it is a 3D structure.
I will be working on it over the next week. One thing I am struggling with is the select edges option, and when I hit preview the warning that preview mesh is empty to few vertices selected or broken block structue/ or cannot find object for edges . Sorry for all the noob like questions but my supervisor and I are interested in the swiftblock add-on and can see loads of potential.
Balmer is offline   Reply With Quote

Old   May 15, 2013, 05:40
Default
  #100
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
I see. I looks like you have enabled swiftblock for the blender object that actually carries the geometry. You have to have two separate blender objects. One object carries the block structure, and the other object (the one from your CAD software) carries the mesh that will be used to construct the block's edges... I know this is a little confusing, but I had to implement it this way to get a working addon.

If you open the "structural part" example, you can see that there are two blender objects present, and that the object carrying the block structure has ticked the "set edges" and the name of the object carrying the geometry is given there.

You should not click "enable swiftblock" on the geometry object.

K
Balmer likes this.
kalle is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 00:47.