|
[Sponsors] |
[cfMesh] getting rid of some non-orthogonal cells |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 6, 2015, 03:08 |
getting rid of some non-orthogonal cells
|
#1 | |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 18 |
I'm currently trying to create a mesh for a complicated geometry. snappyHexMesh didn't work for me so far, because I couldn't manage to create a watertight geometry from CAD while still preserving single surfaces. This results in it not being able to determine the inside of the geometry.
cfMesh works much better here, and captures the geometry of the STL file, however I'm getting some low-quality cells close to the surfaces of the STL. Here's the relevant checkMesh output: Quote:
Is it possible to use the mesh from cfMesh as input for snappyHexMesh, and have it perform only the snapping stage (since it fails in the first stage for my STL file)? I tried to enable only snapping in snappyHexMeshDict, but the resulting mesh was the same as the input mesh. Also, what schemes are best when most of the cells are very much orthogonal, but some are highly non-orthogonal, like in this case? |
||
January 12, 2015, 09:00 |
|
#2 |
Senior Member
|
Currently, there are are not any options to specify mesh quality criteria; they are hard-coded. In meshOptimizer.C you can find functions findBadFaces and findLowQualityFaces where you can play with the tolerances, and add/remove mesh checks. I am curious to find out whether you will get better results by playing with the quality tolerances. If so, it is not a problem to enable those settings in meshDict.
I have never tried to use the mesh from cfMesh as a starting mesh for snappy. The snapping stage shall not change the mesh because it is already constrained to the input geometry. What is the difference after the smoothing stage? Non-orthogonality and skewness do not cause problems in regions where the solution is fairly uniform. You can also use the limited scheme, which ensures that the contribution from the non-orthogonal part does not exceed the contribution from the orthogonal part. Skewness could cause any you convergence problems if you use skew corrected schemes. The best way to resolve your dilemma is to try various schemes, and check which one works best for your particular problem. |
|
January 13, 2015, 12:14 |
|
#3 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 18 |
I haven't done any further tests yet, as I'm currently running a fairly coarse mesh for my problem with ~500k cells, which already takes long enough on a single machine...I hope I can get access to better machines in the near future
Unfortunately my problems contain very large gradients in temperature and in pressure which can/will be present in most of the mesh, so mesh errors can result in a rather large error for me. |
|
January 27, 2015, 13:34 |
|
#4 |
Senior Member
James
Join Date: May 2013
Posts: 116
Rep Power: 12 |
First of all thank you Franjo for this amazing tool. It seems it is going to replace snappyHexMesh in my daily job...
Your tool preserves the shape of the stl geometry in an amazing manner, I have not seen something similar in GNU software using hexaedral dominant meshes so congratulations for this. I have some questions I would like to ask: 1. As Chriss85 said, I obtain some non orthogonal faces, but I guess they are needed in order to preserve the features. I am meshing very complex geometries and at some point you have to choose: preserve geometry features or obtain a very orthogonal mesh. Both things at the same time looks quite difficult. This is only a guess. What do you thing based on your experience? In this sense, I thing that nonOrthogonalCorrectors could help with the accuraccy of that kind of meshes (but simulation will become slow) 2. When cell size is bigger than it should be, I have found some undesired holes in the geometry. How can I prevent this? It seems to happen in places where thickness between parts is very small (for example an strecthed cylinder with an elongation in the middle) 3. I started using cfMesh because I cannot create a full wall layer coverage near walls. snappy always collapse it in some place, no matter the featureAngle you use (at less in my trials). I tried to get it using cfMesh and results are going better, but sometimes layers collapse or first layer height varies with consequent variation of yplus values for turbulent simulations. I attach a couple of images and my dictionary for one of my geometries. How can I avoid this problem? Is t possible to get full layer coverage in complex geometries using cfMesh? In summary, I can mesh my geometry preserving all the features (when cell count is enough), but I'll continue fighting with layers for turbulent simulations. Any help will be really much aprecciated. Thanks everyone and congratulations again for contributing with such an amazing tool like cfmesh to the open source community. Regards, Tensi |
|
January 29, 2015, 02:40 |
|
#5 | ||||
Senior Member
|
Hi Tensi,
Thank you for kind review. There are a few things you can try to solve your problems, and you can find them below. Quote:
Quote:
1. Use keepCellsIntersectingBoundary - by default, the mesher uses only the cells that are completely inside the boundary. By using this option, it also uses the cells intersected by the geometry, and this helps in thin regions. This is global option applied everywhere in the mesh. By looking at the geometry posted here, it seems to me that this options could solve your problems. 2. keepCellsIntersectingPatches - you can specify the patches/subsets where you want to use the intersected cells, too. There is more on how to use these options in the manual. Quote:
Regarding the boundary layer thickness, please avoid doing local refinement where you want the layer thickness to be as constant as possible. We plan to release new features improving the boundary layer quality with the next release. Quote:
Regards, Franjo |
|||||
May 22, 2015, 05:50 |
|
#6 |
Senior Member
James
Join Date: May 2013
Posts: 116
Rep Power: 12 |
Hi Franjo,
I still have some problems regarding layer addition and mesh quality. I have a quite complex geometry, but I am sure with the right setting cfMesh could do a good job here... Could you please have a look at my geometry and my meshDict settings? This is for my Phd thesis and I should not redistribute it,but it is clear I need some help... If you agree I can send it to you via email... Regards, Tensian |
|
May 26, 2015, 07:11 |
Holes in the mesh
|
#7 |
Senior Member
|
Hi Tensian,
I cannot see anything wrong the in meshDict. The holes in the figures are a consequence of insufficient mesh resolution, and the mesher cannot put a single cell there. Yes, feel free to send me an e-mail or PM. Regards, Franjo
__________________
Principal Developer of cfMesh and CF-MESH+ www.cfmesh.com Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram |
|
November 5, 2015, 11:31 |
|
#8 | |
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hello together,
in general I think that cfMesh can become a very good meshing tool. But until now I am facing some mesh quality issues in my complex geometries with a lot of steps, curvatures and interior mixing elements. I always find the bad quality near by those steps where the fine mesh from the wall is starting to pass over to the coarser mesh in the bulk flow. Especially the face tet errors are an issue for me, because I would like to use lagrangian models. A compressible gas flow worked also the mesh quality was bad see checkMesh -allGeometry output below: Quote:
Kind regards Chrisi |
||
November 5, 2015, 16:20 |
|
#9 | ||
Senior Member
|
Hi,
Quote:
Quote:
Regards, Franjo
__________________
Principal Developer of cfMesh and CF-MESH+ www.cfmesh.com Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram |
|||
November 10, 2015, 01:49 |
|
#10 | |
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hello Franjo,
thanks for your hints! I tried to increase the refinement thickness, but it did not improve the quality significantly. During cartesian Meshing I am facing a lot of warnings like that: Quote:
Thanks in advance for your support! Kind regards Chrisi |
||
November 10, 2015, 03:08 |
|
#11 | |
Senior Member
|
Hi,
Quote:
The code in the findBadFaces function looks like this: label findBadFaces( constpolyMeshGen&mesh, labelHashSet&badFaces, constboolreport, constboolList*activeFacePtr ) { badFaces.clear(); polyMeshGenChecks::checkFacePyramids ( mesh, report, VSMALL, &badFaces, activeFacePtr ); polyMeshGenChecks::checkFaceFlatness ( mesh, report, 0.8, &badFaces, activeFacePtr ); polyMeshGenChecks::checkCellPartTetrahedra ( mesh, report, VSMALL, &badFaces, activeFacePtr ); polyMeshGenChecks::checkFaceAreas ( mesh, report, VSMALL, &badFaces, activeFacePtr ); const label nBadFaces = returnReduce(badFaces.size(),sumOp<label>()); return nBadFaces; } The check for face tets does not exist yet, and you have to implement it in polyMeshGenChecks and use in the findBadFaces function. Regards, Franjo
__________________
Principal Developer of cfMesh and CF-MESH+ www.cfmesh.com Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram |
||
December 28, 2015, 13:48 |
|
#12 | |
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hello Franjo,
thanks for your hint. In the meanwhile I checked your code. And I think the code snipet Quote:
Kind regards Chrisi |
||
December 29, 2015, 05:40 |
|
#13 | |
Senior Member
|
Hi,
Quote:
I hope this helps a bit. Regards, Franjo
__________________
Principal Developer of cfMesh and CF-MESH+ www.cfmesh.com Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram |
||
December 29, 2015, 14:08 |
|
#14 |
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hello Franjo,
I tried your tip and created the mesh in binary format. But it did not change anything. Kind regards Chrisi |
|
January 1, 2016, 16:21 |
|
#15 | |
Senior Member
|
Hello Crissi,
Quote:
1. Finding out locations that initiate convergence problems. What types of cells are present there? 2. Checkout task-qualityControls from the repository and try to play with quality controls to find out the necessary quality criteria for your simulations. An example of the dictionary for quality controls is: meshQualitySettings { maxNonOrthogonality 65.0; maxSkewness 2.0; fcUniform 0.1; volUniform 0.1; maxAngle 10; minTetQuality 0.001; minFaceTwist 0.1; minCellDeterminant 1e-15; minVolRatio 0.1; minFaceTriangleTwist 0.1; minPyramidVolume 1e-15; minimumFaceArea 1e-15; faceFlatness 0.001; minCellPartTetrahedra 1e-15; } Let me know if you can find quality criteria that solve your problem. I wish you a happy 2016. Regards, Franjo
__________________
Principal Developer of cfMesh and CF-MESH+ www.cfmesh.com Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram |
||
January 2, 2016, 16:01 |
|
#16 |
Senior Member
Join Date: Jan 2010
Location: Stuttgart
Posts: 150
Rep Power: 16 |
Hi Franjo,
thanks for your answer! I am using the following easy test case: https://www.dropbox.com/s/1rvsatwi7b...ng.tar.gz?dl=0 The simulation with simpleFoam is going fine with the mesh resulting with cfMeshing. Anyhow due to the "FaceTet" errors it is not possible to do lagrangian particle tracking with the mesh. As long as one parcel reaches a broken face tet the simulation crashs. So my goal is to generate a mesh without "FaceTet" error to enable the option for reliable partickle tracking (without significant increase in number of cells). Currently the "FaceTet" errors are at the corners of the buildings inside the boundary layer cells. The cells there are doing some kind of zigzag there. (see pictures) Maybe you have a good idea how to overcome that problem with cfMesh. Kind regards and thanks in advance Chrisi |
|
January 25, 2016, 05:41 |
Small Determinant Issue!!
|
#17 |
New Member
ravi
Join Date: Nov 2013
Posts: 10
Rep Power: 12 |
Hi all. I am new to Openfoam. I have a question regarding mesh conversion. Few cells are shown as underdeterminedcells, oneinternalfacecells and twointernalfacescells. Does these affect the convergence? If so, what steps to be taken to avoid?
What are the important factors should be considered inorder to prepare the mesh for solving? ---------------------------------------------------------------------------------------------------------------- Create time --> FOAM Warning : From function checkMesh in file db/Time/timeSelector.C at line 262 No time specified or available, selecting 'constant' Create polyMesh for time = constant Enabling all (cell, face, edge, point) topology checks. Enabling all geometry checks. Time = constant Mesh stats points: 359617 faces: 3779338 internal faces: 3595206 cells: 1843636 faces per cell: 4 boundary patches: 7 point zones: 0 face zones: 1 cell zones: 1 Overall number of cells of each type: hexahedra: 0 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 1843636 polyhedra: 0 Checking topology... Boundary definition OK. Cell to face addressing OK. Point usage OK. Upper triangular ordering OK. Face vertices OK. Topological cell zip-up check OK. Face-face connectivity OK. <<Writing 1 cells with zero or one non-boundary face to set oneInternalFaceCells <<Writing 1516 cells with two non-boundary faces to set twoInternalFacesCells Number of regions: 1 (OK). Checking patch topology for multiply connected surfaces... Patch Faces Points Surface topology Bounding box CP 159518 81869 ok (non-closed singly connected) (-2.30979 -3.022 -0.132) (1.8 1.87533 0.603) OUTFLOW 2121 1163 ok (non-closed singly connected) (1.8 -3.022 -0.132) (1.8 -1.022 0.603) SP_INFLOW 5637 3180 ok (non-closed singly connected) (-1.135 -1.13497 0) (1.135 1.135 0.203) CP_ROTWALL 7219 3917 ok (non-closed singly connected) (-1.135 -1.13481 0.203) (1.135 1.13491 0.3685) BP_ROTWALL 5819 3084 ok (non-closed singly connected) (-1.135 -1.13494 -0.132) (1.135 1.13488 0) CP_1 852 852 ok (non-closed singly connected) (-0.807087 -0.806937 0.49) (0.807087 0.806998 0.494288) CP_2 2966 2946 ok (non-closed singly connected) (-0.7095 -0.709496 0.423) (0.7095 0.709474 0.423) Checking geometry... Overall domain bounding box (-2.30979 -3.022 -0.132) (1.8 1.87533 0.603) Mesh (non-empty, non-wedge) directions (1 1 1) Mesh (non-empty) directions (1 1 1) Boundary openness (4.52524e-16 1.40479e-17 -2.41232e-16) OK. Max cell openness = 3.00648e-16 OK. Max aspect ratio = 4.44302 OK. Minimum face area = 1.04445e-06. Maximum face area = 0.00714492. Face area magnitudes OK. Min volume = 5.13633e-10. Max volume = 0.000224605. Total volume = 9.51851. Cell volumes OK. Mesh non-orthogonality Max: 51.9268 average: 15.4992 Non-orthogonality check OK. Face pyramids OK. Max skewness = 0.580947 OK. Coupled point location match (average 0) OK. Face tets OK. Min/max edge length = 0.00130362 0.15313 OK. All angles in faces OK. All face flatness OK. Cell determinant (wellposedness) : minimum: 0 average: 1.54426 ***Cells with small determinant (< 0.001) found, number of cells: 1517 <<Writing 1517 under-determined cells to set underdeterminedCells Concave cell check OK. Face interpolation weight : minimum: 0.182167 average: 0.440596 Face interpolation weight check OK. Face volume ratio : minimum: 0.222744 average: 0.800779 Face volume ratio check OK. Failed 1 mesh checks. ----- |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] snappyHexMesh does not remove internal cells | Binglian Hu | OpenFOAM Meshing & Mesh Conversion | 16 | June 3, 2021 09:38 |
[snappyHexMesh] Number of cells in mesh don't match with size of cellLevel | colinB | OpenFOAM Meshing & Mesh Conversion | 14 | December 12, 2018 08:07 |
[blockMesh] Create internal faces as patch in blockMesh | m.delta68 | OpenFOAM Meshing & Mesh Conversion | 14 | July 12, 2018 14:43 |
[snappyHexMesh] sHM too many cells | Knapsack | OpenFOAM Meshing & Mesh Conversion | 2 | July 8, 2017 07:41 |
[snappyHexMesh] sHM layer process keeps getting killed | MBttR | OpenFOAM Meshing & Mesh Conversion | 4 | August 15, 2016 03:21 |