|
[Sponsors] |
March 17, 2014, 07:50 |
|
#141 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hi,
sorry for late response. Seems CFD-Online stopped sending me emails when there was something new here. Problems seem solved though. I have not looked at Blender 2.70, but will do soon when I find time. Did anyone try my tools in 2.70? Kalle |
|
March 19, 2014, 19:05 |
|
#142 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
BTW: are there any plans for swiftFoamy?
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
March 20, 2014, 03:24 |
|
#143 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Nice name :-) Could be an idea. I do not have any experience with that mesher (yet), so I do not know which dict-entries are valuable to be able to control with Blender. Actually that applies somewhat to sHM too. My work the last few years has not involved too much meshing...
|
|
March 20, 2014, 14:38 |
|
#144 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
May 17, 2014, 16:53 |
|
#145 |
New Member
Richard
Join Date: Jan 2014
Posts: 5
Rep Power: 12 |
Problem solved: novice error in copying html files from git repository and not actual python scripts. Download as zip, sudo copied into Blender addons, successfully used both swiftSnap and swiftBlock to run a pisoFoam case with turbulence. Thanks very, very much! The value of these scripts cannot be overstated.
|
|
May 20, 2014, 02:16 |
|
#146 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
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 |
|
May 25, 2014, 16:56 |
|
#147 |
Member
J.-H. Wang
Join Date: Oct 2010
Posts: 72
Rep Power: 16 |
Hello,
I am trying the SwiftBlock in Blender 2.70. The machine is running Mac OS X 10.9.2. I have followed the wiki page http://openfoamwiki.net/index.php/Sw...ck#cite_note-1 to create a blockMeshDict for the simple cube. It works fine for the simple cube. However, once I start doing some more complicated geometry, such as a plate with a cylindrical hole drilled at the center (created by the boolean subtraction of a cylinder from a plate, figure: https://dl.dropboxusercontent.com/u/...47.42%20PM.png), I start getting all kinds of problems. There are typically two types I will encounter: (1) SwiftBlock completely ignores the hole and gives me a mesh for the solid plate. See figure https://dl.dropboxusercontent.com/u/...47.54%20PM.png (2) SwiftBlock gives me empty mesh and this error message will show up: Code:
Preview mesh is empty. Too few vertices selected, or broken block structure! https://dl.dropboxusercontent.com/u/...49.40%20PM.png As this is a canonical example of external flow, I figured people have looked at it or will use this as a starting point to explore the tool. Does anyone have experience on this geometry or the solution to the problems? Thanks JHW |
|
May 26, 2014, 02:36 |
|
#148 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hi!
To mesh a geometry like that you will need to manually create the block structure. The structure you are looking for can be seen in Fig 2.16: http://www.openfoam.org/archive/2.2..../plateHole.php Boolean operations gives typically messy mesh objects, which do not contain any blocks. The only valid block in your mesh object is the one that swiftblock found, the original solid plate. Creating structures like the one in 2.16 is complicated to do directly in a text editor (just writing the coordinates and combining them into blocks), which is why swiftblock was invented... however, the user still has to manually design each block! Kalle |
|
May 26, 2014, 10:57 |
|
#149 |
Member
J.-H. Wang
Join Date: Oct 2010
Posts: 72
Rep Power: 16 |
Hi Kalle,
Edit: Thanks a lot for the response. I read the entire thread and I think I would have to pick up some basic blender operations before I can do anything significant. Keep up the great work! JHW Last edited by f0208secretx; May 26, 2014 at 12:08. Reason: see Edit |
|
May 27, 2014, 00:54 |
|
#150 |
Member
J.-H. Wang
Join Date: Oct 2010
Posts: 72
Rep Power: 16 |
Hello,
I was playing with both blender and swiftSnap today. I was simply trying to create the mesh for a 3D torus, which was constructed in Blender 2.70. Problem occurs when I SnappyHexMesh it. I used SwiftSnap to produce the blockMeshDict and SnappyMeshDict. The locationinmesh cursor was carefully placed inside the torus and data was generated by swiftsnap as well. I checked the stl file plotted with the background mesh and they look good. When I ran SnappyHexMesh no errors were detected, but the final mesh is no way near the torus... I attached the entire test case folder for your reference. I was wondering if this is a more upstream problem that occurs when generating the Dict files using SwiftSnap, or more downstream such as incorrect procedural implementation. Any advise is greatly appreciated! JHW |
|
May 27, 2014, 15:31 |
|
#151 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hi!
You are on good way! The problem with your model is that you try to create a torus mesh with cells that are about the same as the diameter of the torus. Generally for any mesher, you need several cells to resolve a feature of a geometry. Just increase the resolution of the base mesh, and you will see more of the torus appearing. Kalle |
|
May 27, 2014, 15:50 |
|
#152 |
Member
J.-H. Wang
Join Date: Oct 2010
Posts: 72
Rep Power: 16 |
Hello Kelle,
Thanks for the response. It is indeed the problem. I guess I was caught up in the thought that the base mesh resolution doesn't matter. I think I read it somewhere. Once I increase the base mesh resolution to 0.1 it solves the problem Another question: is there a good way to move the 3D cursor into the object? I was using snap to grid but apparently this trick would not work every time on arbitrary object. If I use my mouse the cursor will stick on the surface of the object... Thanks in advance. JHW |
|
May 27, 2014, 16:42 |
|
#153 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
I do not know of any automatic way to do it. The exact position is not critical, as long as you are not very close to a wall. A few clicks with the mouse button normally does the trick. The cursor is placed in a 2D plane which is normal to the current view, and at a depth defined by the current cursor position. (at least that is what I understand). That means that two clicks should always be enough, if you turn the view camera 90 degrees between the clicks. (for instance, first you select the x-y coords with camera normal in z-direction, then you put the camera in x-direction, and moves the cursor in z-direction). Once you get hold of it, it should not induce any pain
Kalle |
|
July 9, 2014, 07:09 |
co-locating vertices
|
#154 |
Member
Join Date: May 2014
Posts: 31
Rep Power: 12 |
Hi,
I am new to blender & OpenFoam. Can someone please tell me how to co-locate vertices of cube and cylinder in blender, as pointed in meshing a cylinder example? |
|
July 9, 2014, 08:24 |
|
#155 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
||
July 10, 2014, 01:18 |
|
#156 |
Member
Join Date: May 2014
Posts: 31
Rep Power: 12 |
Hi Kalle,
Thanks a lot for the reply. SwiftBlock is really helpful to my work. |
|
July 10, 2014, 14:35 |
Preserving internal edges to maintain block structure
|
#157 |
Member
|
First, thank you kalle for these great tools!
I have a (perhaps) simple question about swiftBlock. I have been creating my blender objects primarily by extruding either a cube or a 2D plane into the desired shape. However, the "extrude" operation does not seem to preserve internal edges, so sometimes blocks are not created appropriately for use with swiftBlock. For instance, if my 2D mesh has an internal vertex (see attached), and is then extruded in the normal direction, internal edges are not created, and swiftBlock reports "broken block structure." For simple geometries, I can add the missing internal edges in by hand, but it can be a bit tedious in other cases. Is there a way in blender to preserve internal edges? Or is there a better approach that I should be using? Thanks! -Nuc 2D_mesh.jpg 2D_mesh_extruded.jpg 2D_mesh_extruded_annotated.jpg 2D_mesh_extruded_fixed.jpg |
|
July 11, 2014, 05:54 |
|
#158 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hi Nuc,
Yes, I know this problem. Blender is for surface modelling, and it thinks the internal vertex should not be extruded into an edge. The only way I know to get around this is that you before extruding deletes all faces in your mesh. Then, of course, you need to recreate faces if you want to define patches. This is one of the reasons I created the repair feature where you can delete unwanted internal faces, and create missing boundary faces. Thanks for your kind words, Kalle |
|
September 8, 2014, 05:29 |
|
#159 |
New Member
Join Date: Jul 2014
Posts: 5
Rep Power: 12 |
Hi,
i am starting to test swiftBlock + swiftSnap (Blender 2.71). I followed the install-guide on openFoamWiki If I want to "Write" the blockMeshDict of the default-box the following ERROR is displayed: Code:
Report: Error Traceback (most recent call last): File ".../blender-2.7.1/2.71/scripts/addons/swiftBlock/__init__.py", line 253, in execute for f in obj.data.faces: AttributeError: 'Mesh' object has no attribute 'faces' location: <unknown location>:-1 Thanks in advance! |
|
September 8, 2014, 06:26 |
|
#160 |
Senior Member
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21 |
Hi!
Looks like you have downloaded an old version of the code from openfoamwiki. The up-to-date version is found on github: https://github.com/nogenmyr/swiftBlock.git Blender has changed its python API quite a lot the last years. The old version you downloaded is compatible with 2.62-2.63 (as stated) Kalle |
|
|
|