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

Defining "cyclic" B.C. problem

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

Reply
 
LinkBack Thread Tools Display Modes
Old   September 28, 2010, 09:27
Default Defining "cyclic" B.C. problem
  #1
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
Dear Foamers,
i made a 3-D mesh with Gambit for backward facing step. i want define front and back boundary condition as "cyclic". the problem is after writing polymesh by fluent3DMeshToFoam and creation of polyMesh i can't use pisoFoam because of error.
typing checkMesh led to:

HTML Code:
Create time

Create polyMesh for time = 0



--> FOAM FATAL ERROR: 
face 0 area does not match neighbour 102850 by 139.834% -- possible face ordering problem.
patch:frontAndBack my area:5.42258e-07 neighbour area:9.60035e-08 matching tolerance:0.001
Mesh face:5438360 vertices:4((0.49476 0.1143 -0.0127) (0.5 0.1143 -0.0127) (0.5 0.114197 -0.0127) (0.49476 0.114197 -0.0127))
Neighbour face:5541210 vertices:4((0.0644278 0.1143 0.0127) (0.0635 0.1143 0.0127) (0.0635 0.114197 0.0127) (0.0644278 0.114197 0.0127))
Rerun with cyclic debug flag set for more information.
maysmech is offline   Reply With Quote

Old   September 28, 2010, 09:42
Default
  #2
Member
 
Simon Lapointe
Join Date: May 2009
Location: Québec, Qc, Canada
Posts: 33
Rep Power: 8
Simon Lapointe is on a distinguished road
Hi,

I've run into this problem before. I suggest you create your cyclic patch in OF afterwards using "createPatch". Instead of defining one cyclic patch in Gambit, just make two patches that you'll merge with "createPatch" once the mesh in imported. When creating the mesh on these patches, use "Link Face Meshes" in Gambit to have a good face ordering.
Simon Lapointe is offline   Reply With Quote

Old   September 28, 2010, 11:35
Default
  #3
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
By using Link Face Meshes of gambit the problem of cyclic B.C is solved.
Now, the problem is ib boundary file of polyMesh folder frontAndBack_shadow is added and i don't know what should be it defined in U, P, ... of 0 folder.
maysmech is offline   Reply With Quote

Old   September 28, 2010, 11:41
Default
  #4
Member
 
Simon Lapointe
Join Date: May 2009
Location: Québec, Qc, Canada
Posts: 33
Rep Power: 8
Simon Lapointe is on a distinguished road
Is frontAndBack_shadow your cyclic patch created using "createPatch" ? If so, the boundary definition should be "type cyclic" for all variables.
Simon Lapointe is offline   Reply With Quote

Old   September 28, 2010, 11:44
Default
  #5
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
no, it is export of gambit. i don't know how to use createPatch
maysmech is offline   Reply With Quote

Old   September 28, 2010, 14:36
Default
  #6
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
i searched whole of forum and didn't find any acceptable answer for cyclic B.C in openFoam when importing from Gambit.

Is it any idea?
maysmech is offline   Reply With Quote

Old   September 29, 2010, 00:03
Default
  #7
Senior Member
 
Travis Carrigan
Join Date: Jul 2010
Location: Arlington, TX
Posts: 127
Rep Power: 7
tcarrigan is on a distinguished road
I've seen this problem before as well. The issue is with the grid. In order to use the cyclic bc, the two patches must be point matched. The fact that you are getting tolerance and face ordering problems is because your two cyclic patches are not point matched, meaning they don't match up EXACTLY.

If you happen to be using the 1.5-dev version, I suggest switching to cyclicGgi which does not require the two patches to be point matched. It relies on weighting factors and allows for more freedom when constructing the grid, which is really useful for turbo applications.
tcarrigan is offline   Reply With Quote

Old   September 29, 2010, 01:32
Default
  #8
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
Quote:
Originally Posted by tcarrigan View Post
I've seen this problem before as well. The issue is with the grid. In order to use the cyclic bc, the two patches must be point matched. The fact that you are getting tolerance and face ordering problems is because your two cyclic patches are not point matched, meaning they don't match up EXACTLY.

If you happen to be using the 1.5-dev version, I suggest switching to cyclicGgi which does not require the two patches to be point matched. It relies on weighting factors and allows for more freedom when constructing the grid, which is really useful for turbo applications.
i am using OpenFOAM 1.7
maysmech is offline   Reply With Quote

Old   September 29, 2010, 02:42
Default
  #9
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Hello,
Quote:
Originally Posted by maysmech View Post
Is it any idea?
create cyclic BC in Gambit works as importing mesh from other software, unless you have a specific OF exporter, as in Pointwise. Thus, I will suggest to look in ./applications/utilities/mesh/manipulation/createPatch/createPatchDict. There is an example there that shows how to use createPatchDict. If you still have problems, post here and I will answer.
Cheers

mad
maddalena is offline   Reply With Quote

Old   September 29, 2010, 03:12
Default
  #10
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
Thanks for your reply.
You mean i should create mesh with Pointwise instead of Gambit?
maysmech is offline   Reply With Quote

Old   September 29, 2010, 03:34
Default
  #11
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Quote:
Originally Posted by maysmech View Post
You mean i should create mesh with Pointwise instead of Gambit?
Of course, NO! If you use Pointwise, you can create cyclics directly on the software and then export into OF without any adding steps.This is a feature of Pointwise. I do not know if it is possible or not with other software.
In any case, you can create your mesh with your preferred software, define two separate patches in it, export in OF and create the cyclic using createPatchDict. What you must assure is that the two patches are exactly equals.
Clearer?

mad
maddalena is offline   Reply With Quote

Old   September 29, 2010, 03:49
Default
  #12
Senior Member
 
maysmech's Avatar
 
Join Date: Jan 2010
Posts: 347
Blog Entries: 2
Rep Power: 8
maysmech is on a distinguished road
Quote:
What you must assure is that the two patches are exactly equals.
Two questions:
What should be it defined in gambit: periodic,wall,...?
Is it needed to link faces(Front and back) in Gambit?
maysmech is offline   Reply With Quote

Old   September 29, 2010, 05:03
Default
  #13
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Never used Gambit before for this kind of problems... however:
Quote:
Originally Posted by maysmech View Post
What should be it defined in gambit: periodic,wall,...?
It does not matter. They should be patches in OF, so you can define them as you like and then change them as patch in constant/polymesh/boundary.
Quote:
Originally Posted by maysmech View Post
Is it needed to link faces(Front and back) in Gambit?
What do you mean? in your BC definition or in mesh creation? In BC definition: no, the two boundaries must be defined separately in order to use createPatch. In mesh creation: yes, if this help to keep faces correspondence.

mad
maddalena is offline   Reply With Quote

Old   September 30, 2010, 03:18
Default
  #14
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 7
panda60 is on a distinguished road
Dear maddalena ,
two kinds of periodic boundary condition exist, one is translational, another is rotational. I know the meaning of rotational, but for translational, should define "separationVector(-2289 0 0)", do you konw the meaning of separationVector ?
panda60 is offline   Reply With Quote

Old   September 30, 2010, 03:56
Default
  #15
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Hello,
Quote:
Originally Posted by panda60 View Post
do you konw the meaning of separationVector ?
The separationVector is the distance between the two patches you want to connect.This kind of cyclic is useful if you have two patches that need to be connected in such a way that values on one patch are copied on the second patch. An example of this kind of usage is the Fan BC. More about the latter that can be found here.
Enjoy

mad

Last edited by maddalena; October 4, 2010 at 03:05.
maddalena is offline   Reply With Quote

Old   October 2, 2010, 23:02
Default
  #16
Senior Member
 
Jiang
Join Date: Oct 2009
Location: Japan
Posts: 186
Rep Power: 7
panda60 is on a distinguished road
Dear maddalena ,
Thans for your explanation, Now I unstand the meaning.
panda60 is offline   Reply With Quote

Old   March 11, 2011, 18:58
Default
  #17
Member
 
Join Date: Nov 2009
Posts: 48
Rep Power: 7
farhagim is on a distinguished road
Quote:
Originally Posted by maddalena View Post
Hello,

The separationVector is the distance between the two patches you want to connect.This kind of cyclic is useful if you have two patches that need to be connected in such a way that values on one patch are copied on the second patch. An example of this kind of usage is the Fan BC. More about the latter that can be found here.
Enjoy

mad
Hello Maddalena,

It seems that you are expert in Cyclic B.C. Would you please help me with my problem:
I create a 3D mesh(ex. cube) in Gambit, I linked the MEsh of front and Back face and make it periodic in Gambit) then I named it ex. periodic.1 and export as cube.msh.
Then I imported by fluent3DMeshToFoam to OF 1.7.1. it created two boundary in boundary file. periodic.1 &periodic.1_shadow. I changed the periodic.1_shadow to periodic.2 and use createPatch Dict. to create cyclic B.c. here is my createPatch Dict.

matchTolerance 1e-3;

// Do a synchronisation of coupled points.
pointSync true;


// Patches to create.
// If no patches does a coupled point and face synchronisation anyway.
patches
(
{
// Name of new patch
name periodic.2;

// Type of new patch
type cyclic;

// How to construct: either 'patches' or 'set'
constructFrom patches;

// If constructFrom = patches : names of patches
patches ("periodic.*");

// If constructFrom = set : name of faceSet
//set f0;
}
);

everythings was fine and I copied the new polyMesh file which was created after running createPatch in to my constant directory. I can run it in serial and works fine. But when I want to run it in Parallel I got this error. I have to mention that I use interDyMFoam for my case.

Selecting turbulence model type laminar


Reading g
Calculating field g.h


time step continuity errors : sum local = 8.951529e-06, global = -8.951529e-06, cumulative = -8.951529e-06
DICPCG: Solving for pcorr, Initial residual = 1, Final residual = 9.610304e-11, No Iterations 492
time step continuity errors : sum local = 1.227278e-15, global = -3.512952e-18, cumulative = -8.951529e-06
Courant Number mean: 0.0008794369 max: 0.009276953


Starting time loop


Interface Courant Number mean: 3.106989e-06 max: 0.2330362
Courant Number mean: 0.04397184 max: 0.4638476
deltaT = 5e-05
Time = 5e-05


Selected 704 cells for refinement out of 405600.
--> FOAM Warning :
From function syncTools<class T, class CombineOp>::syncEdgeList(const polyMesh&, UList<T>&, const CombineOp&, const T&, const bool)
in file /home/farhangi/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/syncToolsTemplates.C at line 1311
There are decomposed cyclics in this mesh with transformations.
This is not supported. The result will be incorrect

Any help ??

Thanks,

Mehran
farhagim is offline   Reply With Quote

Old   March 14, 2011, 03:25
Default
  #18
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 12
maddalena is on a distinguished road
Hi Mehran.,
Quote:
Originally Posted by farhagim View Post

Selected 704 cells for refinement out of 405600.
--> FOAM Warning :
From function syncTools<class T, class CombineOp>::syncEdgeList(const polyMesh&, UList<T>&, const CombineOp&, const T&, const bool)
in file /home/farhangi/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/syncToolsTemplates.C at line 1311
There are decomposed cyclics in this mesh with transformations.
This is not supported. The result will be incorrect
this sounds a little bit strange for me... Have you done some kind of mesh refinement? this is not a problem connected with cyclicBC itself... and in that case my "expertise" is not so useful..

mad
maddalena is offline   Reply With Quote

Old   March 14, 2011, 09:44
Default
  #19
Member
 
Alex
Join Date: Apr 2010
Posts: 32
Rep Power: 7
aloeven is on a distinguished road
Did you decompose with:

preservePatches (CyclicPatches);

This should be in system/decomposeParDict

The cyclic patches should be on the same processor. Looking at your error, you have you cyclic patches decomposed and distributed over multiple processors.
aloeven is offline   Reply With Quote

Old   March 14, 2011, 11:19
Default
  #20
Member
 
Join Date: Nov 2009
Posts: 48
Rep Power: 7
farhagim is on a distinguished road
Hi Alex,

Yes After that error I use preservePatches (CyclicPatches); for decomposing. It works with Parrallel but the problem is now with reconstructing the Meshes. Since I am using interDyMFoam, First, I have to run reconstructMesh(because the mesh has been changed) and then reconstruct it. Here is the error that I got by running the reconstructMesh:

Merge tolerance : 1e-07
Write tolerance : 1e-07
Doing geometric matching on correct procBoundaries only.
This assumes a correct decomposition.
Found 8 processor directories

Reading database "testparallelcyclic/processor0"
Reading database "testparallelcyclic/processor1"
Reading database "testparallelcyclic/processor2"
Reading database "testparallelcyclic/processor3"
Reading database "testparallelcyclic/processor4"
Reading database "testparallelcyclic/processor5"
Reading database "testparallelcyclic/processor6"
Reading database "testparallelcyclic/processor7"
Setting master time to 0.239

Reading points from "testparallelcyclic/processor0" for time = 0.239

Reading points from "testparallelcyclic/processor1" for time = 0.239

Reading points from "testparallelcyclic/processor2" for time = 0.239

Reading points from "testparallelcyclic/processor3" for time = 0.239

Reading points from "testparallelcyclic/processor4" for time = 0.239

Reading points from "testparallelcyclic/processor5" for time = 0.239

Reading points from "testparallelcyclic/processor6" for time = 0.239

Reading points from "testparallelcyclic/processor7" for time = 0.239

Overall mesh bounding box : (-1.401849e-10 0 0) (0.23858 0.235 0.04)
Relative tolerance : 1e-07
Absolute matching distance : 3.372616e-08

Constructing empty mesh to add to.

Reading mesh to add from "testparallelcyclic/processor0" for time = 0.239

Adding to master mesh


Reading mesh to add from "testparallelcyclic/processor1" for time = 0.239

Adding to master mesh



--> FOAM FATAL ERROR:
face 0 area does not match neighbour 2337 by 186.979% -- possible face ordering problem.
patcheriodic.2 my area:4.58316e-06 neighbour area:1.54214e-07 matching tolerance:0.001
Mesh face:423717 vertices:4((0.02625 0.079155 0.04) (0.02625 0.0864881 0.04) (0.025625 0.0864881 0.04) (0.025625 0.079155 0.04))
Neighbour face:426054 vertices:4((0.0529859 0.0342575 0.04) (0.053981 0.0342322 0.04) (0.0539878 0.0343869 0.04) (0.052991 0.0344122 0.04))
Rerun with cyclic debug flag set for more information.

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

FOAM exiting

Any idea why I got this message??
looking forward to hearing back from you,

Thanks,

MEhran

Quote:
Originally Posted by aloeven View Post
Did you decompose with:

preservePatches (CyclicPatches);

This should be in system/decomposeParDict

The cyclic patches should be on the same processor. Looking at your error, you have you cyclic patches decomposed and distributed over multiple processors.
farhagim 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
Problem in defining and using the deformation rate tensor titio OpenFOAM Running, Solving & CFD 0 November 19, 2009 13:50
which B.C. i should apply for this problem? raivish CFX 0 January 6, 2006 09:47
Mesh problem tuks CFX 4 May 18, 2005 14:07
problem in giving b.c kiran FLUENT 0 August 10, 2004 04:21
UDF 3D inlet b.c. problem Andrew FLUENT 4 May 25, 2004 04:24


All times are GMT -4. The time now is 18:48.