pasai |
March 8, 2024 01:17 |
Not able to create interface using Gmsh
Hello Foamers
I have been trying to create a multi-region simulation that consists of inner walls and baffles. I am using Gmsh and after creating my 3D mesh with desired volumes and surfaces, when I import it in openFoam (by converting the mesh) and split the mesh into regions, I only get the outside wall as an interface but the inner baffles are not present/recognized.
Here's the 2D drawing of my test case:
Code:
------------------------------
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | |
| | Water | |
| ------------------ |
| Soil |
------------------------------
A 3D volume named "water" (Vol1), is divided by a partition (for inlet and outlet) using a baffle. The boundaries of the 3D partition along with the baffle are grouped together and defined as a surface named "metal". This entire volume is placed inside another 3D volume named "soil" (Vol2).
Here's the code for Gmsh
Code:
// Gmsh project created on Mon Feb 26 12:28:25 2024
SetFactory("OpenCASCADE");
//+
Box(1) = {0, 0, 0, 1.5, 1, 2};
//+
Box(2) = {0.5, 0.25, 0.5, 0.5, 0.5, 1.5};
//+
Rectangle(13) = {0, 0, 0.05, 1, 0.5, 0};
//+
//+
Rotate {{0, 1, 0}, {0, 1, 0}, -Pi/2} {
Surface{13};
}
//+
Translate {0.8, 0.25, 1} {
Surface{13};
}
//+
b() = BooleanFragments{ Volume{1}; Delete; }{ Surface{7,11,9,10,8}; Delete; };
//+
c() = BooleanFragments{ Volume{2}; Delete; }{ Surface{13}; Delete; };
//+
Coherence;
//+
Physical Volume("soil", 45) = {3};
//+
Physical Volume("water", 46) = {2};
//+
Physical Surface("inlet", 47) = {13};
//+
Physical Surface("outlet", 48) = {15};
//+
Physical Surface("metal", 49) = {8, 14, 7, 12, 11, 16};
//+
Physical Surface("wall", 50) = {22, 20, 19, 17, 18, 21};
Now the mesh is converted to OF by using:
Code:
gmshToFoam Model.msh
and then the mesh is split using:
Code:
splitMeshRegions -cellZones
When this happens a interface is defined for water_to_soil and soil_to _water but it only consists of the vol1 walls and doesn't include the baffle.
What am I missing? Or what else can I do to include the baffle?
|