|
[Sponsors] |
February 16, 2016, 11:33 |
New checkAspectRatio Utility
|
#1 |
Member
Timm Severin
Join Date: Mar 2014
Location: Munich
Posts: 63
Rep Power: 12 |
Servus everyone,
lately I have been running some simulations with interFoam, in which very thin layers of fluid () in an inclined channel are involved. As it turns out, (at least) interFoam does not like meshs with aspect ratios above a certain value (about 3), or where neighbouring cells are much bigger (probably not only interFoam's problem). Since I stumbled upon the same problems, I decided to write a small tool to quickly (and may dirty) fix these problems: The utility attached can:
Either it prints "Mesh OK", or it will return a number of cellSets, namely (x|y|z)AspectCells and (x|y|z)NeighbourCells, wherein the first store the cells with a too high aspect ratio in the respective direction, and the latter to large ratios between neighbouring cells. Process example for my channel: steps-1.png steps-2.png 0: Original mesh, refined using refineWallLayerSadly it is an iterative process, since you always have to reselect a cellSet after the mesh has been changed, however the order of above stesps basically is irrelevant. As an example of the results for my channel, it has changed the solution from the left (unrefined, 40550) picture to the right version (166500 cells). This process is probably far from optimal, but in my case it was right now the fastest way to solve the problem, and 166k cells is not too much: comparison.jpg I don't know if this tool really is useful, but I thought I'd share it. Just wmake all it, and it should work (tested in OF 2.3.x). And I'd appricate if you let me know if you can use this, or if you have any further ideas/find bugs. Finally, here is a list of references, where I copied the code from and where I got some ideas/numbers: Reason for this: Jon Elvar WallevikCreating cellSets: Tomislav MaricFinding neighbours: Su JunweiDetermining the (approximate) size of cell Niels Gjoel Jacobsen--- Sorry I left out the axis, I had to edit the pictures a bit. the axis directions are: x: gropund to the right |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OF 6 wallHeatFlux utility not working on chtMultiRegionFoam tutorial | troparry | OpenFOAM Post-Processing | 1 | January 10, 2022 06:12 |
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field | lakeat | OpenFOAM Community Contributions | 58 | December 23, 2021 02:36 |
wallHeatFlux Calculation wrt utility version | ahmet | OpenFOAM Post-Processing | 1 | December 18, 2016 19:45 |
[mesh manipulation] mirrorMesh utility preserving regions | zfaraday | OpenFOAM Meshing & Mesh Conversion | 1 | November 7, 2016 21:51 |
Something doens't work with wallHeatFlux utility or externalWallHeatFluxTemperat BC!! | zfaraday | OpenFOAM Post-Processing | 0 | February 5, 2015 16:47 |