Automated transitions in blockMesh?
1 Attachment(s)
Hiya!
Owing to the limited memory on this machine, I am being forced to use more elegant meshing techniques than what I would like to do. Probably a good thing in the long run, but for now a bit of a pain. What I'm wondering for the moment is if there is a way of automatically defining some sort of transition from a fine mesh to a coarse one that allows one to build a transition region that is then compatible with snappyHexMesh? The attached image illustrates (in a very invalid way, I know) roughly what I am trying to go from and to. I can see how to do this manually, but I'm thinking that this must be a feature somewhere... |
Quote:
|
Nah, not misreading it at all, but that's (more or less) the process I'm trying to avoid if at all possible. In other words, what you have described is what I would call a manual refinement.
|
There might be something in pyFoam, but what is pyFoam other than a scripting language wrapped around a programming language (its the "Inception" of CFD programs [not sure if you are familiar with that film]). You could make it so that at least you can set the number of regions and extent as input parameters. Almost makes me want to do it myself. ALMOST.
That said, save any scripts you make for the future. Every now and again I find myself wishing I hadn't thrown away a snippet of code/script/utility because I thought I would "never use it again". Now I keep a sort of "junk drawer" full of that kind of stuff that at best gives me exactly what I need, and at the very least inspires my though process. |
mergePatchPairs is the key! Except it doesn't seem to deal with corners very well...
I've attached an un-commented version of my my blockMeshDict file so you can see what I'm talking about. Basically, if I comment out some of the patch pairs in such a manner that no merging is happening on adjacent faces, it works fine. The end result is useless of course, but the fact remains that the merging works. So, what I'm wondering at this point is if there is something I can do to get faces to merge around corners like I'm trying to do here? I'm thinking I'm probably going to have to take a different strategy altogether, but we'll see... Thanks in advance for any help! Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
OK, I still would like to know why the above patching problem fails in general, but I saw after posting that the concept I posted above would fail for two primary reasons:
- snappyHexMesh requires hexahedron elements only, and the above merging has to break this constraint. - snappyHexMesh (more or less) requires that all the cells in the initial mesh have an aspect ratio somewhere around unity, which again will the above merging technique will break. For future reference, what has worked is that I have had to break up the initial parts into sub-parts in a manner that corresponds to where the mesh refinement levels are required, with the interfaces defined as patch regions. One can then use snappyHexMesh to mesh all of the "oddball" shapes one at a time, and then glue the parts back together via mergeMeshs and stitchMesh. |
All times are GMT -4. The time now is 08:31. |