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

using setFields Dict

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

Reply
 
LinkBack Thread Tools Display Modes
Old   November 15, 2010, 17:54
Default using setFields Dict
  #1
Member
 
Sandeep
Join Date: Jul 2010
Posts: 47
Rep Power: 6
gandesk is on a distinguished road
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!!
gandesk is offline   Reply With Quote

Old   November 16, 2010, 03:39
Default
  #2
Senior Member
 
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 9
colinB is on a distinguished road
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
colinB 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
InterFoam - setFields for a non-rectangular 3D domain Ak_cfd OpenFOAM Running, Solving & CFD 19 April 14, 2012 16:23
Problem with setFields svevo OpenFOAM 3 November 10, 2011 08:31
SetFields runs with no errors but doesnbt change fields adamsview OpenFOAM Pre-Processing 2 September 24, 2010 05:30
question on setFields fijinx OpenFOAM Running, Solving & CFD 1 February 15, 2010 16:07
InterDyMFoam and problem with setFields chris_sev OpenFOAM Running, Solving & CFD 1 March 23, 2009 23:23


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