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

Regarding periodic BC in ICEM generated grid

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 1, 2010, 19:05
Default Regarding periodic BC in ICEM generated grid
  #1
Senior Member
 
Tarak
Join Date: Aug 2010
Location: State College, PA
Posts: 111
Rep Power: 16
Tarak is on a distinguished road
Hii,

I need to give periodic BC to 2 surfaces in my geometry to run in Openfoam. I am generating the mesh by ICEM and exporting in fluent format, but while doing fluentMeshToFoam, I am getting the error "fluent patch type periodic not recognised."

Can you please let me know of a way to give periodic condition in this case.

Thanks,
Tarak
Tarak is offline   Reply With Quote

Old   December 2, 2010, 03:27
Default
  #2
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Quote:
Originally Posted by Tarak View Post
Can you please let me know of a way to give periodic condition in this case.
Hi Tarak,
what I would do is to export the mesh defining these two faces as a normal patch (inlet for instance), use fluentMeshToFoam and then make them cyclic (= periodic) with the createPatch tool.
Enjoy,

mad
maddalena is offline   Reply With Quote

Old   December 2, 2010, 16:48
Default
  #3
Senior Member
 
Tarak
Join Date: Aug 2010
Location: State College, PA
Posts: 111
Rep Power: 16
Tarak is on a distinguished road
Hii Mad ()

I tried in exactly the same way you mentioned, but that too gives error after submitting the job (although the mesh gets converted):


FOAM FATAL ERROR:
face 0 area does not match neighbour 17884 by 101.991% -- possible face ordering problem.
patch:sides my area:2.50258e-06 neighbour area:7.71114e-06 matching tolerance:0.001
Mesh face:3306619 vertices:3((0.0296821 0.0723499 0.03) (0.0320687 0.0731075 0.03) (0.0303774 0.0746678 0.03))
Neighbour face:3324503 vertices:3((0.228765 0.132171 0) (0.231386 0.135573 0) (0.233447 0.132364 0))
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



I even tried converting the mesh by fluent3DMeshToFoam, and this case the mesh got converted, but while running the code I got the error:

--> FOAM FATAL ERROR:
Attempt to cast type patch to type lduInterface

From function refCast<To>(From&)
in file /home/44792/OpenFOAM/OpenFOAM-1.7.1/src/OpenFOAM/lnInclude/typeInfo.H at line 114.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) in "/storage/software/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/storage/software/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::Ostream& Foam:perator<< <Foam::error>(Foam::Ostream&, Foam::errorManip<Foam::error>) in "/storage/software/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/pisoFoam".........
...........


I would like to mention that the surfaces I'm trying to set as periodic are exactly parallel to each other.

Can you please help me to find a way out of this problem. In the meantime, I'm using slip wall in place of periodic.


Thanks,
Tarak
Tarak is offline   Reply With Quote

Old   December 3, 2010, 03:41
Default
  #4
Senior Member
 
Karl-Johan Nogenmyr
Join Date: Mar 2009
Location: Linköping
Posts: 279
Rep Power: 21
kalle is on a distinguished road
Hi,

the face area mis match problem is sometimes caused by round off errors. If you write out your mesh in ascii format (check controlDict) you should set the writePrecision fairly high. Try setting it to 12 and see if that solves the problem.

Good luck,
Kalle
kalle is offline   Reply With Quote

Old   December 3, 2010, 03:56
Default
  #5
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hi Tarak,
Quote:
Originally Posted by Tarak;285785[COLOR=Black
][/COLOR]I would like to mention that the surfaces I'm trying to set as periodic are exactly parallel to each other.
Thus you set the separation vector, do not you? Well...
Quote:
Originally Posted by Tarak View Post
face 0 area does not match neighbour 17884 by 101.991% -- possible face ordering problem
The tolerance error is quite high! From my experience, this may be due to a separation vector with the wrong sign. i.e: if your separationVector is (1 0 0) probably you must set it as: (-1 0 0).
Hope this help...


mad
maddalena is offline   Reply With Quote

Old   December 3, 2010, 04:07
Default
  #6
Senior Member
 
Tarak
Join Date: Aug 2010
Location: State College, PA
Posts: 111
Rep Power: 16
Tarak is on a distinguished road
@kalle

Thanks for the reply. I did that too, but I think as Mad said, since the angle is too high, it may not be caused by the precision error.

@ Mad,

Thanks. Can you please tell me what do you mean by separation angle? I do not set it either during grid generation or solving. In which folder can I find it?

Thanks,
Tarak
Tarak is offline   Reply With Quote

Old   December 3, 2010, 04:13
Default
  #7
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Quote:
Originally Posted by Tarak View Post
Thanks. Can you please tell me what do you mean by separation angle? I do not set it either during grid generation or solving. In which folder can I find it?
Well, it is a keyword of createPatchDict!
Code:
        // Type of new patch
        dictionary
        {
            type cyclic;

            // Optional: explicitly set transformation tensor.
            // Used when matching and synchronising points.
            transform translational;
            separationVector (1 0 0);
            //transform rotational;
            //rotationAxis (1 0 0);
            //rotationCentre (0 0 0);
        }
This is the line of the file you are interested in...

mad
maddalena is offline   Reply With Quote

Old   January 6, 2011, 09:48
Default
  #8
New Member
 
Mark
Join Date: Jan 2011
Posts: 2
Rep Power: 0
markto is on a distinguished road
Hi,
I'm new to this forum and to openFOAM as well and I am facing almost the same problem. For my studies I have to simulate a combustion chamber.To get familiar, I first generated a very simple model with ICEM, exported it as a fluent file, and converted it with fluent3DMeshToFoam. When I try to set the cyclic boundary conditions with createPatches I get this error:

--> FOAM FATAL ERROR:
face 0 area does not match neighbour 121 by 22.834% -- possible face ordering problem.
patch:SYM1 my area:0.322757 neighbour area:0.405954 matching tolerance:0.001
Mesh face:21982 vertices:3((-2.04504 0 0) (-2.99377 0 0) (-2.34913 0.680393 0))
Neighbour face:22103 vertices:3((-1.62165 5.7133 0) (-0.803681 6.35418 0) (-0.796178 5.36747 0))
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

The perodic patches are parallel as well (1/2 model of the combustor). I tried to change the separationVector, but this does not work (even if I change the axis from e.g. (1 0 0) to (0 1 0) the percentage of the error stays the same). Did you solve the problem, Tarak?
Thanks for help,
Mark
markto is offline   Reply With Quote

Old   April 5, 2011, 18:22
Default
  #9
Senior Member
 
Tarak
Join Date: Aug 2010
Location: State College, PA
Posts: 111
Rep Power: 16
Tarak is on a distinguished road
Hii Mark,

I couldn't solve it yet, can you please tell about your status regarding this?

Thanks,
Tarak
Tarak is offline   Reply With Quote

Old   April 5, 2011, 19:40
Default
  #10
Senior Member
 
Tarak
Join Date: Aug 2010
Location: State College, PA
Posts: 111
Rep Power: 16
Tarak is on a distinguished road
Hii Mad,

I am still stuck with the same problem. Can you please tell me in detail how to use the createPatch tool to get the desired patch? I can send you my constant directory if you need. I understood that you are asking to create the cyclic faces as two different faces (in ICEM), and then use the createPatch tool to make them cyclic. Can you please elaborate on this? So, after doing this will the two faces be treated as one single boundary? Waiting eagerly for your reply.

Thanks,
Tarak
Tarak is offline   Reply With Quote

Old   April 6, 2011, 04:00
Default
  #11
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Quote:
Originally Posted by Tarak View Post
Hii Mad,

I am still stuck with the same problem. Can you please tell me in detail how to use the createPatch tool to get the desired patch? I can send you my constant directory if you need. I understood that you are asking to create the cyclic faces as two different faces (in ICEM), and then use the createPatch tool to make them cyclic. Can you please elaborate on this? So, after doing this will the two faces be treated as one single boundary? Waiting eagerly for your reply.

Thanks,
Tarak
There is not too much to add on the subject...
  1. create the cyclic faces as two different and EXACTLY the same faces (in ICEM): copy paste is a good option
  2. define them as different boundaries
  3. Export from ICEM
  4. Convert to OpenFOAM
  5. Check constant/polyMesh/boundary: the two boundaries should be there
  6. use the createPatch tool to make them cyclic using the dictionary shown above
  7. Check constant/polyMesh/boundary: the two boundaries are no longer there, but there is the newly create cyclic. From now on, this is the only boundary you have.
Hope this is clear now

mad
maddalena is offline   Reply With Quote

Old   April 6, 2011, 04:07
Default
  #12
Senior Member
 
Tarak
Join Date: Aug 2010
Location: State College, PA
Posts: 111
Rep Power: 16
Tarak is on a distinguished road
Hii Mad,

Thanks a lot for the reply. Can you please tell me what do u exactly mean by "use the createPatch tool to make them cyclic using the dictionary shown above". Means how do I use that? Just typing createPatch in the /constant/polymesh directory is enough, or are there any arguments required?

Thanking you,
Tarak
Tarak is offline   Reply With Quote

Old   April 6, 2011, 04:13
Default
  #13
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Quote:
Originally Posted by Tarak View Post
Hii Mad,

Thanks a lot for the reply. Can you please tell me what do u exactly mean by "use the createPatch tool to make them cyclic using the dictionary shown above". Means how do I use that? Just typing createPatch in the /constant/polymesh directory is enough, or are there any arguments required?

Thanking you,
Tarak
Well, you should have a createPatchDict on your system folder, an example of it is here: ./applications/utilities/mesh/manipulation/createPatch/createPatchDict.
After editing it according to your case, you should go on your main folder (where 0, constant and system folders are) and type createPatch. As you made before...

mad
vishnuhp444 likes this.
maddalena is offline   Reply With Quote

Old   April 6, 2011, 04:17
Default
  #14
Senior Member
 
Tarak
Join Date: Aug 2010
Location: State College, PA
Posts: 111
Rep Power: 16
Tarak is on a distinguished road
Thanks a lot Mad for your prompt reply. I'll let you know if I'm stuck again!
Tarak is offline   Reply With Quote

Old   April 6, 2011, 21:53
Default
  #15
Senior Member
 
Tarak
Join Date: Aug 2010
Location: State College, PA
Posts: 111
Rep Power: 16
Tarak is on a distinguished road
Hii Mad,

I tried exactly in the same way you mentioned, but still I'm getting errors.

My createPatchDict file looks like:
dictionary
{
type cyclic;

// Optional: explicitly set transformation tensor.
// Used when matching and synchronising points.
//transform translational;
separationVector (-1 0 0);
transform rotational;
rotationAxis (1 0 0);
rotationCentre (0 0 0);
}

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

// If constructFrom = patches : names of patches. Wildcards allowed.
patches (FRONT BACK);

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

// {
// name bottom;

// Type of new patch
// dictionary
// {
// type wall;
// }

// constructFrom set;

// patches ();

// set bottomFaces;
// }

);


after running createPatch I get the following output:


Reading createPatchDict.

Using relative tolerance 0.001 to match up faces and points

Create polyMesh for time = 0.000000e+00

Adding new patch sidePatches as patch 6 from
{
type cyclic;
separationVector ( -1 0 0 );
transform rotational;
rotationAxis ( 1 0 0 );
rotationCentre ( 0 0 0 );
}


Moving faces from patch FRONT to patch 6
Moving faces from patch BACK to patch 6

Doing topology modification to order faces.

cyclicPolyPatch:rder : Writing half0 faces to OBJ file "sidePatches_half0_faces.obj"
cyclicPolyPatch:rder : Writing half1 faces to OBJ file "sidePatches_half1_faces.obj"
cyclicPolyPatch:rder : Dumping currently found cyclic match as lines between corresponding face centres to file "/storage/tnandi/OpenFOAM/tnandi-1.7.1/run/testing/sidePatches_faceCentres.obj"
--> FOAM Serious Error :
From function cyclicPolyPatch:rder(const primitivePatch&, labelList&, labelList&) const
in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 1566
Patch:sidePatches : Cannot match vectors to faces on both sides of patch
Perhaps your faces do not match? The obj files written contain the current match.
Continuing with incorrect face ordering from now on!
Dumping sidePatches half0 faces to "coupled_sidePatches_half0.obj"
Dumping sidePatches half1 faces to "coupled_sidePatches_half1.obj"
Dumping cyclic match as lines between face centres to "coupled_sidePatches_match.obj"
Synchronising points.

On coupled patch sidePatches forcing uniform rotation of (1 0 0 0 0.9889049576 -0.1485496039 0 0.1485496039 0.9889049576)
On coupled patch sidePatches forcing uniform rotation of 1((1 0 0 0 0.9889049576 -0.1485496039 0 0.1485496039 0.9889049576))
Synchronising points.
Points changed by average:0.0004458551642 max:0.06340637218



--> FOAM FATAL ERROR:
face 1 area does not match neighbour 53133 by 66.6667% -- possible face ordering problem.
patch:sidePatches my area:2.50856e-05 neighbour area:1.25428e-05 matching tolerance:0.001
Mesh face:10982591 vertices:4((0 0.00874805 0.0628) (0.00300002 0.00874805 0.0628) (0.00300002 0.0171098 0.0628) (0 0.0171098 0.0628))
Neighbour face:11035723 vertices:4((0 0.00932891 0.0621032) (0 0.0262489 0.0595616) (0.00300002 0.0262489 0.0595616) (0 0.0179799 0.0608037))
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


Can you please have a look at these and help me in some way? Another thing I wanted to tell you is that although you told me to edit the mesh in ICEM such that the cyclic surfaces are exactly opposite and equal, they were indeed like that, because they are 2 opposite faces of a cube.

Thanks,
Tarak
Tarak is offline   Reply With Quote

Old   April 7, 2011, 03:47
Default
  #16
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hi, why createPatch should work if you do not use it correctly?!? Have you looked to what you are doing?
Quote:
Originally Posted by Tarak View Post
dictionary
{
type cyclic;

// Optional: explicitly set transformation tensor.
// Used when matching and synchronising points.
//transform translational;
separationVector (-1 0 0);
transform rotational;
rotationAxis (1 0 0);
rotationCentre (0 0 0);
}

[...]

hey were indeed like that, because they are 2 opposite faces of a cube
You specified the separation vector AND than you use a rotational transformation. And then you say that the two faces are the faces of a cube. Is there any rotation between the two faces if they are faces of a cube??? I guess there is only a translation, or am I wrong?
your createPatchDict should be something like:
Code:
transform translational;
            separationVector (-1 0 0); here specify the direction from the slave to the master!
            //transform rotational;
            //rotationAxis (1 0 0);
            //rotationCentre (0 0 0)
Please, check everything before posting!

mad
maddalena is offline   Reply With Quote

Old   November 7, 2012, 12:36
Default I don't quite understand the first step
  #17
New Member
 
Qiang
Join Date: Mar 2012
Posts: 12
Rep Power: 14
wangqiangele is on a distinguished road
Hi maddalena,

I am right now also facing the problem. I want to make two walls (front & back) of a square tank cyclic.

I don't quite understand your first step:
"1 create the cyclic faces as two different and EXACTLY the same faces (in ICEM): copy paste is a good option"

in ICEM I have two surfaces called ''inlet" and "outlet".

Shall I create two surfaces called "cyclic01" & "cyclic02" containing both "inlet" and "outlet". and then define them as different boundaries?



Looking forward for your reply & big thanks in advance!

Qiang

Quote:
Originally Posted by maddalena View Post
There is not too much to add on the subject...
  1. create the cyclic faces as two different and EXACTLY the same faces (in ICEM): copy paste is a good option
  2. define them as different boundaries
  3. Export from ICEM
  4. Convert to OpenFOAM
  5. Check constant/polyMesh/boundary: the two boundaries should be there
  6. use the createPatch tool to make them cyclic using the dictionary shown above
  7. Check constant/polyMesh/boundary: the two boundaries are no longer there, but there is the newly create cyclic. From now on, this is the only boundary you have.
Hope this is clear now

mad
wangqiangele is offline   Reply With Quote

Old   November 9, 2012, 02:39
Default
  #18
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hi,
what are the faces you want to make cyclic? Front and back or inlet and outlet?

NB: cyclic definition changed in the latest OF version.

mad
maddalena is offline   Reply With Quote

Old   November 9, 2012, 09:02
Default
  #19
New Member
 
Qiang
Join Date: Mar 2012
Posts: 12
Rep Power: 14
wangqiangele is on a distinguished road
Hi mad,

I want to make inlet and outlet cyclic, I have tried the new version of createPatch. Though it states some warning, I can view the mesh correctly in paraView. I will try to run the case.

Actually I just define my inlet and outlet face as two patches in ICEM, and export it convert it to foam mesh. Here is my createPatchDict. Is it ok?

pointSync false;
patches
(
{
// Name of new patch
name inletOutlet_half0;

// Dictionary to construct new patch from
patchInfo
{
type cyclic;
neighbourPatch inletOutlet_half1;

// Optional: explicitly set transformation tensor.
// Used when matching and synchronising points.

transform translational;
separationVector (-1 0 0);

// Optional non-default tolerance to be able to define cyclics
// on bad meshes
//matchTolerance 1E-2;
}

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

// If constructFrom = patches : names of patches. Wildcards allowed.
patches (inlet);

// If constructFrom = set : name of faceSet
set f0;
}
{
// Name of new patch
name inletOutlet_half1;

// Dictionary to construct new patch from
patchInfo
{
type cyclic;
neighbourPatch inletOutlet_half0;

transform translational;
separationVector (1 0 0);
}

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

// If constructFrom = patches : names of patches. Wildcards allowed.
patches (outlet);

// If constructFrom = set : name of faceSet
set f0;
}
);
Quote:
Originally Posted by maddalena View Post
Hi,
what are the faces you want to make cyclic? Front and back or inlet and outlet?

NB: cyclic definition changed in the latest OF version.

mad
wangqiangele is offline   Reply With Quote

Old   November 9, 2012, 09:17
Default
  #20
New Member
 
Qiang
Join Date: Mar 2012
Posts: 12
Rep Power: 14
wangqiangele is on a distinguished road
Dear mad,

When running the case, it generates warning as following:

Specified separationVector (1 0 0) differs from computed separation vector 1((-25 0 -1.387779e-17))
This probably means your geometry is not consistent with the specified separation and might lead to problems.
Continuing with specified separation vector (1 0 0)
patch:inletOutlet_half1 neighbour:inletOutlet_half0

why is the separation vector become so strange...

Best regards & Big thanks in advance
Qiang

Quote:
Originally Posted by maddalena View Post
Hi,
what are the faces you want to make cyclic? Front and back or inlet and outlet?

NB: cyclic definition changed in the latest OF version.

mad
wangqiangele 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
[ICEM] Exporting Grid Volumes/Areas from ICEM to Calculate Discretization Error Josh ANSYS Meshing & Geometry 4 May 20, 2010 14:40
2D periodic from ICEM to FLUENT Markus FLUENT 1 August 11, 2008 08:13
How make a .gtm grid for pre-CFX using ICEM ????? IGNA CFX 2 January 24, 2007 09:36
Problems in grid generation in ICEM Tim CFX 1 September 30, 2006 07:43
How to import grid generated using ICEM/CFD Harry Siemens 2 April 17, 2006 01:01


All times are GMT -4. The time now is 15:28.