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   January 22, 2015, 15:00
Default
  #181
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
Hi!

Sorry for late response! Are you trying to make an O-mesh? Have you seen the example of meshing a cylinder on https://openfoamwiki.net/index.php/Contrib/SwiftBlock?

Kalle
kalle is offline   Reply With Quote

Old   January 27, 2015, 05:54
Default Need help for swiftblock
  #182
Member
 
amine
Join Date: Jan 2014
Location: FRANCE
Posts: 84
Rep Power: 12
aminem is on a distinguished road
Hi,
I try to make a projection of the mesh on the curvature of the half-cylinder, but it does not give me the result desired. Do I have to divide my STL file to tell him to throw on the half cylinder. Are we can tell him what block you want to project.

thank you
Attached Images
File Type: jpg swiftblockerror1.jpg (47.7 KB, 55 views)
File Type: jpg swiftblockerror2.jpg (37.7 KB, 45 views)
File Type: jpg swiftblockerror3.jpg (34.8 KB, 50 views)
aminem is offline   Reply With Quote

Old   January 27, 2015, 06:05
Default
  #183
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
Looks like you have a nice block structure in fig 2, but on the preview mesh it looks that some edges, which you wanted to be straight have been given polyLines. This happens when both vertices of an edge are co-located with vertices of the "polyLine object" _and_ there is a connected path in the polyLines object between those two vertices;

From https://openfoamwiki.net/index.php/Contrib/SwiftBlock:

Quote:
If an edge in your block structure has both it's vertices snapped to a vertex or an edge from the polyLine object, SwiftBlock will find out the closest path in the mesh of the object, and use this path as a polyLine in the blockMeshDict. By this way, you can fit your block structure to more general geometries. Be aware though, that SwiftBlock may find unexpected paths. You can also tell an edge in your block structure explicitly not follow the path found in the polyLine object by selecting it and press Straight.
Is that possibly the problem?

K
kalle is offline   Reply With Quote

Old   January 27, 2015, 06:52
Default
  #184
Member
 
amine
Join Date: Jan 2014
Location: FRANCE
Posts: 84
Rep Power: 12
aminem is on a distinguished road
Hi,

I have divided my STL on two file (surface of the half cylinder alone) and it works better. But I have a problem (see picture). I had checked all vertices, edges and faces. I don't know what is a problem

Thanks
Attached Images
File Type: jpg swiftblockerror4.jpg (62.2 KB, 55 views)
aminem is offline   Reply With Quote

Old   January 27, 2015, 22:05
Default
  #185
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
Looks like it failed to pick up two polylines. Check that your block vertices are really colocated with a vertex or are exacly on an edge. Possibly you have by mistake forced the two edges to be "straight"

K
kalle is offline   Reply With Quote

Old   February 14, 2015, 04:44
Default
  #186
kjw
New Member
 
Krzysztof Wołosz
Join Date: Oct 2010
Location: Poland
Posts: 15
Rep Power: 15
kjw is on a distinguished road
Hi!
I've been recently working on an axisymmetrical model. I wanted to create block mesh by using SwiftBlock. I worked for me for simple geometry when I edited manualy blockMeshDict. But is it possible to make some kind of "workaround" in swiftBlock in order to proceed with wedge blocks?

Regard
Krzysztof
kjw is offline   Reply With Quote

Old   February 14, 2015, 07:11
Default
  #187
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 haven't tried it, but I think that the MakeAxialMesh tool is your friend here! If you try it, please let us know the result here.

Regards
K
kalle is offline   Reply With Quote

Old   February 14, 2015, 12:24
Default
  #188
kjw
New Member
 
Krzysztof Wołosz
Join Date: Oct 2010
Location: Poland
Posts: 15
Rep Power: 15
kjw is on a distinguished road
I tried the axial symmetry model already by using another mesh tool. I'm using openfoam 2.3.1 at the moment, and terrible errors occured. My case considers turbulent supersonic airflow and I am trying to fix the solver errors first. If it succeed, I will let you know.

Regards
Krzysztof
kjw is offline   Reply With Quote

Old   May 28, 2015, 18:51
Default
  #189
kjw
New Member
 
Krzysztof Wołosz
Join Date: Oct 2010
Location: Poland
Posts: 15
Rep Power: 15
kjw is on a distinguished road
Hi,
There is an issue during meshing. I hope the figures show the problem. First shows geometry, second - blocks, third - result. There is no hole in mesh where it should be. I am using blender 2.72. Am I making a mistake?

And one more question: Is there a possibility to manage the number of digits of point coordinates in blockMeshDict?

Regards,
Krzysztof
Attached Images
File Type: jpg geom.jpg (13.2 KB, 41 views)
File Type: jpg mesh.jpg (12.7 KB, 30 views)
File Type: jpg result.jpg (53.8 KB, 39 views)
kjw is offline   Reply With Quote

Old   May 29, 2015, 01:25
Default
  #190
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
Hi!

This is exactly the situation where SwiftBlock cannot know if the block in the center is something the user want or not. This is mentioned in the wiki:

Quote:
... 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.
... so select all the vertices belonging to the unwanted block and put them in a group named "disabled"

Kalle
kalle is offline   Reply With Quote

Old   May 29, 2015, 05:53
Default
  #191
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
About the number of decimals; I guess there is a way in Python to control that, but it is nothing I have investigeted or put any functionality for in the UI.

K
kalle is offline   Reply With Quote

Old   July 8, 2015, 11:13
Question SwiftSnap & blockMeshDict
  #192
New Member
 
anonymous
Join Date: Jul 2015
Posts: 21
Rep Power: 10
iy-a is on a distinguished road
Hello,

I'm trying to make my own simulation in OpenFOAM.
For such a task, I used SwiftSnap to export my mesh into scripts from blender.
I selected my input,output and wall as in the "pipe" example/tutorial.
Resolution is set as 0.005m and size of my Stl is around 0.1m.
Refinement on inlet/outlet : 3. On wall : 2.
Detect features : wall are selected, I set it as level 0 (level0.eMesh created)
I didn't add any layers.

- blockMesh took 1 s
- snapyHexMesh took 30s

Problem :
- paraFoam displays a block barely sculpted and doesn't seem to work corretly

When I compare my snappyHexMeshDict with the others everything looks fine,
except refinementRegions, where they use a cube.
Is this mandatory for having snappyHexMesh working?

Last edited by iy-a; July 13, 2015 at 12:48. Reason: more accurate description of the problem.
iy-a is offline   Reply With Quote

Old   July 13, 2015, 06:54
Default
  #193
New Member
 
anonymous
Join Date: Jul 2015
Posts: 21
Rep Power: 10
iy-a is on a distinguished road
Source of the problem ?

Last edited by iy-a; July 13, 2015 at 12:50.
iy-a is offline   Reply With Quote

Old   July 16, 2015, 03:53
Default
  #194
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
Hi! Sounds like your base mesh is much too coarse!
kalle is offline   Reply With Quote

Old   July 16, 2015, 09:17
Default Be sure model is not too big
  #195
New Member
 
anonymous
Join Date: Jul 2015
Posts: 21
Rep Power: 10
iy-a is on a distinguished road
Indeed, mesh was too coarse but I had been able to increase resolution
only if I rescaled the model down in Blender. Otherwise, core dumped.
I should have answered it as I correct the problem.

Now the real struggle is that my mesh get PARTLY rendered.
As it worked with the pipe example, this problem looks to be
specific to my own mesh, that I detailed in this thread.

Thanks for the answer.
iy-a is offline   Reply With Quote

Old   July 16, 2015, 14:19
Default
  #196
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 12
Flowkersma is on a distinguished road
Hey Kalle,

I have been testing swiftBlock a bit and it seems very promising! I did not have any experience with Blender before but it seems to suit very well for designing blocks. I have found a nice workflow to make O-grids. Thanks!

Do you have any plans to add the latest blockMesh features? The multi-grading feature would decrease the number of necessary blocks. I could try to implement it as well but to understand the Blender Python interface will still take some time. It would be nice to have a possibility to specify the first cell sizes, expansion ratios and number of cells/max cell size for each edge.
Flowkersma is offline   Reply With Quote

Old   July 17, 2015, 04:02
Default
  #197
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 12
Flowkersma is on a distinguished road
I added two videos on YouTube which show my workflow to make O-grid for a pipe:
http://youtu.be/a3ULmJe8I1o
http://youtu.be/IzwFvqum5P0

A couple of comments about them:

1. When I extrude the plane, I first choose "Extrude Invidual Faces", press ESC and then just make a normal extrusion. This is a bit hacky but I did not find any other way to also include the internal edges.

2. The extrusion creates a huge amount of zero length edges, zero areas and duplicate vertices which you have to remove. So always after extrusion, remember to clean up your blocking. This is done by selecting the whole blocking geometry and using "Mesh-> Clean up -> Degenerate Dissolve" and "Remove Doubles" tools.
wyldckat likes this.
Flowkersma is offline   Reply With Quote

Old   July 17, 2015, 05:52
Default
  #198
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
Hi Mikko!

Great! Thanks for the videos, they are really needed!

I have been thinking of the new features. A key issue here is that those new features need more information to store for each edge. If you would browse the code you can see that I go a rather long way with Blender to be able to store even a simple float. I have recently though found a way to store more info for blender mesh polygons. I hope the same method can be applied to edges. If so, it would be possible to make use of the new blockMesh features... As it looks now, I do not have the time to implement it though. If you are interested, I'd be happy to share the method for storing data for polygons.

Regards,
Kalle
kalle is offline   Reply With Quote

Old   July 18, 2015, 10:50
Default
  #199
Senior Member
 
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 12
Flowkersma is on a distinguished road
Hi Kalle,

Thanks for the information!

I have been reading your code and googling a bit. I see that the method you have implemented now seems a bit complex. Is there some specific reason why not to use the BMesh module http://www.blender.org/api/blender_p...3_2/bmesh.html? It allows to add layers to the edges which could have the necessary data (cell sizes, first cell sizes, etc..).

Regards,

Mikko
Flowkersma is offline   Reply With Quote

Old   July 19, 2015, 05:38
Default
  #200
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
When I wrote most of the code, BMesh wasn't implemented (2.61 & 2.62). I would probably be good to make a large rewrite and instead rely on BMesh for storing data, and also make use of the new grading. If you want to try this out, it would be great!

If new grading is implemented, one has to look at the code that determines the total number of cells needed for an edge.

Regards,
Kalle
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 08:53.