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

About cyclic boundary condition

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By atmcfd
  • 1 Post By atmcfd

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 4, 2012, 06:10
Default About cyclic boundary condition
  #1
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13
mmkr825 is on a distinguished road
Hi Foamers,
I am doing simulations on 2D channel flow. I need to apply periodic boundary condition in the X- direction. Is there any any tutorial or any case file which uses cyclic BC.

Thanks
Regards
Mallikarjuna.r
mmkr825 is offline   Reply With Quote

Old   December 4, 2012, 20:32
Default
  #2
Senior Member
 
atmcfd's Avatar
 
ATM
Join Date: May 2009
Location: United States
Posts: 104
Rep Power: 16
atmcfd is on a distinguished road
Check the OF page on cyclic BCs, if you are using any version greater than OF 2.0

http://www.openfoam.org/version2.0.0/meshing.php

For tutorials check incompressible / channelFoam / channel395. The implementation of the cyclic BC given here is fairly simple, provided you have the mesh patches already created. Else you might have to do that with topoSet and createPatch.
Let know if you have any questions.
mmkr825 likes this.
atmcfd is offline   Reply With Quote

Old   December 5, 2012, 04:53
Default
  #3
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13
mmkr825 is on a distinguished road
Hi Atm
Thanks for quick reply. I followed the tutorial incompressible / channelFoam / channel395. My case is 2D channel and I need cyclic BC in only one direction. When i compiled with blockMesh, checkMesh, there is no error.

My doubts are:

1. I have not given any value for the fields at the cyclic boundary patch. How to give inlet BC and outlet BC.

boundaryField
{
leftWall
{
type cyclic;
// type fixedValue.
// value uniform (0.003741 0 0);
}
fixedWalls
{
type fixedValue;
value uniform (0 0 0);
}
rightWall
{
type cyclic;
//type zeroGradient;
}
frontAndBack
{
type empty;
}
}

2. How to specify the total number of unit cells.

Could you please clarify my doubts.

Thanks
Regards
Mallikarjuna
mmkr825 is offline   Reply With Quote

Old   December 5, 2012, 22:32
Default
  #4
Senior Member
 
atmcfd's Avatar
 
ATM
Join Date: May 2009
Location: United States
Posts: 104
Rep Power: 16
atmcfd is on a distinguished road
Hi Mallikarjuna,

The actual format should be like this :


boundaryField
{
leftWall
{
type cyclic;
nFaces value;
startFace value
matchTolerance value;
neighbourPatch rightwall;
}
fixedWalls
{
type fixedValue;
value uniform (0 0 0);
}
rightWall
{
type cyclic;
nFaces value;
startFace value
matchTolerance value;
neighbourPatch leftwall;
}
frontAndBack
{
type empty;
}
}

2. If you are asking about the "value" you need to have here for these fields, these come after you have created patches in your mesh (using topoSet or setSet ). Then, running createPatch command would automatically generate a boundary file containing the patches in a cyclic/whatever B.C. you want, with the right values for nFaces and startFace. All of this depends on how you define topoSet.

Do you have the patches created for your mesh already? if so you can skip and directly go to just creating the boundary file.
atmcfd is offline   Reply With Quote

Old   December 6, 2012, 00:58
Default
  #5
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13
mmkr825 is on a distinguished road
Hi Atm,
I have defined as you suggested. My boundary field for velocity is:

Quote:
boundaryField
{
leftWall
{
type cyclic;
nFaces 40;
startFace 157960;
matchTolerance 0.0001;
neighbourPatch rightWall;
}
fixedWalls
{
type fixedValue;
value uniform (0 0 0);
}
rightWall
{
type cyclic;
nFaces 40;
startFace 162000;
matchTolerance 0.0001;
neighbourPatch leftWall;
}
frontAndBack
{
type empty;
}
}
In the above boundary field, i have not mentioned any value for velocity. But without PBC the velocity at the inlet is:

Quote:
inlet
{
type fixedValue;
value uniform (0.003741 0 0);
}
When i run my case file with my solver, it is running.
Later i came to know it is taking the values which i given for the internal fields.

Code:
internalField   uniform (0.0037 0 0);
But i think internalField is only for initial guess.

Is there any extra code i need to add to my case file ?

Thanks
Regards
Mallikarjuna
mmkr825 is offline   Reply With Quote

Old   December 6, 2012, 01:12
Default
  #6
Senior Member
 
atmcfd's Avatar
 
ATM
Join Date: May 2009
Location: United States
Posts: 104
Rep Power: 16
atmcfd is on a distinguished road
If you are using ChannelFoam, You have to go to constant>transportProperties
and find:
Ubar Ubar [ 0 1 -1 0 0 0 0 ] ( "value" 0 0 );
here the value is the the velocity , 0.00347 to be specified by you.
atmcfd is offline   Reply With Quote

Old   December 6, 2012, 01:33
Default
  #7
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13
mmkr825 is on a distinguished road
Hi Atm,
Thanks for quick reply. I did as you suggested.
For velocity:

Code:
U                U [ 0 1 -1 0 0 0 0 ] ( 0.003741 0 0 );
I am fresher to openFOAM. Could you please tell me at which location this value is applied. For example if i want to give value at outlet, then how could i give value.

Thanks
Regards
Mallikarjuna
mmkr825 is offline   Reply With Quote

Old   December 6, 2012, 11:21
Default
  #8
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13
mmkr825 is on a distinguished road
Hi Atm,
In my case i have not mentioned any driving force for the flow. I checked channelFoam solver, there it have additional gradp term in the momentum equation.

But in my case i don't know the driving force gradp term. Instead i know velocity at inlet and pressure at outlet. Could you please suggest me what are the changes need to do to meet my requirements.

Thanks
Regards
Mallikarjuna
mmkr825 is offline   Reply With Quote

Old   December 7, 2012, 02:10
Default
  #9
Senior Member
 
atmcfd's Avatar
 
ATM
Join Date: May 2009
Location: United States
Posts: 104
Rep Power: 16
atmcfd is on a distinguished road
A cyclic boundary condition is one in which the conditions at the outlet are replicated at the inlet. You can either specify the 1)mass flow rate (velocity) or 2) Pressure gradient (gradP). In this case the velocity u provided will calculate the mass flow rate and the code will compute the value of gradP. For details, look up the channelFoam.C code , and the numerics of the PISO method.

Quote:
Instead i know velocity at inlet and pressure at outlet. Could you please suggest me what are the changes need to do to meet my requirements.
If this is the case, why do you want to impose a cyclic B.C? You can as well give a velocity inlet-pressure outlet condition
Luttappy likes this.
atmcfd is offline   Reply With Quote

Old   December 7, 2012, 02:25
Default
  #10
Member
 
M Mallikarjuna Reddy
Join Date: Jul 2012
Posts: 91
Rep Power: 13
mmkr825 is on a distinguished road
Hi atm,
Thanks for the reply. I changed my code by following channelFoam. I succeed in getting the velocity profile.

But in my solver i have one more field (let say Temperature T). For the temperature i need to specify the fixed value at inlet. Could you please tell me what i need to change to my code to get results for temperature also.

Thanks
Mallikarjuna.r
Mallikarjuna
mmkr825 is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mixed inflow/outflow downstream boundary condition question peob OpenFOAM Running, Solving & CFD 3 February 3, 2017 10:54
cyclic boundary condition flotran OpenFOAM 3 December 19, 2011 20:13
can I use cyclic boundary condition to modeling axisymmetric flow ? mechy OpenFOAM 0 July 8, 2011 14:16
cyclic boundary condition doesn't work in a tube ?? Cyp OpenFOAM 6 April 16, 2010 15:21
fan cyclic boundary condition leejc OpenFOAM 0 April 15, 2010 16:38


All times are GMT -4. The time now is 14:51.