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

How to set periodic boundaries with initial conditions?

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

Like Tree1Likes
  • 1 Post By jiandai

Reply
 
LinkBack Thread Tools Display Modes
Old   October 23, 2013, 04:25
Default How to set periodic boundaries with initial conditions?
  #1
New Member
 
jian dai
Join Date: Oct 2013
Posts: 3
Rep Power: 3
jiandai is on a distinguished road
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.
jiandai is offline   Reply With Quote

Old   October 23, 2013, 11:25
Default
  #2
Senior Member
 
chegdan's Avatar
 
Daniel P. Combest
Join Date: Mar 2009
Location: St. Louis, USA
Posts: 546
Rep Power: 18
chegdan will become famous soon enough
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.
__________________
Dan

Find me on twitter @dancombest and LinkedIn
chegdan is offline   Reply With Quote

Old   October 24, 2013, 03:38
Default
  #3
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 161
Blog Entries: 1
Rep Power: 7
Ahmed Khattab is on a distinguished road
Quote:
Originally Posted by jiandai View Post
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 is offline   Reply With Quote

Old   October 24, 2013, 04:11
Default
  #4
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 161
Blog Entries: 1
Rep Power: 7
Ahmed Khattab is on a distinguished road
Quote:
Originally Posted by jiandai View Post
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.
Ahmed Khattab is offline   Reply With Quote

Old   October 24, 2013, 04:24
Default
  #5
New Member
 
jian dai
Join Date: Oct 2013
Posts: 3
Rep Power: 3
jiandai is on a distinguished road
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 is offline   Reply With Quote

Old   October 24, 2013, 04:37
Default
  #6
New Member
 
jian dai
Join Date: Oct 2013
Posts: 3
Rep Power: 3
jiandai is on a distinguished road
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 likes this.
jiandai is offline   Reply With Quote

Old   October 24, 2013, 07:00
Default
  #7
Senior Member
 
Ahmed Khattab's Avatar
 
ahmed
Join Date: Feb 2010
Posts: 161
Blog Entries: 1
Rep Power: 7
Ahmed Khattab is on a distinguished road
Hi,

thanks a lot for your mesh. it is quite easier from mine. i make my mesh lick triangle cheese.
Ahmed Khattab 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
Why RNGkepsilon model gives floating error shipman OpenFOAM Running, Solving & CFD 3 September 7, 2013 08:00
Floating point exception error Alan OpenFOAM Running, Solving & CFD 10 April 6, 2012 14:02
alphaEqn.H in twoPhaseEulerFoam cheng1988sjtu OpenFOAM Bugs 14 September 18, 2011 13:46
Negative value of k causing simulation to stop velan OpenFOAM Running, Solving & CFD 1 October 17, 2008 05:36
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58


All times are GMT -4. The time now is 11:56.