CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Help with multiRegionHeater tutorial (https://www.cfd-online.com/Forums/openfoam/71938-help-multiregionheater-tutorial.html)

menorka January 20, 2010 09:25

Help with multiRegionHeater tutorial
 
I'm trying to understand the Allrun file in the multiRegionHeater tutorial. Reading from the top I get into trouble quite early: Old files are removed. BlockMesh is run. Looking through the blockMeshDict file all that is declared is a simple cube - nothing else. Then setSet with the batch file makeCellSets.setSet.

Looking through makeCellSets.setSet I can figure out what's going on here. The heater is created, something is added to the heater. Left and right solids declared. TopAir is set and bottomAir is created of what's left.

What puzzles me are the coordinates. The box defined in blockMeshDict is only 0.2x0.08x0.1. Having coordinates like (-0.01 0 -100 ) makes no sense. I can't for the life of me figure out what I'm looking at. What are the arguments passed on to cellSet in this case?

Code:

cellSet heater new boxToCell (-0.01    0 -100 )(0.01 0.01 100)

kpm January 21, 2010 21:12

boxToCell defines a box, and every cell whose cell center is within that box is selected.

The Coordinates are simply the Coordinates of two opposing corners of that box: (minX minY minZ) (maxX, maxY, maxZ)

So the dimensions of the box would be (maxX-minX maxY-minY maxZ-minZ), in this case 0.02 x 0.01 x 200.

The box is not required to be limited to "valid" coordinates within Your mesh; -100 and 100 just select the entire mesh in Z direction.

boxToCell is also one of a few very rare issues where the UserGuide would have actually been helpful, have a look at tutorial 2.3 Breaking of a dam, 2.3.3 Setting initial field.


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