CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   cyclic boundary condition (http://www.cfd-online.com/Forums/openfoam/85969-cyclic-boundary-condition.html)

huxiaoxia March 10, 2011 12: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 12: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 14:12

cyclic BC
 
Thanks a lot.

longamon March 14, 2011 15: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


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