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 20, 2012, 14:57
Default Similar problem with createPatch
  #21
New Member
 
Warren Lamont
Join Date: Nov 2012
Posts: 5
Rep Power: 14
wlamont is on a distinguished road
Hello,

I get the following error:
Code:
--> FOAM FATAL IO ERROR: 
"ill defined primitiveEntry starting at keyword 'patches' on line 49 and ending at line 159"

file: /home/wlamont/OpenFOAM/wlamont-2.1.1/run/dp73/system/createPatchDict at line 159.

    From function primitiveEntry::readEntry(const dictionary&, Istream&)
    in file lnInclude/IOerror.C at line 132.

FOAM exiting

Attached is my createPatchDict which is stored in my system folder:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.1.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

// This application/dictionary controls:
// - optional: create new patches from boundary faces (either given as
//   a set of patches or as a faceSet)
// - always: order faces on coupled patches such that they are opposite. This
//   is done for all coupled faces, not just for any patches created.
// - optional: synchronise points on coupled patches.
// - always: remove zero-sized (non-coupled) patches (that were not added)

// 1. Create cyclic:
// - specify where the faces should come from
// - specify the type of cyclic. If a rotational specify the rotationAxis
//   and centre to make matching easier
// - always create both halves in one invocation with correct 'neighbourPatch'
//   setting.
// - optionally pointSync true to guarantee points to line up.

// 2. Correct incorrect cyclic:
// This will usually fail upon loading:
//  "face 0 area does not match neighbour 2 by 0.0100005%"
//  " -- possible face ordering problem."
// - in polyMesh/boundary file:
//      - loosen matchTolerance of all cyclics to get case to load
//      - or change patch type from 'cyclic' to 'patch'
//        and regenerate cyclic as above

// Do a synchronisation of coupled points after creation of any patches.
// Note: this does not work with points that are on multiple coupled patches
//       with transformations (i.e. cyclics).
pointSync false;

// Patches to create.
patches
(
    {
        // Name of new patch
        name per1a;

        // Dictionary to construct new patch from
        patchInfo
        {
            type cyclic;
            neighbourPatch per1b;
	    matchTolerance  0.1;

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

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

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches (per1a-part_3-5450200-101_aero1v);

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

        // Dictionary to construct new patch from
        patchInfo
        {
            type cyclic;
            neighbourPatch per1a;
 	    matchTolerance  0.1;

            transform rotational;
            rotationAxis (0 0 1);
            rotationCentre (0 0 0);
        }

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

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches (per1b-part_3-5450200-101_aero1v);

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


    {
        // Name of new patch
        name per1asolid;

        // Dictionary to construct new patch from
        patchInfo
        {
            type cyclic;
            neighbourPatch per1bsolid;
 	    matchTolerance  0.1;
            // Optional: explicitly set transformation tensor.
            // Used when matching and synchronising points.
            transform rotational;
            rotationAxis (0 0 1);
            rotationCentre (0 0 0);
        }

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

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches (per1a-part_3-solid);

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

        // Dictionary to construct new patch from
        patchInfo
        {
            type cyclic;
            neighbourPatch per1asolid;
 	    matchTolerance  0.1;
            transform rotational;
            rotationAxis (0 0 1);
            rotationCentre (0 0 0);
        }

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

        // If constructFrom = patches : names of patches. Wildcards allowed.
        patches (per1b-part_3-solid;

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

);
Any help would be greatly appreciated.
wlamont is offline   Reply With Quote

Old   December 21, 2012, 02:42
Default
  #22
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hi,
Code:
"ill defined primitiveEntry starting at keyword 'patches' on line 49 and ending at line 159"
says that something is wrong at line 49. Look at your line 49 and compare with this file: $FOAM_UTILITIES/mesh/manipulation/createPatch/createPatchDict.
See here as well.

mad
maddalena is offline   Reply With Quote

Old   April 21, 2013, 03:55
Default
  #23
New Member
 
Esmaeil Ahmadiyan
Join Date: Sep 2011
Posts: 26
Rep Power: 15
e.ahmadiyan is on a distinguished road
Hi dear Gabriel
I am same problem as you.
If you were successful in resolve this problem please give your experiences to me.
Thanks
__________________
Best regards

e.ahmadiyan
e.ahmadiyan is offline   Reply With Quote

Old   April 21, 2013, 05:34
Default
  #24
New Member
 
Qiang
Join Date: Mar 2012
Posts: 12
Rep Power: 14
wangqiangele is on a distinguished road
Hi,

I generated the periodic patches using createPatchDict with the following specifications. (where 25 is the distance between inlet and outlet)

Hope it helps~
Qiang

patches
(
name inletOutlet_half0;
patchInfo
{
type cyclic;
neighbourPatch inletOutlet_half1;
transform translational;
separationVector (25 0 0);
}
constructFrom patches;
patches (inlet);
set f0;
}
{
name inletOutlet_half1;
patchInfo
{
type cyclic;
neighbourPatch inletOutlet_half0;
transform translational;
separationVector (-25 0 0);
}
constructFrom patches;
patches (outlet);
set f0;
}
);

Quote:
Originally Posted by e.ahmadiyan View Post
Hi dear Gabriel
I am same problem as you.
If you were successful in resolve this problem please give your experiences to me.
Thanks
wangqiangele is offline   Reply With Quote

Old   April 21, 2013, 08:22
Default
  #25
New Member
 
Esmaeil Ahmadiyan
Join Date: Sep 2011
Posts: 26
Rep Power: 15
e.ahmadiyan is on a distinguished road
Hi dear Qiang
Thanks for your reply very much.
My geometry and createPatchDict file are as below:
Screenshot.jpg
createPatchDict.zip

When running the case this error reported:

This probably means your geometry is not consistent with the specified separation and might lead to problems.
Continuing with specified separation vector (0.0002 0 0.0002)
patchutlet1 neighbour:inlet1
--> FOAM Warning :
From function cyclicPolyPatch::calcTransforms()
in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 368



In your mind are there any incorrect setting in createPatchDict file proportional to geometry?
What are separationVector and rotationAxis and rotationCentre ? please demonstrate for me. In fact I do not know how I should adjust this parameters in createPatchDict file proportional to my geometry.

All my case is as below
cyclic.zip

Thanks
__________________
Best regards

e.ahmadiyan

Last edited by e.ahmadiyan; April 21, 2013 at 09:18.
e.ahmadiyan is offline   Reply With Quote

Old   April 21, 2013, 09:50
Default
  #26
New Member
 
Qiang
Join Date: Mar 2012
Posts: 12
Rep Power: 14
wangqiangele is on a distinguished road
Hi,

I am not sure about your case.
Maybe you can specify
transform rotational;
rotationAxis ( 0 0 1 );//maybe(0 0 -1)
rotationCentre ( x y 0 );//specify [x,y] to your case to ensure that the outlet boundary meet the inlet boundary after 270 degrees rotation around the center (anticlockwise)

Best,
Qiang


Quote:
Originally Posted by e.ahmadiyan View Post
Hi dear Qiang
Thanks for your reply very much.
My geometry and createPatchDict file are as below:
Attachment 20981
Attachment 20982

When running the case this error reported:

This probably means your geometry is not consistent with the specified separation and might lead to problems.
Continuing with specified separation vector (0.0002 0 0.0002)
patchutlet1 neighbour:inlet1
--> FOAM Warning :
From function cyclicPolyPatch::calcTransforms()
in file meshes/polyMesh/polyPatches/constraint/cyclic/cyclicPolyPatch.C at line 368



In your mind are there any incorrect setting in createPatchDict file proportional to geometry?
What are separationVector and rotationAxis and rotationCentre ? please demonstrate for me. In fact I do not know how I should adjust this parameters in createPatchDict file proportional to my geometry.

All my case is as below
Attachment 20983

Thanks
wangqiangele is offline   Reply With Quote

Old   April 21, 2013, 10:22
Default
  #27
New Member
 
Esmaeil Ahmadiyan
Join Date: Sep 2011
Posts: 26
Rep Power: 15
e.ahmadiyan is on a distinguished road
Dear mad
Have you any more suggestion ?
__________________
Best regards

e.ahmadiyan
e.ahmadiyan is offline   Reply With Quote

Old   April 22, 2013, 09:00
Default
  #28
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 e.ahmadiyan View Post
Dear mad
Have you any more suggestion ?
(25 0 0) is NOT the separation vector between the two. inlet and outlet are rotated as well.

mad
maddalena is offline   Reply With Quote

Old   April 22, 2013, 10:01
Default
  #29
New Member
 
Esmaeil Ahmadiyan
Join Date: Sep 2011
Posts: 26
Rep Power: 15
e.ahmadiyan is on a distinguished road
Dear mad
What is your suggestion about my geometry and createPatchDict that I was mentioned in above post numbering 25? please
__________________
Best regards

e.ahmadiyan
e.ahmadiyan is offline   Reply With Quote

Old   April 22, 2013, 10:32
Default
  #30
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 e.ahmadiyan View Post
Dear mad
What is your suggestion about my geometry and createPatchDict that I was mentioned in above post numbering 25? please
My suggestion is to think once again to your case and to play a bit with createPatchDict. This is the way openFoam works.

mad
maddalena is offline   Reply With Quote

Old   April 30, 2013, 08:10
Default
  #31
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Hi guys,
I have a similar problem for defining cyclic boundary conditions but here for unstructured grids.

Well as you know cyclic boundary conditions defining is a bit different since OF 2.0.0, So as I understood, there is no need to use createPatch utility anymore. (Please correct me if I am wrong)

Here is the page for new features of OF 2.0.0:
http://www.openfoam.org/version2.0.0/meshing.php

as you can see, cyclic boundary conditions are defined like this (in boundary file):

patch0_half0
{
type cyclic;
nFaces 256;
startFace 11520;
matchTolerance 0.0001;
neighbourPatch patch0_half1;
}
patch0_half1
{
type cyclic;
nFaces 256;
startFace 11776;
matchTolerance 0.0001;
neighbourPatch patch0_half0;
}


So I did the same work and defined my cyclic patches like this:

inlet
{
type cyclic;
nFaces 543;
startFace 281225;
matchTolerance 0.0001;
neighbourPatch outlet;
}

outlet
{
type cyclic;
nFaces 530;
startFace 281768;
matchTolerance 0.0001;
neighbourPatch inlet;
}

but there is a problem here. As you can see, the number of faces is different between inlet and outlet patches. one is 543 and the other is 530.
by running checkMesh I get the following error:

--> FOAM FATAL ERROR:
For patch inlet there are 543 face centers, for the neighbour patch outlet there are 530

So its needed to make these numbers equal. But how is that possible for unstructured grids? any suggestions is greatly appreciated.

FYI: I am using ICEM to generate the mesh.

Thanks,
Mojtaba
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a is offline   Reply With Quote

Old   April 30, 2013, 11:09
Default
  #32
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 Mojtaba.a View Post
So its needed to make these numbers equal. But how is that possible for unstructured grids? any suggestions is greatly appreciated.
Simple. create them equal in your meshing software...
Copy-paste worked as a charm in the past for me.

mad
Mojtaba.a likes this.
maddalena is offline   Reply With Quote

Old   April 30, 2013, 15:46
Default
  #33
Senior Member
 
Mojtaba.a's Avatar
 
Mojtaba Amiraslanpour
Join Date: Jun 2011
Location: Tampa, US
Posts: 308
Rep Power: 16
Mojtaba.a is on a distinguished road
Send a message via Skype™ to Mojtaba.a
Quote:
Originally Posted by maddalena View Post
Simple. create them equal in your meshing software...
Copy-paste worked as a charm in the past for me.

mad
Thank you maddalena, I will try. beginner in ICEM
But am I correct? Is there any need of createPatch utility for cyclic patches anymore?
__________________
Learn OpenFOAM in Persian
SFO (StarCCM+ FLUENT OpenFOAM) Project Team Member
Complex Heat & Flow Simulation Research Group
If you can't explain it simply, you don't understand it well enough. "Richard Feynman"
Mojtaba.a 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 21:48.