|
[Sponsors] |
Geometry preparation, snappyhexmesh, OpenFOAM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 10, 2020, 19:02 |
Geometry preparation, snappyhexmesh, OpenFOAM
|
#1 |
Member
Nikhil
Join Date: May 2020
Location: Freiburg
Posts: 43
Rep Power: 6 |
I have a leak source in a box, which has an outlet. From the leak source a gas releases and mixes with the air inside the box first, then it comes out into the atmosphere outside through an outlet from the box and gets influenced by parameters like turbulence.
So, here I want to consider the flow domain inside the box and also the flow domain outside the box. When I use snappy hex it removes one of the regions when I use the seeding point feature with it, then I am unable to define patches for the box. I tried setSet and toposet, with that I am able to extract the fluid domains of both inside and outside of the box, but I am unable to select and define box walls as walls and a part of the box as an outlet. So, I thought to break the case into 2 parts namely 1. Leak inside the box 2. Leak coming from box to outside environment. Solve the fluxes individually and couple them (output from 1st case acts as input to 2nd case). Is there any other way to do this, I think I am just complicating the case? Please have a look at the figure. Any kind of help would be appreciated. Thank you. Last edited by nikhil108; June 10, 2020 at 19:04. Reason: Adding image |
|
June 23, 2020, 10:11 |
|
#2 |
New Member
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 6 |
Hi,
If I understand your question correctly, you want to perform a multi-region simulation on two regions, "leakSource" and "airBox", coupled through one single patch, "leakOutlet". Regarding the mesh generation step, you should, 1) use sHM to create cellZones. Code:
snappyHexMesh -overwrite Code:
cellSet computationalDomain new zoneToCell airBox cellSet computationalDomain add zoneToCell leakSource cellSet computationalDomain subset subsetMesh -overwrite computationalDomain Code:
splitMeshRegions -cellZones -overwrite 4) use a combination of topoSet and createPatch for each mesh region separatly to create your desired patches. The following link shares a test case, not exactly but similar to the image that you have posted, which demonstrates these steps in action (please note that I have used OpenFoam-5.x to create and run the case): patchMultiRegion_case All the steps can be found in "run" bash script. Dictionaries for topoSet and createPatch are stored in separate folders in "system/topoSet" and "system/createPatch". Please let me know if you have any questions/comments! Cheers |
|
June 23, 2020, 14:10 |
|
#3 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25 |
No, you can if you so desire run snappy in multi-region mode, which will give both volumes simultaneously. However, IMO, this is quite limited as you cannot use layer generation in this mode.
Personally for multi-region models I prefer the method you propose, but instead of using two cases still use two regions that you just mesh independently. Then couple the boundary with a cyclicAMI patch. |
|
June 25, 2020, 11:14 |
create Baffle with stl
|
#4 |
Member
Nikhil
Join Date: May 2020
Location: Freiburg
Posts: 43
Rep Power: 6 |
Hallo Rango,
Thaks for your detailed explanation. But, i did the samething using setSet. When i use splitMesh, it splits all my boundary conditions too (ofcourse), which i don't want. Because the properties of the regions are same. So i only need to find a way to create a wall with the stl (small box_inside_stl), so that the gas which leaks inside, only comes from the outlet of inside stl. So, i created a empty box (empty inside, contains only shape of wall), and used seeding option in snappyhex, which left me with the regions i want. To make it further simpler, as the thickness of the walls is not concerned, i am created a baffle with the inside_stl file i have, and defined it as wall. After that i used toposet (nearestPointToCell) and gave a leak_source. Everything works fine now. Thanks for the help (@Rango, @me3840) |
|
Tags |
geometry preparation, openfoam, setset, snappyhex, toposet |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Map of the OpenFOAM Forum - Understanding where to post your questions! | wyldckat | OpenFOAM | 10 | September 2, 2021 06:29 |
How to build complex geometry in openfoam? | Mark JIN | OpenFOAM | 4 | September 18, 2016 09:38 |
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 | cfd.direct | OpenFOAM Announcements from Other Sources | 2 | August 31, 2015 14:36 |
Geometry in OpenFoam | Mirage12 | OpenFOAM Pre-Processing | 3 | May 24, 2013 01:11 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 04:52 |