|
[Sponsors] |
[snappyHexMesh] snappyHexMesh for chtMultiRegionFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 29, 2019, 06:20 |
snappyHexMesh for chtMultiRegionFoam
|
#1 |
New Member
Thomas Heßling
Join Date: Mar 2019
Posts: 4
Rep Power: 7 |
Hello,
I am trying to run some chtMultiRegionFoam simulations with heat transfer between an air flow in an insulated duct. To get familiar with the setup I started with a simple rectangular geometry but it will get more complicated, that's why I use snappyHexMesh. The basic setup is taken from the heatedDuct tutorial case. My problem is that sometimes the temperature starts to diverge at certain mesh positions, so I guess I need a better mesh. With the heatedDuct tutorial setup the mesh doesn't look to good, as you can see in the first image. It is asymmetric and the edges show some artefacts as well. When I try to add layers they are created in the solid domain, not the fluid as they are supposed to. The full case is attached. When searching this forum and googling I found a comment that when meshing multi regions one should have a single STL file for every region. The tutorial case is set up differently with all external surfaces in a single file and the interfaces/baffles in a separate one. When I try the one-stl-per-region setup I get a different problem. First, I noticed that I cannot have the coincident interface in both STL files, it will lead to errors in the faceZones. Removing it from one file fixes this but even then SHM removes all boundary faces in the end. They appear to be recognized correctly in the logs by I cannot get them to last. This case is also attached. Since I couldn't solve this on my own with this forum and other documentation I'd like to ask some questions here: What is the preferred/correct way to set up snappyHexMesh with multi region cases? Why does SHM add the layers in the solid domain in my first example, can this be changed? Why does SHM remove by boundaries in the second case? They are defined the same way as in the first case. Are there any tips on how I can improve the mesh quality? I am quite new to OpenFOAM and right now don't know how to proceed on these problems. Any help is appreciated! Thanks a lot, Thomas |
|
September 4, 2019, 04:09 |
|
#2 |
New Member
Thomas Heßling
Join Date: Mar 2019
Posts: 4
Rep Power: 7 |
I've managed to make some progress and create a mesh with correct layers. Maybe someone else finds this useful. I had to create one STL file with all external surfaces of the mesh and one for each baffle between solid and fluid region. I also need to set the default cellZone to fluid in blockMeshDict.
Getting the layers is a bit tricky, there's is an example available at https://holzmann-cfd.com. Initially you run SHM with only "castellatedMesh" and "snap" set to true. Then you run splitMeshRegions and manually copy the fluid region's polyMesh folder to constant/polyMesh. With this SHM is run again with only "addLayers" and the resulting polyMesh is copied back to constant/fluid/polyMesh. It's a bit cumbersome but works. The simulation still diverges, though, but I suppose that's a different problem... Last edited by Tobi; June 24, 2020 at 13:05. |
|
September 4, 2019, 06:37 |
|
#3 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
Hi!
Using the snappyHexMesh from ESI group (v17xx, v18x0, v19xx), you are able to define locationsInMesh, so an inside point for every region. Thus you don't need that tricky stl generation. Also you can add layers on faceZone, for example on fluid_to_solid, but it is better (I think) if you decompose your case into regions as you did, and you can use the switch like snappyHexMesh -region "regionName", and it'll read the system/"regionName"/snappyHexMeshDict file. So you don't need that trick with the mesh copy... Also in parallel case it would be a nightmare what you did. |
|
September 5, 2019, 09:09 |
|
#4 |
New Member
Thomas Heßling
Join Date: Mar 2019
Posts: 4
Rep Power: 7 |
Thank you for your suggestions! I wasn't aware that there are different SHM versions in the OpenFOAM distributions. I will try the ESI version, the -region option will make things a lot easier.
|
|
September 5, 2019, 09:16 |
|
#5 |
Senior Member
anonymous
Join Date: Jan 2016
Posts: 416
Rep Power: 14 |
The -region is working in the foundation version too i think. But the locationsInMesh not.
|
|
September 5, 2019, 09:22 |
|
#6 |
New Member
Thomas Heßling
Join Date: Mar 2019
Posts: 4
Rep Power: 7 |
SHM from the latest OpenFOAM 7 release unfortunately does not recognize the -region option. Installation of OpenFOAM 1906 is already in progress ;-)
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[CAD formats] Creating waterproof STL using snappyHexMesh or salome | Tobi | OpenFOAM Meshing & Mesh Conversion | 58 | May 13, 2020 07:01 |
[snappyHexMesh] Running snappyHexMesh in parallel - optimizing | peterhess | OpenFOAM Meshing & Mesh Conversion | 2 | January 3, 2018 03:54 |
[snappyHexMesh] Tutorial crashes: snappyHexMesh floating point exception. | jasv | OpenFOAM Meshing & Mesh Conversion | 4 | May 10, 2016 03:55 |
Strange Results With snappyHexMesh | calebamiles | OpenFOAM Running, Solving & CFD | 0 | August 14, 2011 17:02 |
[snappyHexMesh] stitchMesh and snappyHexMesh | gdbaldw | OpenFOAM Meshing & Mesh Conversion | 0 | December 23, 2009 03:09 |