CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   cyclic boundary condition (https://www.cfd-online.com/Forums/openfoam-solving/85969-cyclic-boundary-condition.html)

huxiaoxia March 10, 2011 11:38

cyclic boundary condition
 
Hi,

I want to simulate the thin liquid film flow on the substrate and I need the periodic boundary condition for left, right, front and back sides of the domain. However, only the front and back sides work. When I put the cyclic BC on left and right, it shows the error "Attempt to cast type wall to type lduInterface". Does anyone know what's the problem and how to solve it?

Thanks.

ngj March 10, 2011 11:49

Hi

This error shows up, because there is a mismatch between the boundary condition in your variables, i.e. type cyclic; , and the type of boundary condition in your boundary file in <case>/constant/polyMesh/boundary. In the latter, the boundary type is set to wall, but it should be set to cyclic.

I have experienced problems in changing boundary type in my blockMeshDict and running blockMesh, however, this does not always change the boundary file.

Best regards,

Niels

huxiaoxia March 10, 2011 13:12

cyclic BC
 
Thanks a lot.

longamon March 14, 2011 14:18

Cyclic BC
 
Thanks for this, I was all afternoon trying to understand why the paraFOAM exited when I tryed to view the initial conditions (very knew to OF). :D

bongbongxanh April 13, 2011 06:34

Quote:

Originally Posted by huxiaoxia (Post 298881)
Hi,

I want to simulate the thin liquid film flow on the substrate and I need the periodic boundary condition for left, right, front and back sides of the domain. However, only the front and back sides work. When I put the cyclic BC on left and right, it shows the error "Attempt to cast type wall to type lduInterface". Does anyone know what's the problem and how to solve it?

Thanks.

Dear huxiaoxia,

Your subject happens to be my graduating thesis. I'm trying to set boundary condition for the case. Unfortunately, i don't know how to use the cyclic boundary condition, i can't set the pressure drop on the opposite cyclic planes like i did in fluent . Can you tell me how you set up your case, especially the cyclic boundary condition (i.e the pressure drop, the mass flow rate ). I use the solver InterDyMFoam. I investigates the openFoam - 1.6-ext example, the channel395 but it's seems helpless until now.
I'm very grateful if you can help. Thanks in advance

Hduy

maddalena April 13, 2011 07:37

Quote:

Originally Posted by bongbongxanh (Post 303410)
Dear huxiaoxia,

Your subject happens to be my graduating thesis. I'm trying to set boundary condition for the case. Unfortunately, i don't know how to use the cyclic boundary condition, i can't set the pressure drop on the opposite cyclic planes like i did in fluent . Can you tell me how you set up your case, especially the cyclic boundary condition (i.e the pressure drop, the mass flow rate ). I use the solver InterDyMFoam. I investigates the openFoam - 1.6-ext example, the channel395 but it's seems helpless until now.
I'm very grateful if you can help. Thanks in advance

Hduy

If you want to fix a pressure drop between the two sides of a patch, than you should use a fan bc. Search in the forum for it.

mad

bongbongxanh April 13, 2011 22:16

thank Maddalena
your comment have just saved my day :d

Btw, last night i had a look at channel foam in the tutorial of OpenFoam. It use the pressure drop at two opposite cyclic planes to create a gradient pressure. I just have a thought to implement this method in the interDyMFoam solver. My work have just begun, do you have any recommend ?

maddalena April 14, 2011 02:30

Quote:

Originally Posted by bongbongxanh (Post 303528)
thank Maddalena
your comment have just saved my day :d

Btw, last night i had a look at channel foam in the tutorial of OpenFoam. It use the pressure drop at two opposite cyclic planes to create a gradient pressure. I just have a thought to implement this method in the interDyMFoam solver. My work have just begun, do you have any recommend ?

Well, fan is a BC, thus you can use it with every solver you like without modification! I use it in every of my simpleFoam cases, but also if using chtMultiRegionFoam!


mad

bongbongxanh April 14, 2011 22:03

Hi maddelena,
Have you ever tried the fan bc on the 3d case. I have some unexplainable result in simulation

maddalena April 15, 2011 03:09

Quote:

Originally Posted by bongbongxanh (Post 303698)
Have you ever tried the fan bc on the 3d case.

Well, I do it in almost every of my simulations...
There are some issues with the fan bc you must take care of. There are some thread I have written about the subject, please search in the forum for them...


mad

huxiaoxia April 20, 2011 10:30

cyclic BC
 
Dear HuyHoang:

Sorry to reply you late. First of all, in constant/polyMesh/blockMeshDic, you have to define the cyclic boundary, e.g
cyclic back
(
(0 2 3 1)
(6 7 9 8)
)
Then , when you define all the initial or boundary conditions under the folder 0, simply use the type cyclic. e.g
back
{
type cyclic;
}

Is it clear for you?

NicolasB May 17, 2011 06:07

setting cyclic BC
 
1 Attachment(s)
Hi,
For a better understanding of OF, I'm trying to set up the Fluent's tutorials in OF.
I'm currently working on the second tutorial about Modeling Periodic Flow and Heat Transfer, with periodic conditions.
Here is what I've made:
- copy the caelinux-1.7.0/run/tutorials/heatTransfer/buoyantBoussinesqSimpleFoam/hotRoom tutorial;
- delete the constant/polyMesh directory;
- transform the mesh provided with Fluent's tutorial using the command
Code:

fluentMeshToFoam -scale 0.01 tubebank.msh
- write and execute a createPatchDict;
- copy and modify files from 0 to 1;
- prompt a foamJob buoyantBoussinesqSimpleFoam.

The point is the results are far from those obtained in Fluent, and I'm quite certain I've failed in setting up the cyclic BCs.
It would be pretty nice if someone should help me.

See the attachments for my case (due to its size, I can't join the mesh here nor the tutorial's pdf, but if you're interested in, I'd be pleased to send them by email)

e.ahmadiyan April 12, 2013 02:20

Hi dear foamers
I am working with dsmcFoam and trying to modeling a cyclic boundary conditions in a channel. My case is freeSpacePeriodic in /run/discriteMethods/dsmcFoam/freeSpacePeriodic directory.
Boundary file in this case is as below:
6
(
xPeriodic_half0
{
type cyclic;
nFaces 256;
startFace 14464;
matchTolerance 0.0001;
neighbourPatch xPeriodic_half1;
}
xPeriodic_half1
{
type cyclic;
nFaces 256;
startFace 14720;
matchTolerance 0.0001;
neighbourPatch xPeriodic_half0;
}
yPeriodic_half0
{
type cyclic;
nFaces 320;
startFace 14976;
matchTolerance 0.0001;
neighbourPatch yPeriodic_half1;
}
yPeriodic_half1
{
type cyclic;
nFaces 320;
startFace 15296;
matchTolerance 0.0001;
neighbourPatch yPeriodic_half0;
}
zPeriodic_half0
{
type cyclic;
nFaces 320;
startFace 15616;
matchTolerance 0.0001;
neighbourPatch zPeriodic_half1;
}
zPeriodic_half1
{
type cyclic;
nFaces 320;
startFace 15936;
matchTolerance 0.0001;
neighbourPatch zPeriodic_half0;
}
)

Then I have changed this boundary file as below:
6
(
xPeriodic_half0 //(wall)
{
type wall;
nFaces 256;
startFace 14464;
}
xPeriodic_half1 //(outlet)
{
type cyclic;
nFaces 256;
startFace 14720;
matchTolerance 0.0001;
neighbourPatch yPeriodic_half0;
}
yPeriodic_half0 //(inlet)
{
type cyclic;
nFaces 320;
startFace 14976;
matchTolerance 0.0001;
neighbourPatch xPeriodic_half1;
}
yPeriodic_half1 //(wall)
{
type wall;
nFaces 320;
startFace 15296;
}
zPeriodic_half0 //(frontAndBack)
{
type empty;
nFaces 320;
startFace 15616;
}
zPeriodic_half1 //(frontAndBAck)
{
type empty;
nFaces 320;
startFace 15936;
}
)
But when I run this case give this error :
--> FOAM FATAL ERROR:
face 0 area does not match neighbour by 22.22222222% -- possible face ordering problem.
patch:outlet my area:64 neighbour area:80 matching tolerance:0.0001
Mesh face:1 fc:(-5 0 0)
Neighbour fc:(0 4 0)
If you are certain your matching is correct you can increase the 'matchTolerance' setting in the patch dictionary in the boundary file.
Rerun with cyclic debug flag set for more information.

From function cyclicPolyPatch::calcTransforms()
in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 220.

FOAM exiting

Please help me to resolve this error and please introduce a tutorial about cyclic BC modeling for me.
Thanks a lot.
Best regards

e.ahmadiyan

maddalena April 12, 2013 03:52

Hi e.ahmadiyan,
maybe more detail can help us to understand what you want to do.
what openfoam version are you using? hat is your geometry? do you want to create cyclic or do you want to take given geometry and delete cyclic?

mad

e.ahmadiyan April 12, 2013 04:16

1 Attachment(s)
Hi maddalena
Thanks for your reply
I am using openFoam 2.0.1 and my geometry is a cubic L shape channel as show in the attached image Attachment 20675
I want to give cyclic BC in inlet and outlet

Best

e.ahmadiyan

maddalena April 12, 2013 04:29

Answer is quite simple then...
Quote:

Originally Posted by e.ahmadiyan (Post 420034)
xPeriodic_half1 //(outlet)
{
type cyclic;
nFaces 256;
startFace 14720;
matchTolerance 0.0001;
neighbourPatch yPeriodic_half0;
}
yPeriodic_half0 //(inlet)
{
type cyclic;
nFaces 320;
startFace 14976;
matchTolerance 0.0001;
neighbourPatch xPeriodic_half1;
}

Two faces are not equal at all!
My suggestion is to create a mesh using blockMesh or your preferred meshing software and then run createPatch.

mad

e.ahmadiyan April 12, 2013 04:55

Whats your mean about two faces are not equal?
Could is salome be a good meshing software? What is your suggestion about preferred meshing software?
In fact when we use of createPatch utility?

Tanks again.
Best.

e.ahmadiyan

maddalena April 12, 2013 05:00

Two faces are not equal since cell number is different!
You can use whatever you want as meshing software or utility. After you have a mesh, you use createPatch to crete cyclic.

Good luck.

mad

e.ahmadiyan April 12, 2013 05:04

Thanks dear maddalena
Good luck.

e.ahmadiyan

e.ahmadiyan April 14, 2013 12:50

1 Attachment(s)
Hi dear maddalena
I have creates a mesh with salome and uses of createPatch and creates a cyclic BC but I have received to below error:
FOAM Serious Error :
From function cyclicPolyPatch::order(const primitivePatch&, labelList&, labelList&) const

No base point for face 15903, 4(5708 6065 6066 5709), produces a valid tet decomposition.

All my test case...
Attachment 20766

Have you any suggestion?

Best regards.

e.ahadiyan

Danath June 10, 2013 09:30

If you convert your case from Fluent where you define the the cyclic boundary conditions .(Needless blockMeshDic)
Quote:

Originally Posted by huxiaoxia (Post 304421)
Dear HuyHoang:

Sorry to reply you late. First of all, in constant/polyMesh/blockMeshDic, you have to define the cyclic boundary, e.g
cyclic back
(
(0 2 3 1)
(6 7 9 8)
)
Then , when you define all the initial or boundary conditions under the folder 0, simply use the type cyclic. e.g
back
{
type cyclic;
}

Is it clear for you?


mohammad81 July 4, 2013 23:29

Hi everyone.
I want to use cyclic (periodic) BC for cavity problem. it sounds simple. I want to use cyclic BC for both P and U (for inlet and outlet). I want to know what I have done is correct or not. Thank you.

This is blockMeshDict:
-------------------------------------------

patches
(
wall topWall
(
(3 7 6 2)
)
wall bottomWall
(
(1 5 4 0)
)
cyclic inout
(
(0 4 7 3)
(2 6 5 1)
)
empty frontAndBack
(
(0 3 2 1)
(4 5 6 7)
)
);

-------------------------------------------
This is my Boundary file:

4
(
topWall
{
type wall;
nFaces 40;
startFace 1540;
}
bottomWall
{
type wall;
nFaces 40;
startFace 1580;
}
inout
{
type cyclic;
nFaces 40;
startFace 1620;
featureCos 0.9;
}
frontAndBack
{
type empty;
nFaces 1600;
startFace 1660;
}
)

--------------------------------------
My 0/U is:
inout
{
type cyclic;
value uniform (0 0 0);
}
---------------------------

Finally 0/P is:
inout
{
type cyclic;
value uniform 0;
}

--------------


Is this correct? I got some result. I get the linear velocity and uniform pressure (Couette Flow). But I am not sure of it.

Is this type of using cyclic correct? what is this "neigbourpathc", "fan" etc..?


Thank you very much.

desert_1250 July 10, 2013 04:24

Hi Dear mamad (oshtoli)
i think u need fan BC.
In OF the fan BC prescribes a pressure jump.
Note!The fan boundary condition is working on a cyclic patch.

defined in constant/polyMesh/boundary as
{
type cyclic;
}

and then in the pressure file 0/p:

{
type fan;
patchType cyclic;
f List<scalar> 2(10.0 -1.0);
value uniform 0;
}

The f above is a list of polynomial coefficients in the pressure jump definition

delta p = f_1 + f_2 * v + f_3 * v^2 + ...

Above only f_1 and f_2 is assigned, respectively 10.0 and -1.0.

In 0/U and so on, the ad patch is defined as cyclic.

any quastions are wellcome.
--------
Rasoul

vahidshahabi October 31, 2014 15:47

cyclic boundry condition
 
I want to simulate a channel flow in a periodically repeating geometry, the mesh generator is Gambit, I define my boundary conditions in gambit using "wall" not "periodic" or something else, after i converted the mesh with fluentMeshToFoam, in constant/polymesh/boundary i changed wall to cyclic for my periodic boundaries(inlet& outlet). As shown in blow
boundaryField
{
outlet
{
type cyclic;
neighbourPatch inlet;
}
inlet
{
type cyclic;
neighbourPatch outlet;
}
wall-h
{
type fixedValue;
value uniform 300;
}
wall-c
{
type fixedValue;
value uniform 200;
}
frontAndBackPlanes
{
type empty;
}
}


its ok, but after some times, I have following error message
FOAM FATAL ERROR, attemo to cast type patch to type LduInterface
FOAM aborting, foam::error:: print stack
Can you tell me how i solve this issue.

Thank you for your help.

nimasam November 3, 2014 08:59

use AMIcyclic,instead, it may solve your problem ;)

avinashy34 March 15, 2016 05:57

dsmcFOAM BLOCKMESHDICT
 
HI
I AM FACING A PROBLEM TO UNDERSTAND
xPeriodic_half0
{
type cyclic;
faces ((1 2 6 5));
neighbourPatch xPeriodic_half1;
COMMAND WHAT IS THE ACTUAL MEAN OF THIS CAN ANYBODY HELP ME:confused:

Persia March 23, 2016 01:53

Cyclic boundary definition
 
Quote:

Originally Posted by avinashy34 (Post 589776)
HI
I AM FACING A PROBLEM TO UNDERSTAND
xPeriodic_half0
{
type cyclic;
faces ((1 2 6 5));
neighbourPatch xPeriodic_half1;
COMMAND WHAT IS THE ACTUAL MEAN OF THIS CAN ANYBODY HELP ME:confused:

It means that "xPeriodic_half0" is a cyclic patch, which is another term for periodic BC. "xPeriodic_half0" consists of the face with corner points 1, 2, 6, and 5, and its neighbour patch is patch "xPeriodic_half1". This means that "xPeriodic_half1" and "xPeriodic_half0" will have the same values for different parameters such as velocity, pressure, or temperature.

majid pourdian August 11, 2016 17:16

cyclic Bc error
 
Hi
I have a simmulation with cyclic boundary condition and I get this error:
"Error in coupled point location"
when I change cyclic Bc to wall Bc error is disapeared.
could anyone help me?

Persia August 15, 2016 01:46

Quote:

Originally Posted by majid pourdian (Post 613712)
Hi
I have a simmulation with cyclic boundary condition and I get this error:
"Error in coupled point location"
when I change cyclic Bc to wall Bc error is disapeared.
could anyone help me?

Do the cyclic patches fully match geometrically?

majid pourdian August 15, 2016 16:17

Quote:

Originally Posted by Persia (Post 614034)
Do the cyclic patches fully match geometrically?

yes,I correct geometrically match error when I run blockMesh.now when I run checkMesh give me second error.

majid pourdian August 16, 2016 13:23

Hi esmaeil
your neighbour patch should have equal area and mesh.


All times are GMT -4. The time now is 19:43.