|
[Sponsors] |
May 12, 2014, 05:59 |
splitMeshRegion
|
#1 |
New Member
alireza j
Join Date: Sep 2010
Posts: 3
Rep Power: 16 |
Hi OF-Users,
In my case I have two different regions (say SOLID and FLUID). I used topoSet to define different regions and "splitMeshRegions -cellZones -overwrite" to split it into SOLID and FLUID. So far so good. My problem is that what I get at the interface between two regions is just one interface boundary which is know as (say SOLID _to_FLUID of FLUID_to_SOLID). However, what I want is two interface boundaries. i.e. SOLIDtop_to_FLUID and SOLIDbottom_to_FLUID). in splitMeshRegions wiki it is mentioned to use -useFaceZones to do so but I cannot get anything out of that. Anybody has done anything similar and can give me a sample or any hint? I appreciate any help Regards, |
|
July 2, 2014, 08:05 |
|
#2 |
Member
Join Date: Nov 2011
Location: Berlin
Posts: 31
Rep Power: 15 |
Hi FekrKon,
could you solve this? I have a similar problem finding my defined regions in the interfaces with SHM on multiregions... http://www.cfd-online.com/Forums/ope...tml#post499500 regards dirk |
|
July 3, 2014, 06:24 |
|
#3 |
New Member
alireza j
Join Date: Sep 2010
Posts: 3
Rep Power: 16 |
Hi dzi,
No I couldn't eventually solve this problem! |
|
July 30, 2014, 03:53 |
splitMeshRegions -cellZonesOnly -useFaceZones
|
#4 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
Have a look into this bug report. There is a good example on how to use the -useFaceZones option for splitMeshRegions.
http://www.openfoam.org/mantisbt/view.php?id=1282 Cheers Fabian |
|
July 30, 2014, 06:30 |
|
#5 |
Member
Join Date: Nov 2011
Location: Berlin
Posts: 31
Rep Power: 15 |
Hi Fabian,
thanks for your reply! I also found that bugfix post, and i think "splitMeshRegions -useZellzonesOnly -useFaceZones " is what I am looking for. The example case from mattjis is working correct, but still I cannot get a working snappyHexMeshDict for my case. Here again a sketch of my setup: Code:
------------------------------ | | | ------------------ | | |box1 |box2 | | | | | | | | | | | | | | - | | | | | | | | | | | | | | | | | | | | | | | ------------------ | | | ------------------------------ blockMesh Box1.stl and Box2.stl are defined in constant/trisurface with some Code:
solid (...) endsolid The outer mesh is generated from a blockMeshDict. This is the snappyHexMeshDict to get 3 regions domain0, box1, box2 Code:
geometry { box1.stl { type triSurfaceMesh; // name box1; regions { box1_top {name box1_top;} box1_interface_large {name box1_interface_large;} box1_interface_small {name box1_interface_small;} } } box2.stl { type triSurfaceMesh; name box2; regions { box2_interface_large { name box2_interface_large; } box2_interface_small { name box2_interface_small; } box2_bot {name box2_bot;} } } }; (...) refinementSurfaces { box1.stl // box1 // use this if name set in geometry section ?? { // Surface-wise min and max refinement level level (1 1); faceZone box1; cellZone box1; cellZoneInside inside; regions { box1_top{ level (1 1); cellZone box1_top ; faceZone box1_top; cellZoneInside inside; } box1_walls{ level (1 1); cellZone box1_walls ; faceZone box1_walls; cellZoneInside inside; } } } box2 { level (1 1); faceZone box2; cellZone box2; cellZoneInside inside; regions { box2_interface_large { level (1 2); cellZone box2_interface_large; faceZone box2_interface_large; cellZoneInside inside; } box2_interface_small { level (1 2); cellZone box2_interface_small; faceZone box2_interface_small; } box2_bot { level (1 2); cellZone box2_bot; faceZone box2_bot; } } } } Code:
splitMeshRegions -cellZones -overwrite paraFoam -touchAll Using Code:
splitMeshRegions -cellZonesOnly -useFaceZones -overwrite Code:
Using current faceZones to divide inter-region interfaces into multiple patches. Using current cellZones to split mesh into regions. This requires all cells to be in one and only one cellZone. --> FOAM FATAL ERROR: For the cellZonesOnly option all cells have to be in a cellZone. Cell 0 at(-4.62449 -4.41817 -9.50173) is not in a cellZone. There might be more unzoned cells. From function splitMeshRegions in file splitMeshRegions.C at line 1576. FOAM exiting I still could not catch them with any setSet command and assign them to a cellZone. Maybe somebody has an idea about this? (Because of this I switched from a .unv outbox to blockMeshDict, but got the same error). I really would like to know, where and how to set the correct faceZones and cellZones in sHmDict with regions. Attached is my case with a makeMesh and cleanMesh, I would be glad if somebody gets it working to generate the patches after splitMeshRegions https://www.dropbox.com/s/fswjgaxaac...Box_2boxes.tgz Thanks dirk |
|
July 30, 2014, 09:38 |
|
#6 |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
Hi
From a first glance I would say you do not need to build cellZones for the patch definition between the two regions. So basically do the following for the two regions: Code:
faceZone box1; cellZone box1; cellZoneInside inside; Code:
faceZone box1_top; faceType internal; Cheers Fabian |
|
July 30, 2014, 11:47 |
|
#7 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Dear Fabian,
how do you know all the parameters you can use in snappyHexMesh ? I am trying the same thing with a very smart and easy and cleaned case but the result is: - With region stl I only can create one face for the whole region - With single stl I can create all faces but then I can not build cellZones for splitting the regions due to the fact that the surfaces are not closed. I have a simple question if its possible to define faceZones in the regions section like: Code:
regionSTL.stl { level (0 0); faceZone region1Patch; cellZone region1; cellZoneInside inside; regions { // That patch I want to have in const/polyMesh/faceZones after snappyHexMesh patch1 { level (0 0); faceZone facePatch1; } // That patch I want to have in const/polyMesh/faceZones after snappyHexMesh patch2 { level (0 0); faceZone facePatch2; } } } Additinally I don´t know where to put the (for me new) keyword you mentioned: Code:
faceZone box1_top; faceType internal; Thanks in advance,
__________________
Keep foaming, Tobias Holzmann |
|
July 30, 2014, 12:14 |
topoSet
|
#8 | |
Senior Member
Fabian Roesler
Join Date: Mar 2009
Location: Germany
Posts: 213
Rep Power: 18 |
Hi Tobi
Same happens to me. I guess it is only possible to build one faceZone. However, in such cases I use topoSet. I select the faces connected to both cellZones and put them into a new faceZone for handling in splitMeshRegions. Somithing like: 1. Select all faces of cellZone A 2. Subset with all faces of cellZone B 3. Build new faceZone from faceSet Quote:
Cheers Fabian |
||
July 30, 2014, 13:01 |
|
#9 | ||
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Quote:
Hi Fabian, well I tried this too but then I have the problem, that I have to define a faceZone for the region to get a cellZone as well for splitting the domain into its different zones. Unfortunately the written faceZones of the single STL's which determine the patches I want to get are overwritten (only working in single domain and therefor I always use regions - as far as I know). Well thanks for your feedback and I will check out your steps. If this is leading to the solution I let you know (but it has to, because you make it in that way)... I keep you posted.
__________________
Keep foaming, Tobias Holzmann |
|||
August 22, 2014, 06:33 |
|
#10 |
Member
Join Date: Nov 2011
Location: Berlin
Posts: 31
Rep Power: 15 |
Hi Tobi and Fabian,
thanks a lot for your recommendations and thoughts. I tried again with these instructions. I dont know if I did it right, because all this setSet, topoSet, subset, setToZone, zoneToPatch stuff is somehow confusing. I used the commands Code:
setSet, createPatch, splitMeshRegions With this procedure I get a separated interface between the two boxes, also the grading works (the large interface has a finer grid) Here is what I did, the procedure can be found in the Code:
makeMesh.sh 1. generate the stl files. These are: the box1 and box2 complete (still with solid/endsolid sections inside), and also the single stl faces ( all by Salome ->export stl function) 2. Code:
snappyHexMesh -overwrite Also, box1 and box2 are defined as cellzones. 3. Code:
setSet -batch batch.setSet 4. Code:
createPatch -overwrite 5. Code:
splitMeshRegions -cellZonesOnly -useFaceZones -overwrite 6. paraFoam -touchAll; paraFoam shows what happened. All in all, there is progress but still it is not, what I wanted The interface is there, but "sieved". Also I have now 4 interfaces (too much!) inbetween box1 and box2. Only if all 4 are checked, I get the whole faces. I expected to get in box2 only box2_interface_large_to_box_1 and box2_interface_small_to_box_1 (and analog for box1). Maybe somebody has a hint what else to add/remove? Many thanks, dirk (the case is here: https://www.dropbox.com/s/zejca1h5fm...ievedPatch.tgz ) EDIT: now I have seen, createPatch throws an error and splitMeshRegions -cellZonesOnly -useFaceZones -overwrite throws the error (--> FOAM FATAL ERROR: For the cellZonesOnly option all cells have to be in a cellZone. Cell 0 at(-4.62447 -4.41827 -9.50164) is not in a cellZone. There might be more unzoned cells. ) But when I leave out createPatch it "works" with: setSet -batch batch.setSet splitMeshRegions -cellZones -useFaceZones -overwrite paraFoam -touchAll Last edited by dzi; August 22, 2014 at 07:20. Reason: first error found... |
|
September 4, 2014, 10:48 |
|
#11 |
Member
Join Date: Nov 2011
Location: Berlin
Posts: 31
Rep Power: 15 |
Hello all,
after hours of try and error of multiple configurations and tools I want to share what I found on how to get splitted patches for a multi region case. It seems to work now on a the simple construct of the 2 boxes with a splitted patch (all options with the solid/endsolid sections in the stl file did not work, also the experiments with creatPatch and splitMeshRegions -cellZonesOnly -useFaceZones ended in the defect surfaces). Starting point is the generation of stl-files from salome for each single face or group. They provide a closed surface. All faces are read in the sHMdict geometry section and get a name. In the refinementSurfaces section the level defines the refinement level etc. In this example, one part of the interface gets a finer grid. The key was to use Code:
splitMeshRegions Code:
-blockedFaces (see: http://openfoamwiki.net/index.php/SplitMeshRegions: -blockedFaces FACESET Specify additional region boundaries that walking does not cross by specifying a faceSet ) in this case: setSet.batch: Code:
faceSet box1FaceSet new zoneToFace box1_top faceSet box1FaceSet add zoneToFace box1_interface_large faceSet box1FaceSet add zoneToFace box1_interface_small faceSet box1FaceSet add zoneToFace box1_walls faceSet box1FaceSet subset faceSet box2FaceSet new zoneToFace box2_bot faceSet box2FaceSet add zoneToFace box2_walls faceSet box2FaceSet subset faceSet box1InterfLargeFaceSet new zoneToFace box1_interface_large faceSet box1InterfSmallFaceSet new zoneToFace box1_interface_small faceSet borderFaceSet new faceToFace box1FaceSet faceSet borderFaceSet add faceToFace box2FaceSet faceSet borderFaceSet subset Code:
splitMeshRegions -blockedFaces borderFaceSet -useFaceZones -overwrite Code:
paraFoam -touchAll What I did not try yet, is how to proceed with the mesh in regions, but I guess one can create cellSets from regions and work on them (renaming? refine?). The clean case is here : https://www.dropbox.com/s/m6hniecba2...ittedpatch.tgz good luck, dirk |
|
October 23, 2014, 04:18 |
|
#12 | |
New Member
Join Date: Jul 2013
Posts: 8
Rep Power: 13 |
Quote:
could you please explain, how to use and deal with different stl-files for the region and the patches in sHM? I also tried that, but didn't succeed. A short example would be great!! @Tobi: Have you solved this problem yet? Thanks in advance |
||
October 23, 2014, 05:16 |
|
#13 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Hi Alex,
no I did not investigate more time to that topic because that was necessary for me and I have no priority (at the moment) solving that problem.
__________________
Keep foaming, Tobias Holzmann |
|
November 3, 2015, 10:01 |
|
#14 | |
Member
Peng Liang
Join Date: Mar 2014
Posts: 60
Rep Power: 12 |
Quote:
have you solved the problem achieving multi boundaries at interface between two regions? I have the same problem, it would be kind if you could tell me that. Best Regards, Peng |
||
November 3, 2015, 12:31 |
|
#15 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Dear peng,
The easiest and fastest way would be to use setSet to create new sets corresponding to the faces you want to have at the boundaries and then use createPatch to create a new patch out of the set. This has to be done for both meshes. I did not investigate into doing this within the snappyhexmesh
__________________
Keep foaming, Tobias Holzmann |
|
November 5, 2015, 20:53 |
|
#16 |
Senior Member
nasir musa yakubu
Join Date: Mar 2014
Location: Birmingham
Posts: 109
Rep Power: 12 |
please has anyone tried this method with snappyhexmesh?
thanks |
|
March 8, 2016, 08:39 |
original patch names not generated
|
#17 |
Member
Antonio Liggieri
Join Date: Aug 2010
Posts: 76
Rep Power: 15 |
Hi FOAMer's
I'm trying to generate a multi region mesh with sHM. I can manage to create the different regions. However, no predefined patch names are created. I've taken the snappyMultiRegion case from Tobias Holzmann as tutorial. http://www.holzmann-cfd.de/index.php...ppymultiregion But I can't figure out, how I can realise the naming of specific patches... For any hints and help thanks a lot in advance! |
|
March 8, 2016, 10:15 |
|
#18 | |
Senior Member
nasir musa yakubu
Join Date: Mar 2014
Location: Birmingham
Posts: 109
Rep Power: 12 |
Hello Alfa,
the mesh looks easy, but what do you mean by names the regions, because i was expecting you would name the regions based on your snappyhexmeshdict. i think it would be better to to provide your snappyhexmeshdict and some description of what you are trying to name and in which file dictionary you intend to name the regions. kind regards Nas Quote:
|
||
March 8, 2016, 14:43 |
|
#19 |
Member
Pascal Balz
Join Date: Feb 2015
Location: Germany
Posts: 44
Rep Power: 11 |
Hi Antonio,
I'm guessing you have the region-wise stl files built up of different solids, like you would do in a one-region mesh? In this case I'm sorry to disappoint you, but as far as I know snappy isn't capable of using the predefined patches. It just creates the interfaces between the regions, so you need to manually adjust these patches later on (with topoSet and createPatches).
__________________
Regards, Pascal |
|
March 8, 2016, 20:19 |
|
#20 |
Senior Member
nasir musa yakubu
Join Date: Mar 2014
Location: Birmingham
Posts: 109
Rep Power: 12 |
Also, from the geometry you sent me, i will definitely be using salome to mesh the geometry and not snappyhexmesh...if u need help with this i can definitely help
|
|
Tags |
splitmeshregions, toposet |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] splitMeshRegion problem(cell in multi zones) | huangkai | OpenFOAM Meshing & Mesh Conversion | 0 | April 10, 2019 11:52 |
[mesh manipulation] splitMeshRegion for chtMultiRegionFoamCase | Bob! | OpenFOAM Meshing & Mesh Conversion | 0 | February 27, 2017 19:08 |
cht splitMeshRegion but keeping porous cellZones | klilla | OpenFOAM Pre-Processing | 3 | November 19, 2013 09:32 |
[mesh manipulation] splitMeshRegion | Khelian973 | OpenFOAM Meshing & Mesh Conversion | 1 | July 2, 2009 06:02 |
[mesh manipulation] SplitMeshRegion | ivan_cozza | OpenFOAM Meshing & Mesh Conversion | 2 | October 29, 2008 07:38 |