|
[Sponsors] |
[blockMesh] Mesh refinement for a cylindrical mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 20, 2011, 06:54 |
Mesh refinement for a cylindrical mesh
|
#1 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Hi Foamers,
although I have read a lot oft posts concerning this topic, I couldn't really find an answer. Therefore sorry if it maybe was already answered! I have created the attached mesh using blockMesh: What I now want to do is to refine a certain area at the corner of the mesh. Earlier I had a cube where I could refine a specified area easily using the cellSet command, but in this case, the structure of my mesh gets lost. Is there a similar tool to refine certain areas which are not "box-shaped"? Thanks! |
|
February 4, 2011, 08:42 |
|
#2 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
little workaround is with cellSet and refineMesh with a local coordinate system. But I'm still interested in other suggestions about how to get around that cellSet only allows boxToCell, which is not optimal for the mentioned geometry.
Greetings |
|
February 7, 2011, 17:55 |
|
#3 | |
New Member
kalyan
Join Date: Oct 2010
Posts: 19
Rep Power: 16 |
Quote:
cellSet also has cylinderTocell option which can extract the cells in the cylinder regions specified |
||
February 10, 2011, 09:31 |
|
#4 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Hi thanks for the hint! Coudl you help me with the syntax? I havent found any use of it so far...
Thanks! |
|
February 10, 2011, 14:16 |
|
#5 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Usage: cylinderToCell (p1X p1Y p1Z) (p2X p2Y p2Z) radius
Select all cells with cell centre within bounding cylinder |
|
July 30, 2012, 10:00 |
|
#6 |
New Member
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 14 |
hi lindstroem,
I tried cylinderToCell to generate cylinder but the boundary is not smooth (https://docs.google.com/drawings/d/1...DW5AXeEmY/edit)since I used blockMesh to set the domain, do you have any idea about how to set the region instead of blockMesh? Regards, T |
|
July 30, 2012, 10:06 |
|
#7 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Hi Teemo,
you want to "generate a cylinder"? some options are snappyHexMesh or O-Grids for cylinders (can be done with blockMesh). But I do not undersant your actual problem.. Greetings L |
|
July 30, 2012, 10:19 |
|
#8 |
New Member
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 14 |
Hi Lindstroem,
Sry for the bad description, I would like to test the wave load on the simplified floating cylinder-shape structure in a water tank, so I used one block to generate the whole tank and then employed toposet with cylinderToCell source to model the vertical floating object, while in paraview, you will see that the boundary of the cylinder is not smooth as as the mesh is made of only cuboidal cells(https://docs.google.com/drawings/d/1...DW5AXeEmY/edit). Thanks, T |
|
July 30, 2012, 10:34 |
|
#9 |
New Member
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 14 |
Hi again,
Could you link me any tutorial of using snappyHexMesh or O-grids for cylinders? Many Thanks! |
|
July 30, 2012, 11:08 |
|
#10 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
I'm still not sure if I get you right, but the tutorial for snappy can be found by searching for snappyHexMeshDict in your tutorial folder (e.g. grep -r snappy .) and in the User Guide and for O-Grid see the forum:
http://www.cfd-online.com/Forums/ope...disc-like.html But if you select your cells after creation I don't know how you could get rid of the staggered bubble.. if it is just the phase fraction, it will be "smooth" after the first iteration. Greetings |
|
July 30, 2012, 13:03 |
|
#11 |
New Member
Teemo
Join Date: May 2012
Posts: 28
Rep Power: 14 |
Hi Lindstroem,
Sry for my bad English, it is not my first language. The video linked below is what I would like to simulate. http://www.youtube.com/watch?v=AuNWovYR6WA My problem is :In my case, Firstly the wave tank are meshed by BlockMesh (just one block). Then I model the cylinder by using cylinderToCell but the cylinder boundary are not smooth since all cells created by blockMesh are cube.(https://docs.google.com/drawings/d/1...e6NzNv1hk/edit) |
|
July 31, 2012, 05:24 |
|
#12 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 16 |
Yes, I would recommend snappyHexMesh (sHM) for that: So you use your inital block you created and within your sHMDict you define the cylinder you want to cut.. Then let sHM do the work for you and simulate your waves.
Greetings L |
|
June 19, 2018, 06:06 |
|
#13 | |
Member
Ben 017
Join Date: Nov 2017
Posts: 70
Rep Power: 9 |
Quote:
Have you been able to solve this? May you help? Indeed, I want to do the same as you wanted to do. But for my case the cylinder will be not floating but immersed in wave. May you help with your setup. Thank you! |
||
June 19, 2018, 06:48 |
|
#14 | |
Member
Yage
Join Date: May 2014
Posts: 60
Rep Power: 12 |
Quote:
1. You could build up your cylinder model first (with CAD software, like SolidWorks, with STL file output), and use snappyhexMesh to input your cylinder and refine its surface. 2. You could try waves2foam package to generate waves. Regards, Yage |
||
June 19, 2018, 07:14 |
|
#15 | |
Member
Ben 017
Join Date: Nov 2017
Posts: 70
Rep Power: 9 |
Quote:
Thank you, But i am not yet there, I want first to map a cylinder in my fluid domain that i generated using blockMesh. I guess toposetDict can help. I want to simulate first using pisoFoam or any simple solver. Just help to use cylinderTocell in toposetDict to get that cylinder? (below is my blockMesh) How do you understand my approach? The coordinate of the cylinder I want: center(0 0 0), diameter:0.5 Then what will be p1 and p2? Thank you! -------------------------------------------------------------------------------------- convertToMeters 0.1; vertices ( (200 -50 0) (200 50 0) (-25 50 0) (-25 -50 0) (200 -50 1) (200 50 1) (-25 50 1) (-25 -50 1) ); blocks ( hex (0 1 2 3 4 5 6 7) (100 225 1) simpleGrading (1 1 1) ); edges ( ); boundary ( inlet { type patch; faces ( (2 3 7 6) ); } outlet { type patch; faces ( (0 1 5 4) ); } topAndBottom { type patch; faces ( (1 2 6 5) (0 3 7 4) ); } frontAndBack { type empty; faces ( (0 1 2 3) (4 5 6 7) ); } ); mergePatchPairs ( ); // ************************************************** *********************** // |
||
June 19, 2018, 07:56 |
|
#16 | |
Member
Yage
Join Date: May 2014
Posts: 60
Rep Power: 12 |
Quote:
The setup of cylindertocell should be like (P1X P1Y P1Z) (P2X P2Y P2Z) radius the Px, Py... are the centres of upper and lower surface. They could be higher and lower than your "front" And "Back" since your background mesh is in 2D. While in my experience, the cylindertoCell was not quite good to build the curved boundary of the cylinder Yage |
||
June 19, 2018, 09:24 |
|
#17 | |
Member
Ben 017
Join Date: Nov 2017
Posts: 70
Rep Power: 9 |
Quote:
I am sorry to be disturbing again. I humbly request if you have time , you may look on the attached folder and help me to why that cylinder in not appearing. you may help to know what i am missing in my topsetDict. Thank you! |
||
June 19, 2018, 14:07 |
|
#18 | |
Member
Yage
Join Date: May 2014
Posts: 60
Rep Power: 12 |
Quote:
I cant check your file right now but it may be caused by the "convertToMeters". Try to rewrite your blockMesh with "convertToMeters 1". Yage |
||
June 20, 2018, 09:34 |
cylinderTocell
|
#19 |
Member
Ben 017
Join Date: Nov 2017
Posts: 70
Rep Power: 9 |
Dear Yage,
I have refined the cell size: convertToMeters 1; vertices ( (200 -50 0) (200 50 0) (-25 50 0) (-25 -50 0) (200 -50 1) (200 50 1) (-25 50 1) (-25 -50 1) ); blocks ( hex (0 1 2 3 4 5 6 7) (1100 400 1) simpleGrading (1 1 1) ); edges ( ); my topoSetDict: is as follow: FoamFile { version 2.0; format ascii; class dictionary; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( { name solid; type cellSet; action new; source cylinderToCell; sourceInfo { radius 0.5; p1 (0 0 0); // start point on cylinder axis p2 (0 0 1); // end point on cylinder axis } } ); but still i am not seeing the cylinder i want in paraview. What could be the reason? you may check on the attached folder |
|
June 20, 2018, 11:35 |
|
#20 | |
Member
Yage
Join Date: May 2014
Posts: 60
Rep Power: 12 |
Quote:
1. Use small background 2. And you miss patch setup for your cylinder in blockMeshDict, adding these: solid { type wall; faces (); } 3. In your toposetDict, add: { name solid; type cellSet; action invert; } 4. In your allrun, add: runApplication subsetMesh -overwrite solid -patch solid |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
decomposePar problem: Cell 0contains face labels out of range | vaina74 | OpenFOAM Pre-Processing | 37 | July 20, 2020 06:38 |
[snappyHexMesh] problems generating clean mesh | Christian_tt | OpenFOAM Meshing & Mesh Conversion | 2 | June 20, 2019 06:39 |
[snappyHexMesh] Removing further cells after SHM | zonda | OpenFOAM Meshing & Mesh Conversion | 14 | September 15, 2017 08:50 |
[snappyHexMesh] snappyHexMesh & Mesh around a missile | sasanghomi | OpenFOAM Meshing & Mesh Conversion | 2 | October 15, 2014 20:54 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |