CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Meshing & Mesh Conversion

[mesh manipulation] splitMeshRegion

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree7Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 9, 2016, 02:34
Default
  #21
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Is there a reason that you use Salomon and tetraedrals instead of sHM?
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   March 9, 2016, 04:11
Default
  #22
Senior Member
 
nasir musa yakubu
Join Date: Mar 2014
Location: Birmingham
Posts: 109
Rep Power: 12
esujby is on a distinguished road
Hi,

well, to be honest yes. its allot quicker to find out if theres something wrong with you geometry, especially when its a complex one, like the solar volumetric receiver i am working on. the mesh quality extremely thin surfaces is much better with salome (netgen) and i simply just couldn't mesh my geometry with SHM, it couldn't mesh thin surfaces bellow 0.02 mm. etc

the only reason i use tetrahedral cells is because the tutorial provided bellow. also at my university, all the CFD guys using Ansys for heat transfer simulations use tetrahedral cells, i am the only one using openFOAM in my institution loll...so i have a very limited to no guide with regards to meshing for openfoam.

lastly, i was able to quickly learn how to play around with the features of salome to realise a much better CAD configuration for meshing. so i put my CAD together in solid works, i tune the geometries on salome then straight to open foam. by the way are you recommending using some other option instead of tetrahedral cells?

kind regards


https://www.youtube.com/watch?v=1zQbU-E4k1U
esujby is offline   Reply With Quote

Old   March 9, 2016, 04:30
Default
  #23
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by esujby View Post
Hi,

well, to be honest yes. its allot quicker to find out if theres something wrong with you geometry, especially when its a complex one, like the solar volumetric receiver i am working on. the mesh quality extremely thin surfaces is much better with salome (netgen) and i simply just couldn't mesh my geometry with SHM, it couldn't mesh thin surfaces bellow 0.02 mm. etc
Hi,

well I am working with salome and foam for more than 6 years now and foam could of course mesh thin surfaces below 0.02mm (:
In my opinion you will find a good mesh with sHM faster than with salome. I think in your case, you are not so familiar with sHM and therefore you get problems (like so many people). Finally everybody think sHM is a bad meshing tool

Anyway. It does not matter which mesher you are using but Tets are always not as good as hexaeder in the topic of numerics.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   March 9, 2016, 05:00
Default
  #24
Member
 
Antonio Liggieri
Join Date: Aug 2010
Posts: 75
Rep Power: 14
alfa_8C is an unknown quantity at this point
Hi Tobi

how did you manage to preserve patch names in your tutorial of multi region sHM? I looks like it comes from blockMesh but this seems not obvious to me.

Thanx in advance,
Antonio
alfa_8C is offline   Reply With Quote

Old   March 9, 2016, 06:37
Default
  #25
Senior Member
 
nasir musa yakubu
Join Date: Mar 2014
Location: Birmingham
Posts: 109
Rep Power: 12
esujby is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi,

well I am working with salome and foam for more than 6 years now and foam could of course mesh thin surfaces below 0.02mm (:
In my opinion you will find a good mesh with sHM faster than with salome. I think in your case, you are not so familiar with sHM and therefore you get problems (like so many people). Finally everybody think sHM is a bad meshing tool

Anyway. It does not matter which mesher you are using but Tets are always not as good as hexaeder in the topic of numerics.
Hi Tobi,

i think i didn't explain myself correctly, with all due respect with regards to ur experience using foam, i would still say i don't think meshing my complex geometry using SHM is easily possible yet to be honest. it is not just just a single thin surface. its a geometry made up of multiple concentric cones located inside a fluid region which is also encapsulated by another region ( in other words many regions within regions and so on. i literally spent about 6-9 months doing nothing else but just trying to get SHM to mesh the geometries with no success, set up a debug session with bruno, but still no immediate success and i decided to move to salome, and issue was resolved in a day or two. other geometries greater than greater than 0.02mm about 0.1mm were ok but as u get smaller SHM isn't able to handle it.

i have also max out my work station using SHM. but still....no success.

anther obvious fact is that salome has more features which easily allows one to manipulate CAD and mesh quite easily, which u don't get with SHM.

i guess its a matter of preference maybe but i think salome is definitely easier to use and the best way to start for complex geometries.

thanks you very much for the Hint. i will give herd cells a try now actually.

Kind regards
esujby is offline   Reply With Quote

Old   January 10, 2018, 06:39
Default
  #26
New Member
 
Sam
Join Date: Nov 2017
Posts: 24
Rep Power: 8
anufagbemi is on a distinguished road
Quote:
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
with the
Code:
-blockedFaces
option, which generates regions according to defined faceSets
(see: http://openfoamwiki.net/index.php/SplitMeshRegions:
[I]-blockedFaces FACESET
Specify additional region boundaries that walking does not cross by specifying a faceSet

Hey guys,
I've been diligently going through this thread and I discovered me and @dzi had the same problem of multiple domains created (4 in your case instead of 2) after splitMeshRegions then resolved the problem to an extent by using the
Code:
splitMeshRegions -blockedFaces
Is there anyway you guys could assist me with mine. My main aim is just to split my model into 2 regions, I'll worry about the patches later. My geometry is more complex though and I need to carry out FSI simulation with it.

Steps I used were
1. Create a blockMesh for both domains in this case SOLID and FLUID
2. surfaceFeatureExtract
3. snappyHexmesh
4. splitMeshRegions -cellZones -overwrite

and then I get a lot of regions formed instead of FLUID and SOLID.
I tried using several other arguments such as -useFaceZone, -regions <NAME>, but they all gave me just one region.
I also followed dzi's exact procedure of using .setSet file, but none of them worked for me.

My main problem is that my shape needs quite some level of refinement so that the mesh quality is good. When I refine it and have a good mesh, the regions that result after splitMeshRegions are a lot: about 20 instead of 2. However when the refinements are not that fine I obtain my desired 2 regions while the mesh quality suffers.
Please what do you recommend? My case folder can be found here https://yadi.sk/d/w_SfFScN3RKpHM


And btw does anyone also know anything about the "det: " floating exception error in the last line of the following code from this Stress calculation? I got the error before I went back to refine my shape as stated above.
Code:
Create dynamic mesh for time = 0

Selecting dynamicFvMesh dynamicMotionSolverFvMesh
Selecting motion solver: velocityLaplacian
Selecting motion diffusion: quadratic
Selecting motion diffusion: inverseDistance
--> FOAM Warning : 
    From function polyBoundaryMesh::patchSet(const wordList&)
    in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 444
    Cannot find any patch names matching interface
 Reading stress mesh
Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar

PIMPLE: Operating solver in PISO mode

Creating fixed displacement boundary condition
Creating fixed displacement boundary condition
Creating fixed displacement boundary condition
Creating fixed displacement boundary condition
Creating traction displacement boundary conditions
Selecting rheology model linearElastic
Creating constitutive model
Selecting coupling scheme Aitken

Starting time loop

Creating beamReport function object.
History point ID: 712654
History point coordinates: (0.00220062 0.00173205 0.00154628)
Reference point coordinates: (0.45 0.15 -0.15)
Time = 0.005 (dt = 0.005)

Create extended GGI zone-to-zone interpolator
Checking fluid-to-solid face interpolator
Fluid-to-solid face interpolation error: 1.81175e-07
Checking solid-to-fluid point interpolator (GGI)
calcMasterPointAddressing() const
Extended GGI, master point distance, max: 1.35234e-07, avg: -1.63421e-12, min: -1.32708e-07
Solid-to-fluid point interpolation error (GGI): 1.35234e-07
Number of uncovered master faces: 0
Number of uncovered slave faces: 0
calcSlavePointAddressing() const
Extended GGI, slave point distance, max: 1.32708e-07, avg: 1.63421e-12, min: -1.35234e-07
Extended GGI, slave point orientation (<0), max: 0.728604, min: -1, nIncorrectPoints: 5/150409
Setting traction on solid patch
Total force (fluid) = (4.73487e-11 3.5512e-11 -9.90773e-11)
Total force (solid) = (-4.73498e-11 -3.5512e-11 9.9077e-11)
Evolving solid solver: unsTotalLagrangianSolid
det: -130.767, 45.3949
Floating point exception (core dumped)
Thanks guys
Samuel
Attached Images
File Type: png snapshot.png (35.6 KB, 36 views)
anufagbemi is offline   Reply With Quote

Old   April 5, 2018, 17:45
Default To split interface patch into multiple patch from fluent mesh file
  #27
Member
 
Tarang
Join Date: Feb 2011
Location: Delhi, India
Posts: 47
Rep Power: 15
gtarang is on a distinguished road
Quote:
Originally Posted by dzi View Post
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
with the
Code:
-blockedFaces
option, which generates regions according to defined faceSets
(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
With this faceSets, the complete domain gets splitted into the regions and all patches are preserved using:

Code:
splitMeshRegions -blockedFaces borderFaceSet -useFaceZones  -overwrite
Finally,
Code:
paraFoam -touchAll
lets you find all regions and patches with paraFoam.

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
Hi,
I was also facing the same problem to split the interface in multiple patches. I used fluent mesh file. I followed following procedure:
1. I gave the name to the interface patches in the fluent mesh only and exported in msh format.
2.
Code:
> fluentMeshToFoam meshFile.msh -writeSets -writeZones
The "-writeSet" flag writes all the patches including interface patches in the set directory.
3. I used topoSetDict to make new faceZones from the (interface) faceSet.
Here is snippet from topoSetDict
Code:
    {
        name    left;      //name of the new faceZone we want to create
        type    faceZoneSet;
        action  new;      //we are creating new faceZone from each faceSet
        source  setToFaceZone;
        sourceInfo
        {
            faceSet left;
        }
    }
Create faceZones from all the interface patches
4. Use this command
Code:
> splitMeshRegions -useFaceZones -cellZones -overwrite
It will create the interfaces patches based upon the faceZones we created above

Hope someone may find it useful. Also suggest if anything can be done to shorten this process.

Thanks
gtarang is offline   Reply With Quote

Old   June 23, 2020, 14:57
Default
  #28
New Member
 
Join Date: Jun 2020
Location: UK
Posts: 22
Rep Power: 5
Rango is on a distinguished road
Hi,

For this case you can use a combination of "topoSet" and "createPatch" for each mesh region separatly to create your desired patches.

The following link shares a test case 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".

Cheers
Rango is offline   Reply With Quote

Reply

Tags
splitmeshregions, toposet

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 13:43.