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

[mesh manipulation] Naming cellzones before splitting

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

Like Tree4Likes
  • 1 Post By HorstvanGrass
  • 1 Post By Yann
  • 1 Post By HorstvanGrass
  • 1 Post By HorstvanGrass

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2021, 13:08
Default Naming cellzones before splitting
  #1
Member
 
Horst van Gras
Join Date: Oct 2018
Posts: 45
Rep Power: 7
HorstvanGrass is on a distinguished road
Hi,
I have a multiRegion case with 3 different region (region0, Fluid and region 1) as simplified in the attached image. I'm using snappyhexmesh for snapping a STL geometry. For my mesh study the region 0 and region 1 are randomly switching which is pretty anoying to adapt the boundary condition before each run.


I would like to precisely rename the undefined regions in outer cell region and inner one before splitting with splitMeshRegion -cellZones . I tried with locationsInMesh command but it conflicts resulting in new nonsense domains.



Thx in advance
Attached Images
File Type: jpg fluid2.jpg (35.9 KB, 9 views)
HorstvanGrass is offline   Reply With Quote

Old   July 23, 2021, 04:50
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,026
Rep Power: 25
Yann will become famous soon enough
Hi,


I usually use locationsInMesh to define cellZones in multi region cases. How do you define it and what issues are you having with it?


Yann
Yann is offline   Reply With Quote

Old   July 23, 2021, 05:06
Default This is the righ way
  #3
Member
 
Horst van Gras
Join Date: Oct 2018
Posts: 45
Rep Power: 7
HorstvanGrass is on a distinguished road
After some try and error, I found that a refinement definition cause problems when using locationsInMesh.
I removed the highlighted part and now its not conflicting.



refinementSurfaces
{
Fluid
{

level (0 0);
faceZone Fluid;
cellZone Fluid;
cellZoneInside inside;

}
wht likes this.
HorstvanGrass is offline   Reply With Quote

Old   July 23, 2021, 06:28
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,026
Rep Power: 25
Yann will become famous soon enough
OK I understand. In your code, you are defining a cellZone in refinementSurfaces.

Code:
refinementSurfaces
{
    Fluid
    {
        level (0 0);
        faceZone Fluid;
        cellZone Fluid;
        cellZoneInside inside;
    }
}
But the locationsInMesh function is also used to define a cellZone:

Code:
locationsInMesh
(
    (( 0.005 0.005  0.005) Fluid)
    (( 0.05  0.005  0.005) Solid1)
    ((-0.05  0.005  0.005) Solid2)
);

I guess you cannot use both mechanisms at the same time. You have to choose if you want to define your cellZones in refinementSurfaces or with locationsInMesh.

Yann


PS: just a clarification for people reading this thread: locationsInMesh is only available in the ESI-OpenCFD branch (openfoam.com). In the foundation branch (openfoam.org) you have to define your cellZones in refinementSurfaces.
HorstvanGrass likes this.
Yann is offline   Reply With Quote

Old   July 23, 2021, 07:44
Default
  #5
Member
 
Horst van Gras
Join Date: Oct 2018
Posts: 45
Rep Power: 7
HorstvanGrass is on a distinguished road
Thanks for the explanation. Helped me a lot!
Yann likes this.
HorstvanGrass is offline   Reply With Quote

Old   July 23, 2021, 12:40
Default
  #6
Member
 
Horst van Gras
Join Date: Oct 2018
Posts: 45
Rep Power: 7
HorstvanGrass is on a distinguished road
Hey Yann,
locationsInMesh is however creating a hole in my Mesh, as you can see in the center of the image for my coarse mesh. This does not occur when defining with refinementSurfaces. Is there a way to fix the hole or to define explicitly the unnamed region with therefinementSurfaces as with locationsInMesh?


Thx in advance


hole.png
HorstvanGrass is offline   Reply With Quote

Old   July 23, 2021, 13:21
Default
  #7
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,026
Rep Power: 25
Yann will become famous soon enough
I'm not aware of a way to fix it except by playing around with the refinement levels (this is very coarse!) and maybe some snapping parameters.


Maybe someone else will have an idea?


Yann
Yann is offline   Reply With Quote

Old   July 23, 2021, 18:40
Default
  #8
Member
 
Horst van Gras
Join Date: Oct 2018
Posts: 45
Rep Power: 7
HorstvanGrass is on a distinguished road
I managed it to solve the naming of the region by roughly attributing cellzone with toposet for region 1 and 2 naming them solid 1 and 2. Then execute sHM which substract the dupllcated cells in the cellzone and adding them to Fluid. Then there three distinct named region.
Yann likes this.
HorstvanGrass is offline   Reply With Quote

Reply

Tags
multiregion meshing, multiregions, snapphhexmesh, splitmeshregions

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
Deactivate cellZones for a next stage of my transient simulation alainislas OpenFOAM Running, Solving & CFD 3 February 23, 2021 04:04
[snappyHexMesh] SHM doesn't create cellZones for one region Eko OpenFOAM Meshing & Mesh Conversion 10 January 24, 2018 03:03
Flux difference splitting Vs Fluctuation splitting Vino Main CFD Forum 0 January 18, 2014 16:54
Flux splitting Dr B.M. Smith (Smith) OpenFOAM Running, Solving & CFD 19 January 9, 2013 05:07
DecomposePar and CellZones Anne Lincke OpenFOAM 4 October 13, 2010 10:18


All times are GMT -4. The time now is 09:41.