CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   How to set periodic boundaries with initial conditions? (https://www.cfd-online.com/Forums/openfoam/125311-how-set-periodic-boundaries-initial-conditions.html)

jiandai October 23, 2013 04:25

How to set periodic boundaries with initial conditions?
 
I'm using openfoam to creat a pipe.
I want to realize a periodic fluid flowing within this pipe. I set inlet and outlet as cyclic, and a initial velocity in interfild.
But after some timesteps the fluid's velocity become smaller and smaller.
What i want is a stable fluid with constant velocity.
Can anybody tell me why and how to fix this problem?

Thanks a lot.

chegdan October 23, 2013 11:25

there is no driving force for your flow therefore you see the flow decay to zero velocity. Look into using a pressure gradient driving force (pressureGradientExplicitSource) through using an fvOption. Search the forum for more details. Good luck.

Ahmed Khattab October 24, 2013 03:38

Quote:

Originally Posted by jiandai (Post 458452)
I'm using openfoam to creat a pipe.
I want to realize a periodic fluid flowing within this pipe. I set inlet and outlet as cyclic, and a initial velocity in interfild.
But after some timesteps the fluid's velocity become smaller and smaller.
What i want is a stable fluid with constant velocity.
Can anybody tell me why and how to fix this problem?

Thanks a lot.

Hi,

simply you can change your inlet BC to:

type fixedValue;
value uniform (1 0 0);

for example at inlet with pressure BC as zeroGradient.

then you can put outlet BC as zerGradient for velocity and for pressure:

type fixedValue;
value uniform 1; // note it is scalar while velocity is vector.

value here for pressure/density.

in this way to assure continues flow at pipe.

could you please share your pipe mesh with me.

good luck,

Ahmed Khattab October 24, 2013 04:11

Quote:

Originally Posted by jiandai (Post 458452)
I'm using openfoam to creat a pipe.
I want to realize a periodic fluid flowing within this pipe. I set inlet and outlet as cyclic, and a initial velocity in interfild.
But after some timesteps the fluid's velocity become smaller and smaller.
What i want is a stable fluid with constant velocity.
Can anybody tell me why and how to fix this problem?

Thanks a lot.


Hi, i may misunderstanding you.

do you mean by periodic that you want exit flow to reentering your pipe?

our you want fixed flow rate of fluid?

I’m sorry if i confused you.

jiandai October 24, 2013 04:24

Quote:

do you mean by periodic that you want exit flow to reentering your pipe?

This is what I want to achieve.

I've used "sourcesProperties".But it did not work.

all
{
type pressureGradientExplicitSource;
active on; //on/off switch
timeStart 0.0; //start time
duration 1e10; //duration
selectionMode all; //cellSet // points //cellZone

pressureGradientExplicitSourceCoeffs
{
UName U;
fieldNames ( U );
// flowDir (0 1 0 ); // set Re=64,000
Ubar (0 1 0); // desired average velocity
gradPini gradPini [0 1 -2 0 0] 0; // initial pressure gradient
}
}

jiandai October 24, 2013 04:37

Here is my blockmesh.
convertToMeters 0.001;

vertices
(
( 11.3137 0 11.3137) //0
(-11.3137 0 11.3137) //1
(-11.3137 0 -11.3137) //2
( 11.3137 0 -11.3137) //3

( 22.6274 0 22.6274) //4
(-22.6274 0 22.6274) //5
(-22.6274 0 -22.6274) //6
( 22.6274 0 -22.6274) //7


( 11.3137 100 11.3137) //8
(-11.3137 100 11.3137) //9
(-11.3137 100 -11.3137) //10
( 11.3137 100 -11.3137) //11

( 22.6274 100 22.6274) //12
(-22.6274 100 22.6274) //13
(-22.6274 100 -22.6274) //14
( 22.6274 100 -22.6274) //15
);

blocks
(
hex (2 3 11 10 1 0 8 9) (20 10 20) simpleGrading (1 1 1)
hex (7 4 12 15 3 0 8 11) (20 10 20) simpleGrading (1 1 1)
hex (4 5 13 12 0 1 9 8) (20 10 20) simpleGrading (1 1 1)
hex (5 6 14 13 1 2 10 9) (20 10 20) simpleGrading (1 1 1)
hex (6 7 15 14 2 3 11 10) (20 10 20) simpleGrading (1 1 1)
);


edges
(
arc 4 7 ( 32 0 0) //arc_0
arc 12 15 ( 32 100 0) //arc_1
arc 5 4 ( 0 0 32) //arc_2
arc 13 12 ( 0 100 32) //arc_3
arc 6 5 (-32 0 0) //arc_4
arc 14 13 (-32 100 0) //arc_5
arc 7 6 ( 0 0 -32) //arc_6
arc 15 14 ( 0 100 -32) //arc_7
);

boundary
(
INLET
{
type cyclic;
neighbourPatch OUTLET;
faces
(
(0 1 2 3)
(0 4 7 3)
(0 1 5 4)
(1 2 6 5)
(2 3 7 6)
);
}
OUTLET
{
type cyclic;
neighbourPatch INLET;
faces
(
( 8 9 10 11)
( 8 11 15 12)
( 8 12 13 9)
( 9 13 14 10)
(10 14 15 11)
);
}
FIXEDWALL
{
type wall;
faces
(
(4 7 15 12)
(4 5 13 12)
(5 6 14 13)
(6 7 15 14)
);
}
);

mergePatchPairs
(
);

Ahmed Khattab October 24, 2013 07:00

Hi,

thanks a lot for your mesh. it is quite easier from mine. i make my mesh lick triangle cheese.


All times are GMT -4. The time now is 02:31.