CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Offset value (https://www.cfd-online.com/Forums/openfoam/96999-offset-value.html)

libra February 7, 2012 03:10

Offset value
 
Hi everyone
Dose anyone know what is the exact meaning of the offset value? I mean when the offset is (0 0 2), 2 is indicating a distance in z direction. If you have a pipe with an obstacle inside, is 2 indicating the distance from the inlet or from the origin of cartesian coordinate system or ....?

jona February 7, 2012 23:00

Hi Melika,

are you talking about directMapped? Then according to my understanding the offset is indicating the distance vector relative to the patch where it is specified.

So between this patch and the the offset you are creating an infinite long pipe.

Bye,

jona

libra February 8, 2012 00:36

Hi Jona
Thanks for your reply.
Exactly, I am using directMapped to create a fully developed flow in the inlet. By patch you mean inlet in my case? I'm wondering what value I should choose for the offset. :confused:

jona February 8, 2012 08:28

yes, by patch I meant your inlet patch.

I didn't found exact hints so far for the offset size, but as you can see in the "pitzdaily" case, it doesn't need to be super large.

So you can choose a relatively small offset to create your precursor domain and you will have a fully developed flow in your pipe.

libra February 10, 2012 01:20

The only offset value I can choose in order to make my case work is (0 0 0). I couldn't make it work for any other value. :confused: Do you have any idea about this problem?
Thank you

jona February 13, 2012 13:40

Hi,

1. What OpenFOAM version are you using?

2. LES or RANS?

3. How is your blockMeshDict entry for the inlet looking?

I did RANS with OF 2.0 with the following entry in my blockMeshDict:

inlet
{
type directMappedPatch;
offset ( 0.25 0 0 );
sampleMode nearestCell;
sampleRegion region0;
samplePatch none;

faces
(
(0 4 7 3)
);
}

and it worked pretty well.

( with 0.25 being one quarter of my domain)

libra February 14, 2012 21:31

Hi Jona
I am using LES with openfoam version 1.6. This is how my entry for inlet looks like:

inlet
{
type directMappedPatch;
nFaces 2000;
startFace 2002440;
sampleMode nearestCell;
sampleRegion region0;
samplePatch none;
offset ( 0 0 0 );
}

And here are the faces on the inlet(blockMeshDict):

patch inlet
(
(0 1 2 3)
(8 0 3 9)
(12 8 9 13)
(16 12 13 17)
(20 16 17 21)
(3 2 25 24)
(9 3 24 28)
(13 9 28 30)
(17 13 30 32)
(21 17 32 34)
(32 30 28 36)
(34 32 36 38)
(36 28 24 40)
(38 36 40 42)
(40 24 25 44)
(42 40 44 46)
(48 49 16 20)
(49 52 12 16)
(52 54 8 12)
(54 1 0 8)
(56 20 21 58)
(60 56 58 62)
(64 60 62 66)
(68 64 66 70)
(72 68 70 74)
(58 21 34 76)
(62 58 76 78)
(66 62 78 80)
(70 66 80 82)
(74 70 82 84)
(76 34 38 86)
(78 76 86 80)
(86 38 42 88)
(80 86 88 82)
(82 88 90 84)
(88 42 46 90)
(92 48 20 56)
(94 92 56 60)
(96 94 60 64)
(72 96 64 68)
(100 98 48 92)
(102 100 92 94)
(104 102 94 96)
(106 104 96 72)
(110 108 98 100)
(112 110 100 102)
(114 112 102 104)
(116 114 104 106)
(118 116 106 72)
(122 120 108 110)
(124 122 110 112)
(126 124 112 114)
(128 126 114 116)
(130 128 116 118)
(134 132 120 122)
(126 134 122 124)
(138 136 132 134)
(128 138 134 126)
(142 140 136 138)
(130 142 138 128)
(98 144 49 48)
(144 146 52 49)
(146 148 54 52)
(148 150 1 54)
(108 152 144 98)
(152 154 146 144)
(154 156 148 146)
(156 158 150 148)
(158 160 1 150)
(120 162 152 108)
(162 164 154 152)
(164 166 156 154)
(166 168 158 156)
(168 170 160 158)
(132 172 162 120)
(172 166 164 162)
(136 174 172 132)
(174 168 166 172)
(140 176 174 136)
(176 170 168 174)
)

jona February 15, 2012 12:41

Hi,

I am not very familiar with 1.6 and also the structure of the blockMeshDict changed a little, but if you are running a non updated version of OF 1.6, your problem could perhaps be related to

http://www.cfd-online.com/Forums/ope...hod-1-6-a.html

Otherwise, did you already check the tutorials

$ run
$ cd tutorials
$ fgrep -r "nearestCell" *

libra February 23, 2012 21:28

Thanks Jona
The problem was that I should define my vector in the opposite direction.
Problem solved. :)


All times are GMT -4. The time now is 08:29.