CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Native Meshers: blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/)
-   -   multiregion mesh with blockMesh (http://www.cfd-online.com/Forums/openfoam-meshing-blockmesh/99815-multiregion-mesh-blockmesh.html)

alvora April 12, 2012 08:15

multiregion mesh with blockMesh
 
Hello friends,

I am using chtmultiregion solver for my problem.. I want to mesh a sphere inside a cube.. I want to define the sphere as solid region and surrounding area as fluid region.. I don't know that how to define interface patch boundary in blockMesh.. Is there any way to split blockMesh mesh? I made a blockMeshDict for sphere inside the cube.. I ran blockMesh command and got mesh.. But now How I can define spherical part as separate region?

Regards
Alpesh

sivakumar May 1, 2012 06:37

Hello Alpesh,
I think, you need to define your sphere as wall type.

with regards,
Sivakumar

Linse May 1, 2012 11:12

Sounds like a nice - but possible! - challenge you are looking at!

Maybe there have been major changes, but to my knowledge you have to define the different regions via another dictionary file, not via blockMesh.
The blockMeshDict is there to define the mesh.
Another file is there for setting up the different regions.

If you look at the tutorial case for chtMultiRegionFoam (for example $FOAM_TUTORIALS/heatTransfer/chtMultiRegionFoam/multiRegionHeater ) you will find that there is a file called makeCellSets.setSet. This is the file where the different regions are defined.
For a basic understanding you might look into https://blinseis.web.cern.ch/blinsei...RegionFoam.pdf . I really have to review this howTo, but it describes a bit of setting up a basic case for chtMultiRegionFoam, including few explanations concerning the *.setSet file.

Unfortunately I do not know anything about round structures in setSet. So it would be great if you could share your experiences with that afterwards! ;-)

Hope this helps a bit...

MartinB May 1, 2012 12:10

Hi all,

it is possible to split a blockMesh mesh into several regions.
Give the blocks the names of the regions like this:
Code:

hex (0 1 3 2 6 7 9 8) name_of_region_1 (200 100 1)  simpleGrading (1.0 1.0 1.0)
hex (2 3 5 4 8 9 11 10) name_of_region_2 (200 100 1)  simpleGrading (1.0 1.0 1.0)

After calling blockMesh split the resulting mesh with
Code:

splitMeshRegions -cellZones -overwrite
@Bernhard: Nice tutorial, it helped me a lot when learning chtMultiRegionFoam a while ago!

Martin

Linse May 1, 2012 12:41

Quote:

Originally Posted by MartinB (Post 358654)
[...]
it is possible to split a blockMesh mesh into several regions.
Give the blocks the names of the regions like this:[...]
Martin

Gosh! You never stop learning! Thanks for that information from my side!

Just by chance: Do you know if these regions then are equal to the regions one would produce via the tutorial-way? I.e., does it replace the *.setSet-file?

MartinB May 1, 2012 12:59

Hi Bernhard,

yes, you don't need to have *.setSet files anymore.

Martin

alvora May 6, 2012 13:42

Quote:

Originally Posted by sivakumar (Post 358601)
Hello Alpesh,
I think, you need to define your sphere as wall type.

with regards,
Sivakumar

Hello sivakumar,
Thanx for your reply.. I need mesh inside the sphere also.. because I want to investigate inside the sphere also.. hence, I cannot treat as a only wall solid...

Kind regards
Alpesh

alvora May 6, 2012 13:58

Quote:

Originally Posted by Linse (Post 358644)
Sounds like a nice - but possible! - challenge you are looking at!

Maybe there have been major changes, but to my knowledge you have to define the different regions via another dictionary file, not via blockMesh.
The blockMeshDict is there to define the mesh.
Another file is there for setting up the different regions.

If you look at the tutorial case for chtMultiRegionFoam (for example $FOAM_TUTORIALS/heatTransfer/chtMultiRegionFoam/multiRegionHeater ) you will find that there is a file called makeCellSets.setSet. This is the file where the different regions are defined.
For a basic understanding you might look into https://blinseis.web.cern.ch/blinsei...RegionFoam.pdf . I really have to review this howTo, but it describes a bit of setting up a basic case for chtMultiRegionFoam, including few explanations concerning the *.setSet file.

Unfortunately I do not know anything about round structures in setSet. So it would be great if you could share your experiences with that afterwards! ;-)

Hope this helps a bit...

Hello Bernhard,
Thanx for you information and link..
I also tried with spherToCell cellSet function in .setSet dictionary.. But, it didn't generate perfect sphere (surface of sphere was zigzag..it was not smooth).. I think, because sphereToCell consider all cell centers in given redius, not the facecenters..

Kind Regards
Alpesh

alvora May 6, 2012 14:18

Quote:

Originally Posted by MartinB (Post 358654)
Hi all,

it is possible to split a blockMesh mesh into several regions.
Give the blocks the names of the regions like this:
Code:

hex (0 1 3 2 6 7 9 8) name_of_region_1 (200 100 1)  simpleGrading (1.0 1.0 1.0)
hex (2 3 5 4 8 9 11 10) name_of_region_2 (200 100 1)  simpleGrading (1.0 1.0 1.0)

After calling blockMesh split the resulting mesh with
Code:

splitMeshRegions -cellZones -overwrite
@Bernhard: Nice tutorial, it helped me a lot when learning chtMultiRegionFoam a while ago!

Martin


Hello Martin,

thank you very much..
I was not aware that how to define different regions in blockMesh dictionary.. so, I made with Gambit and it worked fine..
But, Now, I think I can make it with blockMesh..
I was not aware that we can define region name this way... Thank you very much once again...

I will make and I will reply..

Kind Regards
Alpesh

Budlo June 5, 2012 10:16

Hi All

I want change the " makecellsets.setset " for my problem.
What is the numbers in bracket in this file ?
Introduce a reference for How change this file.


thanks for your attention.

Linse June 8, 2012 10:31

Hi Budlo,

basically, the numbers in the makeCellSets.setSet tell about the dimensions of the different cells/regions. Usually they are the minimal and the maximal values for a rectangular zone. So if there is (0 0 0)(2 3 1) that would describe a box opened between points (0 0 0) and (2 3 1).

And as Martin mentioned the tutorial helped, I do not fear suggesting reading it as well! :D (see link few entries above)

Budlo June 9, 2012 07:11

Hi Linse
Thanks for your reply.
I know this note but see the example of solver in MultiRegionHeater. In this example we have a rectangular (LeftSolid) which minimum x of that is ((-0.1m)) and maximum x is ((-0.01333m)) in "controlMeshDict" but in makeCellSets.setSet write : (-100 miny minz ) (-0.01 maxy maxz) .
Why are they different ?

Linse June 22, 2012 07:07

Well, I guess there is no real reason for the numbers being different. I would guess that the region zones just have to include the whole mesh zone. So I GUESS the values were kind of chosen out of the blue, just for being big enough...

Of course, anybody knowing more about that point is welcome to correct me! ;-)

Budlo June 23, 2012 07:21

Hi dear Bernhard

Bernhard : { Just by chance: Do you know if these regions then are equal to the regions one would produce via the tutorial-way? I.e., does it replace the *.setSet-file? }

Does This reply means that with "splitMeshRegions -cellZones -overwrite " after creat blockMeshDic then we dont need creat MakeCellSet.setSet ?

Thanks a lot.

Budlo June 23, 2012 07:28

Hi Martin

What do you think about the example of solver in MultiRegionHeater ? In this example we have a rectangular (LeftSolid) which minimum x of that is ((-0.1m)) and maximum x is ((-0.01333m)) in "controlMeshDict" but in makeCellSets.setSet write : (-100 miny minz ) (-0.01 maxy maxz) .
Why are they different ?
Does your above massage means that with "splitMeshRegions -cellZones -overwrite " after creat blockMeshDic then we dont need creat MakeCellSet.setSet ?

Best Regards

MartinB June 23, 2012 10:12

Hi,

I think you don't need the makeCellSets.setSet file at all, at least in OpenFOAM-2.1.x. It might be a leftover from previous versions, or may be it's necessary in the Extend version.

Just delete the file and run the fresh tutorial case again, I suppose it's running fine.

All important stuff is defined in system/topoSetDict.

Quote:

Does your above massage means that with "splitMeshRegions -cellZones -overwrite " after creat blockMeshDic then we dont need creat MakeCellSet.setSet ?
Yes, that's right. When defining the cell zones in the blockMeshDict file and using the "-cellZones" option you don't need a makeCellSet.setSet file.

Indeed the usage of makeCellSets.setSet or the topoSetDict file is just an example for a meshing strategy that is independent from conjugate heat transfer. I.e. if you have a really simple formed computational domain consisting of blocks you can use this special meshing strategy to divide a simple block shaped mesh into several parts. On the other side if you build up your mesh in another way (multiple mesh regions in a commercial mesher, a more sophisticated blockMeshDict in combination with the "-cellZones" option, or whatever strategy you like), you can still use the conjugate heat transfer solvers and without any makeCellSets.setSet or topoSetDict file.

May be you can post a sketch of your geometry so that I can give advice on the appropriate blockMesh definition...

CU

Martin

Budlo June 24, 2012 04:38

Martin :
May be you can post a sketch of your geometry so that I can give advice on the appropriate blockMesh definition...
Martin.

Hi Martin
thanks a lot for your complete explain.
I want simulate a flow over a solid that solid has conduction in "MultiRegionHeater". the boundary between them is conjugate .

I do this procceger :
1- Make mesh in Gambit and set two region,solid and fluid, with "Internal" boundary condition at conjugate boundary same the example of solver.
2- code : runApplication fluentMeshToFoam Mymesh.msh -writeSets
3- code : runApplication setsToZones -noFlipMap
4- code : runApplication splitMeshRegion -cellZones -overwrite
5- Remove extra boundary condition in each region at 0 file (Its code is in Allrun).
5- Creat all files, boundary condition and changeDictionaryDict.
6- Make log.changeDEctionaryDic (Its code is in Allrun)
7- code : chtMultiRegionFoam
It is work for free convection but for force convection divergence.

Best Regards

borrbyper July 25, 2012 09:59

I would like to take the region creation one step further using blockMesh.

How can multiple hex-blocks be added to the same cellSet within blockMesh?
In the example given by MartinB, there is only one hex-block in each cellSet created by blockMesh.
I would like to have three connected hex-blocks in the same cellSet created by blockMesh,
thus avoiding the need to join them with e.g. setSet, before running splitMeshRegions.

Best regards

MartinB July 25, 2012 10:02

Hi Per,

just give the blocks the same name:
hex (0 1 3 2 6 7 9 8) name_of_region_1 (200 100 1) simpleGrading (1.0 1.0 1.0)
hex (2 3 5 4 8 9 11 10) name_of_region_1 (200 100 1) simpleGrading (1.0 1.0 1.0)

Now the two blocks form one region. You can add more blocks, of course.

Martin

curiosity August 16, 2012 09:44

Problems to run BlockMesh
 
Hi,

Im reading the tutorial Linse talked about ( https://blinseis.web.cern.ch/blinsei...RegionFoam.pdf .) and Im having some problems to run it.

Ive created the files as Ive read, but when I enter the command blockMesh, it appears the error message:

cannot open mesh description fil

"/home/termico/OpenFOAM/Paula-2.1.0/FOAM_RUN/MultiBlock/constant/polyMesh/BlockMeshDict"
From function blockMesh
in file blockMeshApp.c at line 148

Whats the problem?

Thanks! :)


All times are GMT -4. The time now is 22:14.