refined mesh
1 Attachment(s)
Hello,
I want to simulate a flow through a pie-shaped geometry like shown in the attached picture. Therefore I want to refine the mesh near the inflow and the outflow. I tried to do it with the simpleGrading option, but only the mesh near inflow was refined and not near the outflow. Does anybody know how to refine the mesh on both sides? Do I have to split the geometry into two blocks? I don't know how to solve this problem. Thanks, Jennifer |
Hi Jennifer,
you can use blockMeshDoubleGrading as described and provided in this thread: http://www.cfd-online.com/Forums/ope...e-grading.html Or you can split your geometry into two blocks, just as you already mentioned. Martin |
1 Attachment(s)
Hi Martin,
thanks for your answer. I tried to use blockMeshDoubleGrading, but I didn't succeed in refining in the right direction. I inserted blocks ( hex (0 2 3 1 4 6 7 5) (45 50 1) doubleGrading (1 -5 1) ); in the blockMeshDict file and got the mesh shown in the attached picture. But I want to refine the mesh towards the outflow and inflow and not like in the picture towards the outer and inner wall of the geometry. So tried to use doubleGrading (-5 1 1), but then I got errors. Can you tell me how to use it correctly? Thanks Jennifer |
Hi Jennifer,
(-5 1 1) should be correct. Can you provide your blockMeshDict? Martin |
Hi Martin,
when I run blockMeshDoubleGrading no errors occur. Create timeBut when I run checkMesh an error occurs: Create timeBecause I can not use paraFoam I always use foamToVTK to visualize the results or the mesh. When I try to run the application I get the message: Create timeDo you have any idea, what I do wrong or how to change the values, that it works? Thanks Jennifer |
Hi Jennifer,
there seem to be some minor bugs in the blockMeshDoubleGrading. Here is a workaround: - change the order of your arc definition to: Code:
arc 1 3 (0.25 0 0) // <--- this was "arc 3 1" before hex (0 2 3 1 4 6 7 5) (46 50 1) doubleGrading (-5 1 1) // <--- 46 instead of 45 Now it should work fine. Martin |
Hi Martin,
thanks again for your answer. I will try to insert your changes on Monday, when I will be at work again and I will let you know, if it works :-) Have a nice weekend. Jennifer |
1 Attachment(s)
Hello again,
yesterday I changed my blockMeshDict file and blockMeshDoubleGrading seemed to run correctly. But checkMesh gave me two errors: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //And I think the generated mesh looks a little bit strange. Or is it right? Jennifer |
3 Attachment(s)
Hi Jennifer,
looks like the problem coming from the sequence of the arc definition. Well, here are my blockMeshDoubleGrading source codes for OF17x and OF2x. For the OpenFOAM 2.0.x version you must build a library first. Unpack the src_20x.tar.gz file into your users OpenFOAM folder, navigate via shell to the directory containing the "Make" folder, and call "wmake libso". Good luck Martin |
Hi Martin,
now it works. Thanks for your help :-) Jennifer |
Problems with cells with very high aspect ratios
I manage to get the blockMeshDG to work. The mesh looks very nice and graded in this simple geometry but I get one layer of cells with very high aspect ratios in the middle of the geometry.
Colud you please give a hint on what the problem might be? My blockMeshDict file is as: convertToMeters 1.0; vertices ( (-1 -1 0) ( 1 -1 0) ( 1 1 0) (-1 1 0) (-1 -1 1) ( 1 -1 1) ( 1 1 1) (-1 1 1) ); blocks ( hex (0 1 2 3 4 5 6 7) (80 80 65) doubleGrading (1 1 -5) ); edges ( ); boundary ( bottom { type wall; faces ((0 3 2 1)); } surface { type wall; faces ((4 5 6 7)); } side_half0 { type cyclic; neighbourPatch side_half1; faces ( (0 4 7 3) ); } side_half1 { type cyclic; neighbourPatch side_half0; faces ( (2 6 5 1) ); } frontAndBack_half0 { type cyclic; neighbourPatch frontAndBack_half1; faces ( (3 7 6 2) ); } frontAndBack_half1 { type cyclic; neighbourPatch frontAndBack_half0; faces ( (1 5 4 0) ); } ); mergePatchPairs ( ); // ************************************************** *********************** // |
Hi Sam,
there is a bug in the code, I think... a workaround is to define a pair number of cells in z direction (changed from 65 to 64): hex (0 1 2 3 4 5 6 7) (80 80 64) doubleGrading (1 1 -5) Martin |
Thank you - works perfect!
Thank you - works perfect!
|
All times are GMT -4. The time now is 07:04. |