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

cyclic BC

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 2 Post By Raymond.Leoi
  • 3 Post By cfdonline2mohsen
  • 1 Post By mohammad81
  • 1 Post By andre.weiner

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 2, 2013, 11:28
Question cyclic BC
  #1
Member
 
Join Date: Feb 2012
Posts: 59
Rep Power: 14
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 and Luttappy like 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: 118
Rep Power: 16
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, ScarFace and shadabdyn 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: 59
Rep Power: 14
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: 12
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: 12
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: 29
Rep Power: 13
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
Udvavisk likes this.
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: 60
Rep Power: 17
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, 07:16
Default
  #8
Member
 
Manan
Join Date: Oct 2013
Location: Göteborg
Posts: 37
Rep Power: 12
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

Old   August 26, 2016, 15:34
Default
  #9
New Member
 
Udvavisk Technologies
Join Date: Jun 2016
Location: India
Posts: 1
Rep Power: 0
Udvavisk is on a distinguished road
Hey Andre, Thanks. I struggled a lot for this.
__________________
Best Regards,

Udvavisk Technologies
Udvavisk is offline   Reply With Quote

Old   December 13, 2016, 11:40
Default How to set up cyclic boundary condition in a 3D model
  #10
New Member
 
N/A
Join Date: Dec 2016
Posts: 5
Rep Power: 9
GKARIMI is on a distinguished road
Hi All,

I am new in OP, I have a rotating object which has axisymmetric feature in a 3D geometry. I modeled it with MRF method, however since it is a large model, it takes a long time to converge, so I want to use symmetry of the geometry and just solve part of the geomtry. I don't know how I should apply cyclic boundary for meshing (blockmesh, snappyHexmesh), I was wondering if anybody could help me. Thank you in advance.
GKARIMI 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
[mesh manipulation] Cyclic Mesh Error vbchris OpenFOAM Meshing & Mesh Conversion 4 November 15, 2012 13:04
Cyclic bc. and overlapGgi Pekka OpenFOAM 12 February 15, 2012 07:10
[Commercial meshers] Handling cyclic BC from gambit to openfoam for a cascade airfoil problem - OF 1.6 maverick OpenFOAM Meshing & Mesh Conversion 2 June 18, 2011 04:36
Pressure instability with rhoSimpleFoam daniel_mills OpenFOAM Running, Solving & CFD 44 February 17, 2011 17:08
[snappyHexMesh] snappyHexMesh with cyclic patches? Axel_T OpenFOAM Meshing & Mesh Conversion 1 October 12, 2010 10:03


All times are GMT -4. The time now is 04:35.