CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   using setFields Dict (http://www.cfd-online.com/Forums/openfoam/82067-using-setfields-dict.html)

gandesk November 15, 2010 17:54

using setFields Dict
 
As per the dam example in the below link, the requirement is to create a rectangle block setFields. How to create other shapes?? Is there any documentation for creating other required shapes.

http://www.openfoam.com/docs/user/da...hp#x7-500002.3

First of all I didnot understand how did he define the rectangle block in the above example. It would be great if anyone can help me in that.

Also I would like to create a semi circular shape for my case in my 2-D Axisymmetric domain. My domain is in the shape of a wedge to consider axi symmetric case. I am including my blockMeshDict file if you want to look at my mesh.

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.1 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 0.001;

vertices
(
(-2 0 0)
(0 0 0)
(-2 1.5 -0.0327457)
(0 1.5 -0.0327457)
(-2 1.5 0.0327457)
(0 1.5 0.0327457)
);

blocks
(
hex (0 1 3 2 0 1 5 4) (100 75 1) simpleGrading (1 1 1)
);

edges
(
);

patches
(
patch side
(
(0 0 4 2)

)
patch up
(
(2 4 5 3)

)
wall Fixedwall
(
(1 3 5 1)

)
empty axis
(
(0 1 1 0)

)
wedge front
(
(0 1 5 4)
)
wedge back
(
(0 2 3 1)
)
);

mergePatchPairs
(
);

// ************************************************** *********************** //

Any help would be greatly appreciated!!

colinB November 16, 2010 03:39

Good Morning,

the box is created actually very easy.
They use two corner points (X Y Z) of the box they want to have, which
are not neighbours.

example:

box (-50 0 -30) (220 90 6.5)

this dscribes a box with the length in x direction of 270 m in y direction with 90 m and in z direction with 36.5 m

for a sphere I'm not 100% shure but you coulkd give it a try:

sphere ( X Y Z) r with r as the radius.

I got this idea from the sHMD file where you can define a searchableBox
which is defined the same way like the box above and they offer also the searchableRegion sphere so this is why I came up with the idea.

hope that helps
regards
Colin


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