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

[mesh manipulation] How to write cellSet for different regions in constant/polyMesh/sets

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Saleh Abuhanieh

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2016, 05:02
Default How to write cellSet for different regions in constant/polyMesh/sets
  #1
Member
 
Sing
Join Date: Jan 2016
Posts: 30
Rep Power: 10
Struggle_Achieve is on a distinguished road
Hello Everyone!

I have created a slightly complicated mesh which has 3 regions. I have made these using blockMesh. The geometry is as shown in the attached figures.

When I run blockMesh it creates the geometry and after running splitMeshRegions -cellZones -overwrite I also get three different domains automatically.

My question is that when I run the spliMeshRegions command I can see in the terminal different regions/domains being created and the number of cells in the respective domains also(see attached code). I want to write the files(class cellSet) for these regions containing the cells which get created in constant/polyMesh/sets folder. How to do this.
There should be a way as while trying few things I mistakenly created these files and now I am unable to reproduce the same.
Code:
[1016914@hpc4 Ladle_Tapered]$ blockMesh 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.1-262087cdf8db
Exec   : blockMesh
Date   : Jul 29 2016
Time   : 14:29:51
Host   : "hpc4"
PID    : 35691
Case   : /home/1016914/Ladle_Tapered
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Creating block mesh from
    "/home/1016914/Ladle_Tapered/constant/polyMesh/blockMeshDict"
Creating curved edges
Creating topology blocks
Creating topology patches

Creating block mesh topology

Check topology

    Basic statistics
        Number of internal faces : 16
        Number of boundary faces : 46
        Number of defined boundary faces : 46
        Number of undefined boundary faces : 0
    Checking patch -> block consistency

Creating block offsets
Creating merge list .

Creating polyMesh from blockMesh
Creating patches
Creating cells
Creating points with scale 1
    Block 0 cell size :
        i : 0.04907321 .. 0.04907321
        j : 0.04907321 .. 0.04907321
        k : 0.06393637 .. 0.06393637

    Block 1 cell size :
        i : 0.0347 .. 0.0347
        j : 0.04907321 .. 0.04907321
        k : 0.06393637 .. 0.06393637

    Block 2 cell size :
        i : 0.04907321 .. 0.04907321
        j : 0.0347 .. 0.0347
        k : 0.06393637 .. 0.06393637

    Block 3 cell size :
        i : 0.04907321 .. 0.04907321
        j : 0.0347 .. 0.0347
        k : 0.06393637 .. 0.06393637

    Block 4 cell size :
        i : 0.0347 .. 0.0347
        j : 0.04907321 .. 0.04907321
        k : 0.06393637 .. 0.06393637

    Block 5 cell size :
        i : 0.1089852 .. 0.1089852
        j : 0.01471767 .. 0.01471767
        k : 0.06287548 .. 0.06287548

    Block 6 cell size :
        i : 0.1089852 .. 0.1089852
        j : 0.01471767 .. 0.01471767
        k : 0.06287548 .. 0.06287548

    Block 7 cell size :
        i : 0.1089852 .. 0.1089852
        j : 0.01471767 .. 0.01471767
        k : 0.06287548 .. 0.06287548

    Block 8 cell size :
        i : 0.1089852 .. 0.1089852
        j : 0.01471767 .. 0.01471767
        k : 0.06287548 .. 0.06287548

    Block 9 cell size :
        i : 0.006643997 .. 0.006643997
        j : 0.05700198 .. 0.05700198
        k : 0.01720349 .. 0.01720349

    Block 10 cell size :
        i : 0.006643997 .. 0.006643997
        j : 0.05700198 .. 0.05700198
        k : 0.01720349 .. 0.01720349

    Block 11 cell size :
        i : 0.006643997 .. 0.006643997
        j : 0.05700198 .. 0.05700198
        k : 0.01720349 .. 0.01720349

    Block 12 cell size :
        i : 0.006643997 .. 0.006643997
        j : 0.05700198 .. 0.05700198
        k : 0.01720349 .. 0.01720349


Writing polyMesh
----------------
Mesh Information
----------------
  boundingBox: (-1.682354 -1.682354 -3.48407) (1.682354 1.682354 0)
  nPoints: 225051
  nCells: 212000
  nFaces: 648800
  nInternalFaces: 623200
----------------
Patches
----------------
  patch 0 (start: 623200 size: 1600) name: lowerWall
  patch 1 (start: 624800 size: 2000) name: upperWall
  patch 2 (start: 626800 size: 4000) name: curvedWalls
  patch 3 (start: 630800 size: 1600) name: sideLayerTopWall
  patch 4 (start: 632400 size: 4000) name: sideLayerInnerWalls
  patch 5 (start: 636400 size: 4000) name: sideLayerOuterWalls
  patch 6 (start: 640400 size: 1600) name: sideLayerBottomWall
  patch 7 (start: 642000 size: 1600) name: botLayerTopWall
  patch 8 (start: 643600 size: 1600) name: botLayerBotWall
  patch 9 (start: 645200 size: 1600) name: botLayerSideWalls
  patch 10 (start: 646800 size: 1600) name: botLayerOutletWalls
  patch 11 (start: 648400 size: 400) name: outlet

End

[1016914@hpc4 Ladle_Tapered]$ splitMeshRegions -cellZones -overwrite
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.1-262087cdf8db
Exec   : splitMeshRegions -cellZones -overwrite
Date   : Jul 29 2016
Time   : 14:30:00
Host   : "hpc4"
PID    : 35702
Case   : /home/1016914/Ladle_Tapered
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Creating single patch per inter-region interface.

Trying to match regions to existing cell zones.


Number of regions:3

Writing region per cell file (for manual decomposition) to "/home/1016914/Ladle_Tapered/constant/cellToRegion"

Writing region per cell as volScalarField to "/home/1016914/Ladle_Tapered/0/cellToRegion"

Region    Cells
------    -----
0    100000
1    80000
2    32000

Region    Zone    Name
------    ----    ----
0    -1    domain0
1    -1    domain1
2    -1    domain2

Sizes of interfaces between regions:

Interface    Region    Region    Faces
---------    ------    ------    -----

Reading volScalarField cellToRegion


Adding patches


Adding patches


Region 0
-------- 
Creating mesh for region 0 domain0
Testing:"/home/1016914/Ladle_Tapered/system/domain0/fvSchemes"
Writing dummy "domain0/fvSchemes"
Writing dummy "domain0/fvSolution"
Mapping fields
Mapping field cellToRegion
Deleting empty patches
Writing new mesh
Writing addressing to base mesh
Writing map pointRegionAddressing from region0 points back to base mesh.
Writing map faceRegionAddressing from region0 faces back to base mesh.
Writing map cellRegionAddressing from region0 cells back to base mesh.
Writing map boundaryRegionAddressing from region0 boundary back to base mesh.

Region 1
-------- 
Creating mesh for region 1 domain1
Testing:"/home/1016914/Ladle_Tapered/system/domain1/fvSchemes"
Writing dummy "domain1/fvSchemes"
Writing dummy "domain1/fvSolution"
Mapping fields
Mapping field cellToRegion
Deleting empty patches
Writing new mesh
Writing addressing to base mesh
Writing map pointRegionAddressing from region1 points back to base mesh.
Writing map faceRegionAddressing from region1 faces back to base mesh.
Writing map cellRegionAddressing from region1 cells back to base mesh.
Writing map boundaryRegionAddressing from region1 boundary back to base mesh.

Region 2
-------- 
Creating mesh for region 2 domain2
Testing:"/home/1016914/Ladle_Tapered/system/domain2/fvSchemes"
Writing dummy "domain2/fvSchemes"
Writing dummy "domain2/fvSolution"
Mapping fields
Mapping field cellToRegion
Deleting empty patches
Writing new mesh
Writing addressing to base mesh
Writing map pointRegionAddressing from region2 points back to base mesh.
Writing map faceRegionAddressing from region2 faces back to base mesh.
Writing map cellRegionAddressing from region2 cells back to base mesh.
Writing map boundaryRegionAddressing from region2 boundary back to base mesh.
End
Any help would be greatly appreciated.

Thanks.
Struggle_Achieve is offline   Reply With Quote

Old   August 3, 2016, 02:56
Default found
  #2
Member
 
Sing
Join Date: Jan 2016
Posts: 30
Rep Power: 10
Struggle_Achieve is on a distinguished road
Hello everyone,
I found the answer just run the checkMesh!!!
Struggle_Achieve is offline   Reply With Quote

Old   March 9, 2017, 02:46
Default
  #3
New Member
 
Dmitry Koltashev
Join Date: Feb 2017
Posts: 5
Rep Power: 9
toro-boro is on a distinguished road
I have the same problem, I think. Maybe you can help me?)
toro-boro is offline   Reply With Quote

Old   June 17, 2019, 09:29
Default
  #4
Member
 
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 8
Saleh Abuhanieh is on a distinguished road
For foam-extend:


splitMeshRegions -makeCellZones -overwrite
Zane likes this.
Saleh Abuhanieh is offline   Reply With Quote

Reply


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
isolated fluid regions were found alfin CFX 14 October 8, 2015 01:36
Merge multiple regions to use simpleFoam arnaud6 OpenFOAM Pre-Processing 6 June 24, 2015 02:48
[snappyHexMesh] Debug option in snappy / Write volScalarField with cellLevel for postprocessing Ruli OpenFOAM Meshing & Mesh Conversion 1 March 30, 2014 08:57
[mesh manipulation] cellSet - how to define a hollow cylinder RugbyGandalf OpenFOAM Meshing & Mesh Conversion 2 December 17, 2012 02:34
Splitting regions king_steve STAR-CCM+ 1 September 27, 2010 12:48


All times are GMT -4. The time now is 17:03.