|
[Sponsors] |
July 24, 2014, 09:04 |
Algorithm parameters in cfMesh
|
#1 |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
Hi all,
I found out about cfMesh at the 9th OpenFOAM workshop in Zagreb and have been trying to use it for my meshing purposes. I'm not entirely sure whether it counts as a native mesher, but since it is based on the FOAM libraries, I'll assume that this post is in the correct forum. I've been using cartesianMesh to generate hex-dominant meshes in various regions of pressurized water reactors (PWRs). My initial impression is that the application does a really good job and I'm quite happy with the resulting meshes. One particular issue that I've come across is that the mesher sometimes does unexpected things when adding in boundary layers. I've found that often inlet and outlet patches simply get treated as walls and boundary layers are added to these (see the attached figure). After a lot of playing around I think I've narrowed down the cause; Sometimes the mesher doesn't quite capture the feature edges properly (see circled region in attached figure) and I think this prevents the mesher from adding the boundary layers properly. So the question I have is, how do I adjust the mesher parameters to make sure it captures the features properly. I think many of the algorithm parameters (max number of iterations, etc.) are hardcoded and I'm trying to avoid making changes to the underlying sources. A separate question I have is; how do you adjust the growth rate of the generated mesh? Any suggestions would be welcome. Thanks Ivor Last edited by cliffoi; July 24, 2014 at 13:25. |
|
July 24, 2014, 18:48 |
|
#2 |
Senior Member
|
Hello Ivor,
cfMesh library is based on OpenFOAM, and I hope that others will also agree that it is the right forum for your post. Boundary layers in cfMesh are governed by the following rules: 1. A single layer can exit at the surface of the mesh only at convex edges. Therefore, a single layer is extended over all patches which hare a concave edge, or in case the surface of the volume mesh is tangled at a feature edge. 2. If you have corners with valence greater than three this also forces generation of a single layer over all patches at that corner. Re meshing parameters, the best thing you can do is to adjust the refinement settings of the template, such that it fits the geometry as good as possible. If you switch a debug flag in cfMesh/eshLibrary/cartesianMesh/cartesianMeshGenerator/cartesianMeshGenerator.C you can write the mesh after each step, and monitor what is going on. In addition, it is desirable to specify cell sizes smaller then the feature size, especially near feature edges. Otherwise, there is no guarantee that you will get what you want. Growth rate is controlled by a criterion that every cartesian cell must not have a neighbour which differs by more than one refinement level, and it happens at the closest distance from the refinement source. I hope that this is the right answer to your question? Do you have additional requirement in mind? Kind Regards, Franjo |
|
July 25, 2014, 04:29 |
|
#3 |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
Thanks for the information Franjo. I now understand the problem I'm encountering, that the edge where I want the boundary layer to exit is tangled; and the best way to correct this is simply to play with the refinement settings and mesh sizes until it works correctly. I've noticed that cfMesh performs untangling iterations during the meshing process. Will adjusting anything here (number of iterations, etc.) help?
Regarding the growth rate, I have found that 90% of my mesh takes on the maximum cell size because the refinement is very localized at the walls. Having the ability to adjust the criterion (e.g. every neighbour's neighbour cannot differ by more than one refinement level, or even to set some flexible parameter to adjust the growth rate) would certainly be a useful feature. Best Regards Ivor |
|
July 25, 2014, 18:01 |
|
#4 | |
Senior Member
|
Hello Ivor,
Quote:
The growth rate feature is added into my backlog. It will be available in the upcoming releases. Kind Regards, Franjo |
||
July 30, 2014, 09:41 |
|
#5 |
Member
Ivor Clifford
Join Date: Mar 2009
Location: Switzerland
Posts: 94
Rep Power: 17 |
Hi Franjo,
I tried playing with some of the basic iteration parameters and I agree the current combination does seem to give the best results... or at least I didn't get much improvement by adjusting them. My big concern is that even a single tangled face on a feature edge can prevent the boundary layers from being added correctly... and the knowledge that you have bad features in your mesh doesn't exactly inspire confidence in the solution. I've tried adjusting the sizes and refinement levels in the input dictionary and I always seem to get a few bad spots in the mesh, albeit in slightly different places each time. Most often it's on the corners of curved (cylindrical) features. A recommendation I have is to add an option for the mesher to halt with an error if it is unable to resolve all the tangled edges, rather than simply smoothing the unresolved faces. A faceSet or pointSet containing the affected faces or nodes would also be useful to track down problematic areas. Best Regards Ivor |
|
July 31, 2014, 04:42 |
|
#6 |
New Member
Jan
Join Date: Jun 2010
Location: Erlangen, Germany
Posts: 3
Rep Power: 16 |
Hi all,
I also tried cfMesh and it produces nice meshes for our single-region cases. Is it also possible to use cfMesh to generate multiregion-meshes? Best regards, Jan |
|
July 31, 2014, 05:11 |
Multi-region meshes
|
#7 | |
Senior Member
|
Hello Jan,
Quote:
Kind Regards, Franjo |
||
July 31, 2014, 06:11 |
|
#8 |
New Member
Jan
Join Date: Jun 2010
Location: Erlangen, Germany
Posts: 3
Rep Power: 16 |
||
May 13, 2016, 09:18 |
|
#9 |
New Member
Join Date: Mar 2015
Posts: 12
Rep Power: 11 |
Is such a feature already developed and is there a tutorial available for this?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pro/E to ANSYS Parameterization Guide | Trues | ANSYS | 4 | April 18, 2018 06:52 |
[OpenFOAM] Paraview 3.98 - errors when saving geometry file | pajot | ParaView | 1 | September 28, 2013 11:45 |
Parameters rhoSimpleFoam | marcus85 | OpenFOAM Pre-Processing | 0 | May 15, 2013 10:36 |
Turbulence model parameters and equations | Maximus91 | Main CFD Forum | 1 | October 24, 2012 14:20 |
Parameters for multigrid solver | HaZe | OpenFOAM Running, Solving & CFD | 3 | January 28, 2012 03:05 |