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

[blockMesh] multiregion mesh with blockMesh

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

Like Tree14Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2012, 08:15
Default multiregion mesh with blockMesh
  #1
Member
 
Alpesh
Join Date: Jan 2011
Location: Germany
Posts: 52
Rep Power: 15
alvora is on a distinguished road
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
alvora is offline   Reply With Quote

Old   May 1, 2012, 06:37
Default
  #2
Senior Member
 
sivakumar selvaraju
Join Date: Mar 2009
Location: India
Posts: 205
Rep Power: 18
sivakumar is on a distinguished road
Send a message via Skype™ to sivakumar
Hello Alpesh,
I think, you need to define your sphere as wall type.

with regards,
Sivakumar
sivakumar is offline   Reply With Quote

Old   May 1, 2012, 11:12
Default
  #3
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 15
Linse is on a distinguished road
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...
curiosity and Kirils like this.
Linse is offline   Reply With Quote

Old   May 1, 2012, 12:10
Default
  #4
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 21
MartinB will become famous soon enough
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
alvora, mgg, amir_kb and 6 others like this.
MartinB is offline   Reply With Quote

Old   May 1, 2012, 12:41
Default
  #5
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 15
Linse is on a distinguished road
Quote:
Originally Posted by MartinB View Post
[...]
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?
Linse is offline   Reply With Quote

Old   May 1, 2012, 12:59
Default
  #6
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 21
MartinB will become famous soon enough
Hi Bernhard,

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

Martin
MartinB is offline   Reply With Quote

Old   May 6, 2012, 13:42
Default
  #7
Member
 
Alpesh
Join Date: Jan 2011
Location: Germany
Posts: 52
Rep Power: 15
alvora is on a distinguished road
Quote:
Originally Posted by sivakumar View Post
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 is offline   Reply With Quote

Old   May 6, 2012, 13:58
Default
  #8
Member
 
Alpesh
Join Date: Jan 2011
Location: Germany
Posts: 52
Rep Power: 15
alvora is on a distinguished road
Quote:
Originally Posted by Linse View Post
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 is offline   Reply With Quote

Old   May 6, 2012, 14:18
Default
  #9
Member
 
Alpesh
Join Date: Jan 2011
Location: Germany
Posts: 52
Rep Power: 15
alvora is on a distinguished road
Quote:
Originally Posted by MartinB View Post
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
alvora is offline   Reply With Quote

Old   June 5, 2012, 10:16
Default
  #10
New Member
 
namdar
Join Date: Mar 2012
Posts: 17
Rep Power: 14
Budlo is on a distinguished road
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.
Budlo is offline   Reply With Quote

Old   June 8, 2012, 10:31
Default
  #11
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 15
Linse is on a distinguished road
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! (see link few entries above)
Linse is offline   Reply With Quote

Old   June 9, 2012, 07:11
Default
  #12
New Member
 
namdar
Join Date: Mar 2012
Posts: 17
Rep Power: 14
Budlo is on a distinguished road
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 ?
Budlo is offline   Reply With Quote

Old   June 22, 2012, 07:07
Default
  #13
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 15
Linse is on a distinguished road
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! ;-)
Linse is offline   Reply With Quote

Old   June 23, 2012, 07:21
Default
  #14
New Member
 
namdar
Join Date: Mar 2012
Posts: 17
Rep Power: 14
Budlo is on a distinguished road
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 is offline   Reply With Quote

Old   June 23, 2012, 07:28
Default
  #15
New Member
 
namdar
Join Date: Mar 2012
Posts: 17
Rep Power: 14
Budlo is on a distinguished road
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
Budlo is offline   Reply With Quote

Old   June 23, 2012, 10:12
Default
  #16
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 21
MartinB will become famous soon enough
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
MartinB is offline   Reply With Quote

Old   June 24, 2012, 04:38
Default
  #17
New Member
 
namdar
Join Date: Mar 2012
Posts: 17
Rep Power: 14
Budlo is on a distinguished road
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

Last edited by Budlo; June 27, 2012 at 09:19.
Budlo is offline   Reply With Quote

Old   July 25, 2012, 09:59
Default
  #18
New Member
 
Per Nilsson
Join Date: Mar 2009
Location: Lund, Sweden
Posts: 21
Rep Power: 17
borrbyper is on a distinguished road
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
borrbyper is offline   Reply With Quote

Old   July 25, 2012, 10:02
Default
  #19
Senior Member
 
Martin
Join Date: Oct 2009
Location: Aachen, Germany
Posts: 255
Rep Power: 21
MartinB will become famous soon enough
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
borrbyper and luiscardona like this.
MartinB is offline   Reply With Quote

Old   August 16, 2012, 09:44
Default Problems to run BlockMesh
  #20
Member
 
Paula
Join Date: Aug 2012
Posts: 30
Rep Power: 13
curiosity is on a distinguished road
Hi,

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

I´ve created the files as I´ve 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

What´s the problem?

Thanks!
curiosity is offline   Reply With Quote

Reply

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
[mesh manipulation] How to write cellSet for different regions in constant/polyMesh/sets Struggle_Achieve OpenFOAM Meshing & Mesh Conversion 3 June 17, 2019 10:29
[snappyHexMesh] Snappyhex mesh: poor inlet mesh Swagga5aur OpenFOAM Meshing & Mesh Conversion 1 December 3, 2016 17:59
Star CCM Overset Mesh Error (Rotating Turbine) thezack Siemens 7 October 12, 2016 12:14
[snappyHexMesh] SnappyHexMesh for internal Flow vishwa OpenFOAM Meshing & Mesh Conversion 24 June 27, 2016 09:54
[snappyHexMesh] SnappyHexMesh no layers and no decent mesh for complex geometry pizzaspinate OpenFOAM Meshing & Mesh Conversion 1 February 25, 2015 08:05


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