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

cyclic BC

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

Like Tree4Likes
  • 1 Post By Raymond.Leoi
  • 2 Post By cfdonline2mohsen
  • 1 Post By mohammad81

Reply
 
LinkBack Thread Tools Display Modes
Old   July 2, 2013, 11:28
Question cyclic BC
  #1
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 5
Raymond.Leoi is on a distinguished road
I try to set up a translational periodic boundary condition. Any idea on how to specify it and set up pressure gradient?

Cheers,
Raymond
ScarFace likes this.
Raymond.Leoi is offline   Reply With Quote

Old   July 2, 2013, 13:40
Default
  #2
Senior Member
 
cfdonline2mohsen's Avatar
 
Mohsen KiaMansouri
Join Date: Jan 2010
Location: CFD Lab
Posts: 117
Rep Power: 7
cfdonline2mohsen is on a distinguished road
I quote the user guide section 5.2.2 Base types :
Quote:
cyclic: Enables two patches to be treated as if they are physically connected; used for repeated geometries, e.g. heat exchanger tube bundles. One cyclic patch is linked to another through a neighbourPatch keyword in the boundary file. Each pair of connecting faces must have similar area to within a tolerance given by the matchTolerance keyword in the boundary file. Faces do not need to be of the same orientation.
thus cyclic b.c. can be specified using:
Code:
type cyclic;
in the blockMesh. have a look at the section 5.3.1.4 of the user guide in: 5.3.1 Writing a blockMeshDict file
I quote it again:
Quote:
When specifying a cyclic patch in blockMesh, the user must specify the name of the related cyclic patch through the neighbourPatch keyword. For example, a pair of cyclic patches might be specified as follows:

left
type cyclic;
neighbourPatch right;
faces ((0 4 7 3));

right
type cyclic;
neighbourPatch left;
faces ((1 5 6 2));
and then in the 0 folder for the desired quantities use the cyclic keyword.

you can explain your case in detail for further help!
mohammad81 and ScarFace like this.
__________________
“If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas.”
cfdonline2mohsen is offline   Reply With Quote

Old   July 3, 2013, 03:59
Default
  #3
Member
 
Join Date: Feb 2012
Posts: 57
Rep Power: 5
Raymond.Leoi is on a distinguished road
Let's say the case is the fully-developed laminar flow in a pipe, where the outlet is the same to the inlet. In general, we can specify the velocity or the pressure gradient. Is it clear to you?
Raymond.Leoi is offline   Reply With Quote

Old   July 4, 2013, 06:06
Default In which file?
  #4
New Member
 
Mohammad
Join Date: Jul 2013
Posts: 10
Rep Power: 4
mohammad81 is on a distinguished road
Thanks for your good comment.
I am new to OpenFOAM, so forgive my simple question.
1. I did not understand; shall we write this cyclic commands:

left
type cyclic;
neighbourPatch right;
faces ((0 4 7 3));

right
type cyclic;
neighbourPatch left;
faces ((1 5 6 2));


"in blockMeshDict" file or "boundary" file? since I think the format you entered here seems to be for boundary, but it is said that it is for blochMeshDict.
2. What shall we also write for U and P conditions? something like this:

for p:
type: cyclic
value: uniform 0


for U:
type: cyclic
value: uniform (0 0 0)

Thanks again.
ScarFace likes this.
mohammad81 is offline   Reply With Quote

Old   July 25, 2013, 17:35
Default
  #5
New Member
 
Juan Pablo Toro Labbe
Join Date: Jun 2013
Location: Davis CA
Posts: 7
Rep Power: 4
jptorol is on a distinguished road
Dear mohammad81:

Generally speaking write in BlockMeshDict, actually boundary file is an output.
Regards,

JP
jptorol is offline   Reply With Quote

Old   July 26, 2013, 06:08
Default
  #6
New Member
 
Andre Weiner
Join Date: Aug 2012
Posts: 27
Rep Power: 4
andre.weiner is on a distinguished road
Quote:
Originally Posted by Raymond.Leoi View Post
I try to set up a translational periodic boundary condition. Any idea on how to specify it and set up pressure gradient?

Cheers,
Raymond

Hello,

i was facing the same problem some time ago. Have a look at the channel395 tutorial
.../tutorials/incompressible/pimpleFoam/channel395

There is a fvOption called "pressureGradientExplicitSource" in which the pressure gradient source is calculated by an average velocity. As your problem is translatory, it should work easily. (at least in my mind it works :-)
Keep in mind that currently only the kinematic pressure is handled so that you will get an unphysical static pressure field. If you don't need it for further calculations, it doesn't matter.

Best regards
andre.weiner is offline   Reply With Quote

Old   July 30, 2013, 05:46
Default
  #7
Member
 
Leonardo Honfi Camilo
Join Date: Mar 2009
Location: Delft, Zuid Holland, The Netherlands
Posts: 48
Rep Power: 8
lhcamilo is on a distinguished road
Indeed you can either follow the example of the channelFoam tutorial, where a constant mass flow is imposed and a pressure gradient correction is applied after each iteration. Or you can set a fixed pressure gradient into the solver, which I reckon is a wee bit more realistic for turbulent flows.

This can be done by adding an entry to the readFields.H file that reads the value of a dimensioned vector (or scalar if you multiply it by a flowDirection vector) that reads the transportProperties file. It goes without saying that you need to add an entry to the transportProperties file as well.

In the momenum equation of the channelFoam tutorial you should have

...
==
flowDirection*gradP };

in case gradP is a scalar and

...
==
gradP };

in case gradP is a vector.
lhcamilo is offline   Reply With Quote

Old   January 21, 2014, 08:16
Default
  #8
Member
 
Manan
Join Date: Oct 2013
Location: Göteborg
Posts: 37
Rep Power: 3
MaLa is on a distinguished road
Hi lhcamilo

I tried modifying the simpleFoam solver to have a constant pressure gradient whose magnitude is equal to -1 (i.e. gradP = -1 * flow direction (1 0 0), where gradP is a dimensioned vector which I define in the createFields.H

I added the following lines in createFields.H

Info<< "Reading gradP \n"<<endl;
volVectorField gradP
(
IOobject
(
"gradP",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedVector("gradP", dimensionSet(0,1,-2,0,0,0,0), Foam::vector(-1,0,0))
);

Also, I modified my simpleFoam Solver by changing the momentum predictor equation in UEqn.H

// Momentum predictor

tmp<fvVectorMatrix> UEqn
(
fvm::div(phi, U)
+ turbulence->divDevReff(U)
==
fvOptions(U)
);

UEqn().relax();

fvOptions.constrain(UEqn());

// solve(UEqn() == -fvc::grad(p));

solve(UEqn() == -gradP);
fvOptions.correct(U);

Do you think this should do the trick? Do you know if I need to change something in pEqn.H?
MaLa 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
Cyclic Mesh Error vbchris OpenFOAM Meshing & Mesh Conversion 4 November 15, 2012 14:04
Cyclic bc. and overlapGgi Pekka OpenFOAM 12 February 15, 2012 08:10
Handling cyclic BC from gambit to openfoam for a cascade airfoil problem - OF 1.6 maverick OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 June 18, 2011 04:36
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 18:08
snappyHexMesh with cyclic patches? Axel_T OpenFOAM Native Meshers: snappyHexMesh and Others 1 October 12, 2010 10:03


All times are GMT -4. The time now is 00:59.