CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM

chtMultiRegionFoam + Sphere mesh + makeCellset.setSets

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 21, 2011, 09:53
Default chtMultiRegionFoam + Sphere mesh + makeCellset.setSets
  #1
Member
 
Alpesh Vora
Join Date: Jan 2011
Location: Cottbus, Germany
Posts: 47
Rep Power: 6
alvora is on a distinguished road
Hello friends,

I am using chtmultiregion foam to solve my problem. I changed the chtmultiregionFoam solve according to my requirement and I run on heater problem which gave perfect result.
But, I need sphere in my problem instead of heater. Two spheres are in one cube.

I also found the command "cylinderToCell" from utilities/mesh/manipulation/cellsets.

In heater problem, the geometry is simple, hence, it is easy to define by blockMesh and after that by makeCellSet.setSets. But, for sphere, how we can define in blockMeshDict and makecellSet.setSet file?
can we define cube in blockMeshDict and sphere from makecellset.setset file by using cylinderToCell command? if yes, how we can subtract a sphere from the cube?
Or should I have to use snappyHexMesh? then, can snappyHexMesh combine in shtmultiregionfom for two different region?

or should I have to make a geometry in gmsh or any other software and import in opefoam?

please, tell me which one is possible and easy..
Thanx in advance

kind regards
Alpesh
alvora is offline   Reply With Quote

Old   March 21, 2011, 10:49
Default
  #2
Member
 
Frederic Collonval
Join Date: Apr 2009
Location: Technische Universitaet Munich - Lehrstuhl fuer Thermodynamik
Posts: 53
Rep Power: 8
fcollonv is on a distinguished road
Hello Alpesh,

It is even easier than that. You can use sphereToCell

cellSet c0 new sphereToCell (cx cy cz) R

Usage: sphereToCell (centreX centreY centreZ) radius
Select all cells with cellCentre within bounding sphere

Good luck,

Frederic

PS: Remember that the sphere won't have a spherical shape but will be approximate by the elements (probably hexahedrons) of the mesh. If you really need a good surface, you will have to move to dedicated mesh tools.
__________________
Frederic Collonval
Technische Universität München
Thermodynamics Dpt.
fcollonv is offline   Reply With Quote

Old   March 21, 2011, 11:08
Default
  #3
Member
 
Alpesh Vora
Join Date: Jan 2011
Location: Cottbus, Germany
Posts: 47
Rep Power: 6
alvora is on a distinguished road
Hi Frederic Collonval,

Thank you very much for your reply...

I tried with that and I got sphere shape but it is not really sphere.. I think I have to use very dense mesh..then surface will transform in spherical shape..
But, I am getting problem in surrounding air region.. should I have to define surrounding region in makecellsets.setset or in blockmeshDict?

regards
alpesh
alvora is offline   Reply With Quote

Old   March 21, 2011, 12:47
Default Generate geometry for multi-domain simulation
  #4
Member
 
Frederic Collonval
Join Date: Apr 2009
Location: Technische Universitaet Munich - Lehrstuhl fuer Thermodynamik
Posts: 53
Rep Power: 8
fcollonv is on a distinguished road
Quote:
Originally Posted by alvora View Post
I tried with that and I got sphere shape but it is not really sphere.. I think I have to use very dense mesh..then surface will transform in spherical shape..
It is what I meant with the PS before...


Quote:
But, I am getting problem in surrounding air region.. should I have to define surrounding region in makecellsets.setset or in blockmeshDict?
Okay let describe the Allrun script of the tutorial chtMultiRegionSimpleFoam
Code:
rm -rf constant/polyMesh/sets //remove the previous sub-parts of the mesh

runApplication blockMesh // create the mesh for all parts (don't care about the properties of the cells)
runApplication setSet -batch makeCellSets.setSet // split the mesh in sub region - the best is selected obvious part (like the sphere) in separate cellSet and select the other cells by selecting all the previously created parts and finally inverting the selection

rm -f constant/polyMesh/sets/*_old // Remove not needed part

runApplication setsToZones -noFlipMap // Transform the sets in Zones
runApplication splitMeshRegions -cellZones -overwrite // create the regions from the zones
So a solution is to create the mesh with blockMesh having the size of the cube. Then you select the two spheres in dedicated cellSet and create a last set containing every cells except those of the spheres.

Good luck,

Frederic
__________________
Frederic Collonval
Technische Universität München
Thermodynamics Dpt.

Last edited by fcollonv; March 21, 2011 at 12:48. Reason: change formatting
fcollonv is offline   Reply With Quote

Old   March 22, 2011, 03:44
Default
  #5
Member
 
Alpesh Vora
Join Date: Jan 2011
Location: Cottbus, Germany
Posts: 47
Rep Power: 6
alvora is on a distinguished road
Hi Frederic Collonval,

Thank you very much for your help..

I tried and it's working perfectly..
but, when I tried to make dense mesh, some pointer error came. so, I think I have to make mesh in other opensource pre-processing software to get perfect sphere shape. can I do that way?

again thanx alt..

regards
Alpesh
alvora is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SnappyHexMesh for internal Flow vishwa OpenFOAM Native Meshers: snappyHexMesh and Others 23 August 6, 2014 03:50
potentialFoam around a sphere ; mesh by Gmsh eliam OpenFOAM Running, Solving & CFD 12 January 26, 2011 04:02
dynamic mesh - sphere falling through fluid volume accelerated by gravity onely. alexmeier FLUENT 1 June 26, 2010 08:33
hexa mesh around a sphere within a cylinder:fluent HK Main CFD Forum 1 March 20, 2008 11:54
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 18:10


All times are GMT -4. The time now is 01:21.