![]() |
multiple regions
2 Attachment(s)
Hello all,
I have a new problem. Well lets say not a new but an old new problem. I want to mesh the domain shown in the attachement. There are two STL file. One for the water and on for the solid region. Now I want to mesh the geometry with sHM and write out the "two" regions. As you can see in the picture the water stl is seperated into two single regions and the solid depends on six singel regions. After meshing with sHM the command checkMesh gives me the following: Code:
Mesh stats Code:
rohr CellZone 1 = 2x fluid CellZone 2 = 6x solid (attached file) After splitting the cellZones to regions with Code:
splitMeshRegions -cellZones So my question: How can I handle that problem? After splitting my mesh I want to have only the two regions! I hope that I described my problem properply. Thanks for every help. Tobi |
Hi Tobi,
A quick glance to your post makes me remember an old thread about multi-regions, for which I left a link at the wiki page, namely section 3.2: http://openfoamwiki.net/index.php/Sn...-region_meshes Best regards, Bruno |
Quote:
i ll have a look at it! |
10000 thanks - works!
:D - now I am the happiest men in the world. Greate work. |
Well Bruno just one question.
Now I have my case ready, but there is only one boundary as Code:
oldInternalFaces Code:
Checking patch topology for multiply connected surfaces ... Sorry I am not familiar with setSet and stuff like that!? Any suggestions? |
Hi Tobi,
"oldInternalFaces" is just an old collection of faces, which should no longer be used. In other words, after you split the zones into regions, the main mesh is basically gone. You now have to (only) set the boundary conditions for the regions. For more information, check the "chtMultiRegion*Foam" tutorials ;) Best regards, Bruno |
3 Attachment(s)
Quote:
well thats not the problem. The problem is, that after splitting the mesh I getting 2 regions again. The step I done befor does not make sence at all if I get again two regions. Okay a short example: I want to mesh the region shown in the picture. The two seperated region should be (after meshing) one region. After meshing and using your advice I get picture #2 The two blocks are in the cellZone wasser But if I split my mesh now I get two regions again: each for one block. - region1: wasser - region2: domain0 But both regions should be in one! Do you know what I mean? Is that possible to do? Thanks Tobi |
Hi Tobi,
From your images, it looks like you have 4 regions in total, no matter what. There is no clear indication that the tubes are connected between the two blocks. If the tubes were connected, you should then have 3 regions in total. If you can share a simpler version of this case, it should be easier to help you. Best regards, Bruno |
Hi Bruno
here is my testcase. After splitting into Regions I get 4 Regions and the region "wasser" and " domain1" should be together as one region. Hope it clear now. As you said, the geometry is not connected. Thats my question at all. Is it possible to get one region with two not connected regions!? Couse If you have 20 not connected pipes and all has the same properties it would be very very nice to get only one region which contains all 20 pipes. Thanks for helping. Testcase Download |
Hi Tobi,
Good point... now that I think of it, there should be as many zones as tubes... But from your description, I remembered this groovyBC example: http://openfoamwiki.net/index.php/Co...ing_of_patches - it allows for two separated domains of the mesh to interact with one-another. But I don't remember how exactly it works. I'll try to look into this the coming weekend... but I hope you manage to figure this out sooner ;) Best regards, Bruno |
Hi Tobi,
OK, I didn't have time to test the following theory, but it should work:
Bruno |
Hi Bruno,
I build a new simpler case. Just wanna mesh three seperated pipes. 1. create background 2. mesh with sHM 3. step in your post #2 then I have my pipes as mesh but without the correct BC. A new run with sHM to generate the patches is not working. The other tools "createPatch" or "autoPatch" I ll try but I never done sth. with that commands. If you know how to create the patches out of the STL files please let me know :rolleyes: My very easy testcase: www.holzmann-cfd.de/openfoamcases/testCase.tar.gz Thanks in advance Tobi PS: via autoPatch its possible to seperate the patches into "autopatch xx" well ... maybe there is a better solution |
Hi Bruno,
with an additional sHM run without refinement I get some Boundary Faces but not the whole boundary. Its splittet into oldInternalFields and patches created with the additional run. :( :( AutoPatch is not working couse its not completely a good surface |
Hi Tobi,
Only in the coming weekend will I be able to play with this. But in the mean time, try to first use splitMeshRegions (not sure of the name of the app) and then use autoPatch each region. Good luck! Bruno |
Hi Bruno,
I have an idea and I think its working but now I have a strange problem. With checkMesh I get 4 regions but if I split my mesh into my regions I get over 70 regions - most of them just contain 1 - 3 cells. How can I provide that problem? Code:
Region Cells |
Hi Tobi,
Multi-regions is a pain to deal with, at least until we get the hang of it. OK, hints/details/suggestions:
Bruno |
Quote:
Hi Bruno, thanks for the hints. The last problem is gonna be solved by refining the STL mesh! So first problem solved! |
Hi Bruno,
well everythings works fine with multiregion. Yesterday I meshed a reactor with heatelemnt and steel (3 regions) out of four due to the domain0. But that was not a problem couse domain0 does not matter. I delete that region and renamed the patches with createPatch. The only thing that makes the multi region complicated is the fact, that if you have more similar geometries e.g. pipes with same properties but not connected to each other, you ll get several regions for each pipe (but you know that). After sHM you have all pipes in ONE region but by splitting it, it ll be seperated. Well I think the easiest way is: 1. for every single region you have to build one STL (instead of building one STL for 10 pipes) 2. load everything into sHM 3. Meshing 4. splitting and then: create a simple script that change all the entries and values you have to change. I ll do that way now and publish my case here. Yesterday I had success in doing that way on a other geometry. This one ll be published in a few weeks couse now I am not allowed to publish it. Tobi BUT Bruno, thanks for all your help and commitment to help me! |
1 Attachment(s)
Hi Bruno,
do you know how to solve that problem: -------------------------------------------------------- I made my six pipes and the channel as singel STL and after splitting the mesh I get some little smart domains with one or two cells at the interface between pipes and channel (attachement! <- the two brightness cells) How can I solve that problem? Or did anybody else know that problem? Tobi |
Hi Tobi,
My guess is that the base mesh needs a little bump in one of the directions, because an edge might be in the wrong place, leading snappy to have difficulties aligning the final mesh onto the surface of the pipes. The other possibility is the need to improve some of the quality controls for meshing. Don't forget that when meshing all zones, snappy will have to take into account both sides of all surfaces, not just one side! Use the "Extract Cells by Region" filter on ParaView to diagnose better those odd shaped cells (don't forget to not decompose polyhedra!), where you'll probably see some contortions going on there! It'll be easier this way to assess what quality indicator is having problems there. Best regards, Bruno |
Quote:
thanks for your answer. Can you explain the quoted sentence of you in a other way? What do you mean with "bump" ? Tobi |
Hi Tobi,
Quote:
You can do this, for example:
Bruno PS: Moved aerogt3's post to here: http://www.cfd-online.com/Forums/ope...rous-zone.html |
3 Attachment(s)
Hi Bruno
I played a bit with the whole thing. Here are three pics of the problem zones (red). Tomorrow I ll try: - refine the mesh there more - refine the STL more - changing snap controls (but what setting?) - changing mesh quality parameters (but what parameter?) Tobi |
Hi Bruno
I played a bit with the s ettings but the problem still exists. To refine the STL does not make any difference. Further more using a accurate cell refinement from (3 3) to (4 4) does not make any differences. I also tried so make the background cell one or a few cells more to change the lines in that section ... welll - that does not work too. I played a bit with the snapControls but the problem still occures. Now I am trying to make a new case in which I am trying something. If its working I ll let you know it. |
Hi Tobi,
I forgot to mention this here, but have you tried using SwiftBlock and SwiftSnap to help prepare the mesh? And have you check the presentation "A Comprehensive Tour of snappyHexMesh" for more ideas? Since yesterday I've been playing around with snappyHexMesh and porous zones and I haven't managed to get very far as well. But I did things manually, i.e. without the help of SwiftBlock and SwiftSnap... Good luck! Bruno |
Quote:
I ll have a look at switft* and share my results. The new case and my new idea is not working. But the meshing in my testcase is been very far ... still there is the problem with the single cells and the additional regions I get. I know the documentation of sHM and the slides are very good. |
Hi Bruno,
1. I make my backgroundmesh with Salome Meco. 2. I tried everything in: - changing snapping parameters - changing all quality parameters - changing backgroundmesh - changing refinement levels - - - - - - - - - - - - - - - - - - - - - - - - - - - Problem still persists. If I make a finer mesh in the region of the pipes I get more and more "domains*". A coarsar mesh works better (i dont know why). I have a setting now in which I only get one cell into a other domain. With these setting I played with the snap and quality parameters. The one cell is there all the time. At the moment I am out of ideas and `ll leave that topic open. Maybe I find a day when god tells me the solution :D Thanks for all your help! |
Hi Bruno and all other guys,
I think I have solved the problem. If you are using a complex geometry like I do you have to declare all walls which belong to a interface with the same refinement level. So you have to use STL with regions. I ll test it now with a complexer mesh system but I think its working :) ... |
Perfect!
Code:
created 'test.OpenFOAM' |
1 Attachment(s)
Hi all,
I ll tell you how to mesh a complex geomety with several and seperated regions with snappyHexMesh. Very important - - - - - - - - - - - - - - - - - - like in the snappyMultiRegion tutorial you have to build your STL files with regions. Therefor you should have the interfaces named as a single region in the STL file (e.g. in the attachement). - The picture I added is important for the "splitMeshRegion -cellZone" command. If you are using one whole STL its possible that you `ll get 10 or more other regions named domain** after splitting. It doesn't matter to change the snap or quality control settings. To get only the domains you want to have you have to use the STL as region STL. After that you should set the refinement of the interface to the same levels. With that knowledge you are able to mesh complex gemoetries with snappyHexMesh without creating other domains. For more information have a look at that complete thread. My case is avaiable on my homepage soon. Thanks for all the infos bruno! :) Tobi |
1 Attachment(s)
Hi everybody & bruno, I share my complex geometric meshing case with you. In the case you are meshing: - a hot air pipe - two cold water channels - the connection between air/water with solids (steel) by six pipes At the end you have nine regions and a case you can solve with chtMultiRegionSimpleFoam. Just execute the Run.sh file to build everything by the script (Attachement). Warning | Important - - - - - - - - - - - - - - - - - - My maschine works with 20 GB memory space and while meshing that case I get a total load of about 75%. I reduced the cellrefinement just to see how the meshing process is working but the mesh is not very accurate then. Anyway be sure you have more then 8 GB memory on your computer to be sure that everything is working fine. Otherwise your computer get overloaded by sHM and I think you know what that means :p Unfortunately the script is written in germany but I think everyone understand the things I have done. I will add that tutorial into the OpenFOAM-Wiki SnappyHexMesh for downloading :) Thanks to all. New experiance and good work. Download [activated]: http://www.holzmann-cfd.de/index.php...waermetauscher Tobi |
1 Attachment(s)
Hi all,
at least there is one problem left. I realised that the last few minutes. Have a look at the picture. Can someone imagine why that is happening? Problem: The first pipes above are refined a level more and everything is working. If I want to refine the pipe with the cutten cells I get problems by splitting the mesh. --> more regions (domain**)... Hmmmm :confused: |
Hi Tobi,
Have you tried checking your STL files with OpenFOAM's surfaceCheck? It should give you some diagnostics on the validity of the STL files. Best regards, Bruno |
yes everything is fine!
|
Hi Bruno,
just set one more cell into the mesh and everything is working now. Here my Run script: Code:
#!/bin/bash I upload the file in a few minutes |
Finished
Okay now it's gonna be a monolog :)
1. Download Link activated above. http://www.holzmann-cfd.de/index.php...waermetauscher 2. Reduce the mesh refinements to reduce the memory load 3. Updated the openfoamwiki with that link Enjoy Kind regard Tobi |
add layers
1 Attachment(s)
Hi!!
I need some help! I want to add layers to a multi-region case, in the interface between the water and the pipes. You can see the geometry in the attached document. The grey parts are the pipes and the blue part is the water. I was able to create the castellated mesh and snap it in the multi-region case. I can also add layers if I am working only with the water. The problem is that snappyHexMesh doesn't recognize the boundaries between the surfaces when is working with several STL files. What I thought to solve this problem is to: Option 1: 1-Create the mesh without layers using several STL files. 2-Split the mesh with splitMeshRegions. 3-Add layers only to the water. 4-Put everything again together. 5-Eliminate the domains I don't want since the geometry is complex and blockmesh is a prism. The step number 4 I don't know how to do it. I've thought using stitchMesh or mergeMeshes but i don't know if it will work to create a multi-region mesh. Option 2: Adding layers using only one STL file but the result won't be a multi-region case any more. Is possible to generate a multiregion case from only one STL file? Any suggestions in order to help me with the 2 options? Do you have another idea to add layers? Thanks for your help! David. |
Hi,
why you want to put the mesh together again ? |
Hi toby,
The problem is that if I modify the blockmesh of the water the new points are only in this blockmesh and not in the general blockmesh. Later when I run the cht this is not going to work properly, right? It is a little bit difficult to understand how works the cht solver for me... |
No :)
You can have 1000 faces from fluid_to_solid and 13000 faces to solid_to_fluid A lot of people do not use snappy for using several domains. You can mesh every domain itselfs and connecting them later with the patchType mappedWall. The points dont have to be at the same possition from mesh1 compared to mesh2. |
All times are GMT -4. The time now is 22:09. |