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)

kalle January 22, 2015 14:00

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

aminem January 27, 2015 04:54

Need help for swiftblock
 
3 Attachment(s)
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

kalle January 27, 2015 05:05

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

aminem January 27, 2015 05:52

1 Attachment(s)
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

kalle January 27, 2015 21:05

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

kjw February 14, 2015 03:44

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

kalle February 14, 2015 06:11

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

kjw February 14, 2015 11:24

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 May 28, 2015 17:51

3 Attachment(s)
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

kalle May 29, 2015 00:25

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 May 29, 2015 04:53

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

iy-a July 8, 2015 10:13

SwiftSnap & blockMeshDict
 
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?

iy-a July 13, 2015 05:54

Source of the problem ?

kalle July 16, 2015 02:53

Hi! Sounds like your base mesh is much too coarse!

iy-a July 16, 2015 08:17

Be sure model is not too big
 
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.

Flowkersma July 16, 2015 13:19

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 July 17, 2015 03:02

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.

kalle July 17, 2015 04:52

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

Flowkersma July 18, 2015 09:50

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

kalle July 19, 2015 04:38

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


All times are GMT -4. The time now is 09:03.