CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   cyclic boundary condition doesn't work in a tube ?? (http://www.cfd-online.com/Forums/openfoam/75061-cyclic-boundary-condition-doesnt-work-tube.html)

 Cyp April 15, 2010 08:51

cyclic boundary condition doesn't work in a tube ??

Hi !

I try to simulate a flow through a tube (2D) with cyclic boundary condition at the inlet and the outlet.

A poiseuille's flow profile (parabolic) is expected along the tube. However, it works only after a distance from the inlet. I belevied that with the cyclic condition, I will get the same profile all along the tube. Why does my simulation is like that ??

I obtain exactly the same profile when I define my inlet and outlet as "patch".

My initial conditions are :

p :
inlet
{
}

outlet
{
type fixedValue;
value uniform 0;

U :
outlet
{
}

inlet
{
type fixedValue;
value uniform (4 0 0);
}

Cyp

 David_010 April 15, 2010 08:55

Can you put here the cyclic condition you have used?

David

 Cyp April 15, 2010 09:05

In my blockMeshDict I defined :

patches
(
cyclic inlet
(
(0 4 7 3)
)
cyclic outlet
(
(1 5 6 2)
)
wall fixedWalls
(
(3 7 6 2)
(1 5 4 0)
)
empty frontAndBack
(
(0 3 2 1)
(4 5 6 7)
)
);

It is the question you asked me ?

 Cyp April 15, 2010 11:00

Indeed, I haven't well defined my cyclic condition.

It works now when I defined inout instead of inlet and outlet patches.

cyclic inout
(
(0 4 7 3)
(1 5 6 2)
)

For my pressure initial condition, I used

inout
{
type fan;
patchType cyclic;
f List<scalar> 1(-5.00); // p_OF = p_real / rho
value uniform 0;
}

Is it the single manner to do ?

 David_010 April 15, 2010 12:11

Yes it is the correct manner. You can also use de b.c directMapped, which takes the outlet velocity and recicles it to the inlet patch.

David

 Cyp April 15, 2010 14:11

I improved my case considering two-phase flow. I use the interFoam solver.

I patch well my region.

When I launch the interFoam solver, I get this error message :

Code:

```Unable to set reference cell for field p     Please supply either pRefCell or pRefPoint file: /home/cyp/OpenFOAM/cyp-1.6/run/test07/system/fvSolution::PISO from line 55 to line 60.     From function void Foam::setRefCell (     const volScalarField&,     const dictionary&,     label& scalar&,     bool )     in file cfdTools/general/findRefCell/findRefCell.C at line 112. FOAM exiting```
Do you know what does it mean and what's wrong in my case ??

 David_010 April 16, 2010 15:21

I don't know what is the problem. When you tried the cyclic condition and it worked, was whit this solver? If not, perhaps this solver doesn't work with the cyclic condition and this b.c for pressure. But I'm just guessing. I suppose you want to fix the mass flux? if not, you can set only:

inout
{
type cyclic;
value uniform 0;
}

for pressure. And fix the velocity in the "boundary field" (0/U). If it still doesn't work...I don't know. But may be the directMapped condition is a good alternative.

Sorry for my poor help

David

 All times are GMT -4. The time now is 08:10.