|
[Sponsors] |
[snappyHexMesh] extrudeMesh + snappyHexMesh 2d wedge mesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 25, 2016, 04:11 |
|
#21 | |
New Member
Nila
Join Date: Oct 2014
Posts: 24
Rep Power: 11 |
Quote:
Here I have provided mesh quality and checkmesh results for both with level 0 refinement and level 3 refinement respectively along with images. Now for level 3 refinement I am still getting nice mesh on my curved surface but the problem is somewhere else. 1. When there is level 3 refinement the finest level is not covering the whole geometry (See images). Also faces with face pyramid volume < 1e-13 is 449174, which is very high. I have searched about it in the Forum. Some people saying that when the resolution of bg mesh is very fine this may happen. When I increase ncellbetweenlevel the coverage increases. But along with that cell numbers and face pyramids increase significantly. Mesh quality control result for level 0 refinement- Checking faces in error : Code:
non-orthogonality > 65 degrees : 0 faces with face pyramid volume < 1e-13 : 0 faces with face-decomposition tet quality < 1e-09 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 Finished meshing without any errors Finished meshing in = 124.36 s. Code:
Checking geometry... Overall domain bounding box (5.3814733e-19 0 -0.0066475946) (0.15225495 0.14 0.0066475946) Mesh (non-empty, non-wedge) directions (1 1 0) Mesh (non-empty) directions (1 1 1) Wedge front with angle 2.5 degrees Wedge back with angle 2.5 degrees All edges aligned with or perpendicular to non-empty directions. Boundary openness (-1.0590505e-14 2.3795256e-17 -1.6763499e-14) OK. Max cell openness = 3.05806e-16 OK. Max aspect ratio = 2.3606207 OK. Minimum face area = 1.6186123e-08. Maximum face area = 1.452865e-05. Face area magnitudes OK. Min volume = 1.119024e-11. Max volume = 1.1278445e-08. Total volume = 0.00010219248. Cell volumes OK. Mesh non-orthogonality Max: 18.415707 average: 0.48101389 Non-orthogonality check OK. Face pyramids OK. Max skewness = 0.52872632 OK. Coupled point location match (average 0) OK. Mesh OK. Checking faces in error : Code:
non-orthogonality > 65 degrees : 0 faces with face pyramid volume < 1e-13 : 449174 faces with face-decomposition tet quality < 1e-09 : 1 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 Finished meshing with 449175 illegal faces (concave, zero area or negative cell pyramid volume) Finished meshing in = 1866.35 s. Code:
Checking geometry... Overall domain bounding box (5.3820021e-19 0 -0.0066475946) (0.15225495 0.14 0.0066477546) Mesh (non-empty, non-wedge) directions (1 1 0) Mesh (non-empty) directions (1 1 1) Wedge front with angle 2.5000009 degrees ***Wedge patch front not planar. Point (0.15224642 0.093431519 0.0066477546) is not in patch plane by 5.297356e-07 metre. Boundary openness (-1.7647037e-14 -5.3956546e-17 -3.5254179e-14) OK. Max cell openness = 3.6220384e-16 OK. Max aspect ratio = 2.162554 OK. Minimum face area = 3.0141525e-10. Maximum face area = 9.1604592e-06. Face area magnitudes OK. Min volume = 2.6687307e-14. Max volume = 6.4104203e-09. Total volume = 0.00010219239. Cell volumes OK. Mesh non-orthogonality Max: 19.330951 average: 1.645505 Non-orthogonality check OK. Face pyramids OK. Max skewness = 1.8047799 OK. Coupled point location match (average 0) OK. Failed 1 mesh checks. Please provide me some suggestions. Let me know if you need some other information for understanding. Thank you. Zannatul Last edited by wyldckat; March 28, 2016 at 13:17. Reason: Added [CODE][/CODE] markers |
||
March 28, 2016, 14:10 |
|
#22 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Zannatul: How exactly did you configure the refinement in "snappyHexMeshDict"? I've downloaded the case from Tobi's website, but without specific details of how exactly you modified the "snappyHexMeshDict" file, I'm not sure how to reproduce the problem. As for the refinement region problem, you were too vague I have no idea where the first image is referring to... it's just showing something somewhere. By the way, for mesh inspection, follow these instructions: http://openfoamwiki.net/index.php/FA...is_in_ParaView As for the problem with the wall shear stress, you haven't given enough information on how to reproduce the results that you are getting. My guess is that you're not plotting the values correctly. (And yes, a vague description can lead to a vague answer ) Best regards, Bruno
__________________
|
|
March 28, 2016, 16:30 |
|
#23 | |
New Member
Nila
Join Date: Oct 2014
Posts: 24
Rep Power: 11 |
Quote:
I first apologize for being vague though I did not intended to be! 1. I have attached my case here so that you can see my snappydict file and also you will be able to reproduce it. You will be able to see that the fine level is not covering the whole geometry and also the number of face pyramid volume is very high. If you run checkMesh you can see the wedge face is not planner. 2. For the wall shear stress, I did run the simulation for 400000 iterations (In the case I have attached (zip file), the ncellsbetween level is 6 in the snappydict file, but the simulation I am talking about I used ncellsbetween level as 3 to save simulation time). Then I ran wallShearStress command. Then I extracted the lower wall data from paraview by just checking the lower wall patch. I have attached the .xlsx data of lower wall here as well (I have converted the .csv data to .xlsx beause the previous one is not supported to attach here. The plot was simple. I just plotted the wall shear stress against the points on the lower wall. One thing to mention here is that in my thinking there is no problem in plotting. Because I used this same method earlier for my previous simulations and got expected plot. That is why my guess is that either the iterations should be increased to ensure convergence of the curved surface or the y+ need to be decreased. Because I am using k-omega SST model which needs the y+ to be close to 1. In my case it is up to 5.8! May be I have to add some thin layers around my wedge face to solve this problem. But I do not know how I can do it. Please let me know if you still have any question. Hope this time I am clearer |
||
April 1, 2016, 23:13 |
|
#24 | |
New Member
Nila
Join Date: Oct 2014
Posts: 24
Rep Power: 11 |
Quote:
Did you get a chance to look into my files? I think I have solved my problem. What I have done is that I have changed level 3 feature edge refinement to level 0. And I have added layers. Now my layers are following the curved geometry and the y+ is close to 2. I am going to try to lower it to 1 to get better use of k-w SST. My checkmesh problems (wedge face is not planar) are gone as well . I am hoping for the best that this time I get desired results. I thank you and also Tobi for both of your suggestions. Your experience helped me a lot and gave me courage to work ahead. Zannatul |
||
April 10, 2016, 13:52 |
|
#25 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi Zannatul,
Sorry, I've had a few extremely busy weeks lately and this weekend in particular I had to take a full rest. I don't know when I'll be able to look into this, even though it's on my to-do list. With luck, I'll be able to take a quick look into this next weekend. Best regards, Bruno |
|
April 12, 2016, 04:20 |
|
#26 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hey Bruno & Zannatul,
I checked your case and I am wondering why you use edge refinement instead of surface refinement in that case? There is no need for edge refinement. Use surface refinement and you will be a happy man. If I run your case without modifications, one of the first big problems that occur direct after castellatedMesh is: Code:
Checking initial mesh ... Checking faces in error : non-orthogonality > 65 degrees : 0 faces with face pyramid volume < 1e-13 : 542552 faces with face-decomposition tet quality < 1e-09 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 Detected 542552 illegal faces (concave, zero area or negative cell pyramid volume) After the snap procedure you get a more or less good mesh (related to the stuff you want to do now). Due to the fact that the top feature edges are not 100% aligned with the background mesh (you see this on the refinement levels), sHM will move the points of the cells to the feature edges: Code:
//- Use castellatedMeshControls::features (default = true) explicitFeatureSnap true; Code:
Wedge patch 'front' is not planar. At local face at (0.024330986 0.10652083 0.0010623138) the normal (-0.043619304 0 0.99904823) differs from the average normal (-0.043619413 1.4461252e-09 0.99904822) by 1.1995704e-14 Either correct the patch or split it into planar parts --> FOAM Warning : From function wedgePolyPatch::calcGeometry(PstreamBuffers&) in file meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C at line 72 Corrections features level set to 0 refinementSurfaces set all regions to (2 2) or what ever you want. Front, back is kept to (0 0) And woohooo ... done. Code:
Checking initial mesh ... Checking faces in error : non-orthogonality > 65 degrees : 0 faces with face pyramid volume < 1e-13 : 0 faces with face-decomposition tet quality < 1e-09 : 0 faces with concavity > 80 degrees : 0 faces with skewness > 4 (internal) or 20 (boundary) : 0 faces with interpolation weights (0..1) < 0.02 : 0 faces with volume ratio of neighbour cells < 0.01 : 0 faces with face twist < 0.02 : 0 faces on cells with determinant < 0.001 : 0 Detected 0 illegal faces (concave, zero area or negative cell pyramid volume) Checked initial mesh in = 1.52 s I tried it with my case, and it works perfectly for refinement of (1 1) (see attachment). Using an refinement of (2 2) it is not working directly because you get a bad corner (see attachment). What you have to do here, extrude minZ and not back (you have to check out the patches), and change point of axis in extrudeMeshDict to (0 0 0.003). Finally change the axis to (0 -1 0). Thats it. I hope you will solve this problem now. Additionally Use my case (homepage), set nLevelsBetween... to 5 or 6, set all patches to level (2 2) except axis, front and back. Play around that the corner that is bad become nice. Further hints
Notice, do not start extruding the mesh without a good base mesh after snappyHexMesh.
__________________
Keep foaming, Tobias Holzmann |
|
April 12, 2016, 20:42 |
|
#27 | |
New Member
Nila
Join Date: Oct 2014
Posts: 24
Rep Power: 11 |
Quote:
Thank you so much for your time and effort to look into my files and solving the problem. I am going to follow your suggestions. One question that I want to ask is that usually the meshes should increase gradually. Like the grading should be mostly 1.2. But when we add layers, I have seen in many tutorials that the connection with the farthest layer from wall and snappy levels are more than 1.2. Is it ok for snappy? Thank you again. |
||
October 3, 2016, 00:05 |
|
#28 |
Member
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 10 |
Working on trying out this example to try to debug my problems here:
http://www.cfd-online.com/Forums/ope...tml#post620066 I downloaded the example and had to change wedgeCoeffs to sectorCoeffs. Unfortunately, extrudeMesh is flaking out on: --> FOAM FATAL ERROR: Cannot find patch front in the source mesh. Valid patch names are 8 ( minZ inlet upperWall rightWall outlet lowerWall back axi ) Seems to be due to this in snappyHexMesh: Removing zero-sized patches: maxY type patch at position 0 minX type patch at position 1 maxX type patch at position 2 minY type patch at position 3 maxZ type patch at position 4 front type patch at position 11 I'll look into it more tomorrow... |
|
October 3, 2016, 23:49 |
|
#29 |
Member
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 10 |
Rather than working on the extrude stage, I was more interested in how this test case was managing to avoid errors with snappyHexMesh. Unfortunately, it appears to be that the answer is "by being so oversimplistic":
1) It's meshing the inside of a shape rather than its exterior (or a shape with nested parts) 2) It's meshing a constant even grid and only snapping to the shape rather than allowing for refinement 3) It's not using layer adding. Whenever I try to adapt it to more complicated cases, it breaks down. I'm at my wits end here, I'm literally thinking about taking the output from snappyHexMesh and writing my own program to read it in, parse one face into coherent 2d cells and make a wedge out of them, because I can't see any way forward other than that. |
|
May 31, 2017, 09:41 |
|
#30 | |
New Member
fanchunyong
Join Date: Mar 2017
Posts: 4
Rep Power: 9 |
Quote:
|
||
May 31, 2017, 10:01 |
|
#31 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
To which error you are you relating? I had two mistakes as already given in the posts:
__________________
Keep foaming, Tobias Holzmann |
|
June 5, 2017, 04:10 |
|
#32 | |
New Member
fanchunyong
Join Date: Mar 2017
Posts: 4
Rep Power: 9 |
Quote:
|
||
June 5, 2017, 04:24 |
|
#33 | |
New Member
fanchunyong
Join Date: Mar 2017
Posts: 4
Rep Power: 9 |
Quote:
Last edited by wyldckat; June 25, 2017 at 10:52. Reason: fixed quote markers |
||
June 5, 2017, 05:25 |
|
#34 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Do you get the errors within my tutorial or in your personal case? If it is your personal case, please check out my tutorial first or search in the openfoamwiki. There should be a tutorial too (I am not wrong).
__________________
Keep foaming, Tobias Holzmann |
|
June 5, 2017, 06:40 |
|
#35 |
New Member
fanchunyong
Join Date: Mar 2017
Posts: 4
Rep Power: 9 |
||
September 22, 2017, 03:05 |
2D axisymmetric
|
#36 |
New Member
karundev
Join Date: Jun 2017
Location: India
Posts: 25
Rep Power: 8 |
Hello,
Can anybody share the steps to get a mesh for a 2D axisymmetric case. If i want to make it for a cylinder of dia 2R ? is it like just meshing a face or width R using snappy and rotating it through 1 degree so that I can get 1 cell thickness along Z direction. Thanks in advance |
|
September 22, 2017, 19:45 |
|
#37 |
Member
Anonymouse
Join Date: Dec 2015
Posts: 98
Rep Power: 10 |
I use:
system/extrudeMeshDict FoamFile { version 2.0; format ascii; class dictionary; object extrudeMeshDict; } constructFrom patch; sourceCase "$FOAM_CASE"; sourcePatches (near); exposedPatchName far; flipNormals false; extrudeModel wedge; mergeFaces SEE NOTE BELOW; nLayers 1; expansionRatio 1.0; mergeTol 0.000001; linearDirectionCoeffs { direction (0 0 1); thickness 0.100000; } sectorCoeffs { axisPt (0 0 0); axis (0 1 0); angle 1.000000; } I work with snappyHexMesh to build my slice to spin around an axis, though you probably won't. My setup for the radial case is: blockmesh -> surfaceFeatureExtract -> decomposePar -> snappyHexMesh -> collapseEdges -> extrudeMesh (with mergeFaces true) -> extrudeMesh (with mergeFaces false) -> collapseEdges -> renumberMesh -> mapFields |
|
November 13, 2018, 05:25 |
face is not collapsing to an edge
|
#38 | |
Member
Alberto
Join Date: Sep 2013
Posts: 37
Rep Power: 12 |
Quote:
I am trying to create a wedge starting from a simple block created with blockMesh and suing the extrudeMesh dictionary used in the case "2D Rotational Symmetric Mesh" in your website. The problem I am having is that the face that should become the axis of symmetry is not collapsing to an edge, instead that face becomes part of one of the wedges faces and makes the complete wedge not symmetric (see the pictures). Any ideas what is causing this? This is my blockMeshDict and extrudeMesh files: blockMesh: Code:
vertices ( (-0.01 0 -0.01) ( 0.09 0 -0.01) ( 0.09 0.025 -0.01) (-0.01 0.025 -0.01) (-0.01 0 0.01) ( 0.09 0 0.01) ( 0.09 0.025 0.01) (-0.01 0.025 0.01) ); blocks ( hex (0 1 2 3 4 5 6 7) (300 100 1) simpleGrading (1 1 1) ); edges ( ); boundary ( front { type patch; faces ( (4 5 6 7) ); } back { type patch; faces ( (0 1 2 3) ); } axi { type patch; faces ( (0 1 5 4) ); } ); extrudeMesh: Code:
constructFrom patch; sourceCase "."; sourcePatches (back); exposedPatchName front; flipNormals false; extrudeModel wedge; nLayers 1; expansionRatio 0.002; sectorCoeffs { axisPt (0 0 0); axis (1 0 0); angle 5; // For nLayers=1 assume symmetry so angle/2 on each side } mergeFaces false; //true; mergeTol 1e-6; |
||
November 14, 2018, 02:22 |
|
#39 |
New Member
Tony
Join Date: May 2016
Posts: 22
Rep Power: 9 |
I am running into a similar issue in my thread(no replies just yet): (Using extrudeMesh to create an axisymmetric mesh yields a wrongOrientedFace)
In my case, I've noticed that the axis face is collapsing down to a triangle with 2 of the corners opposite of the rest of the wedge geometry. (found by back-tracking the faces file to the points file) Ex. if my symmetry was along the y axis and the geometry goes along the positive X-axis (z axis for the depth) two of the faces corners are in the -X region with the 3rd on the axis.Unfortunately I am not able to help just yet, but I'll keep looking :/ |
|
November 15, 2018, 08:11 |
wedge with extrudeMesh problems
|
#40 |
Member
Alberto
Join Date: Sep 2013
Posts: 37
Rep Power: 12 |
Changing sourcePatches from (front) to (back) solved the problem of the non-symmetric final geometry (symmetry plane was not collapsing to an edge), but I can not solve the warnings and errors of checkMesh.
Code:
--> FOAM Warning : From function virtual void Foam::wedgePolyPatch::calcGeometry(Foam::PstreamBuffers&) in file meshes/polyMesh/polyPatches/constraint/wedge/wedgePolyPatch.C at line 70 Wedge patch 'back' is not planar. At local face at (0.032436500978669881301 0.0086712994579358493308 0.00037859711274703408777) the normal (3.4756075755086737744e-008 -0.043619419342796700301 0.99904822018569061637) differs from the average normal (-9.4556952460451980674e-011 -0.043619387107251821056 0.99904822159304018658) by 2.2556775865909222576e-015 Either correct the patch or split it into planar parts Anybody else know other way (within OpenFOAM) to create the wedge? |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how to set periodic boundary conditions | Ganesh | FLUENT | 15 | November 18, 2020 06:09 |
[snappyHexMesh] snappyHexMesh does not create any mesh except one for the reference cell | Arman_N | OpenFOAM Meshing & Mesh Conversion | 1 | May 20, 2019 17:16 |
[snappyHexMesh] snappyHexMesh - geometry does not appear in Mesh | czhongrong | OpenFOAM Meshing & Mesh Conversion | 1 | January 20, 2016 05:26 |
3D Hybrid Mesh Errors | DarrenC | ANSYS Meshing & Geometry | 11 | August 5, 2013 06:42 |
Fluid-Structure-Interaction on wedge mesh | WiWo | OpenFOAM | 6 | March 6, 2010 07:18 |