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/)
-   -   createPatch command (https://www.cfd-online.com/Forums/openfoam-solving/222440-createpatch-command.html)

mekim November 24, 2019 17:46

createPatch command
 
Hi, i run with createPatch command and i checked polyMesh boundary file and 0 file. i cannot see any problem.
Could anyoone guide me how to do ?

Thanks everyone who will answer




--> FOAM Warning :
From function const Foam::HashTable<Foam::List<int>, Foam::word>& Foam::polyBoundaryMesh::groupPatchIDs() const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 473
Removing patchGroup 'wall' which clashes with patch 6 of the same name.
--> FOAM Warning :
From function Foam::labelHashSet Foam::polyBoundaryMesh::patchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
Cannot find any patch or group names matching cyclic1
--> FOAM Warning :
From function Foam::labelHashSet Foam::polyBoundaryMesh::patchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
Cannot find any patch or group names matching cyclic2
--> FOAM Warning :
From function Foam::labelHashSet Foam::polyBoundaryMesh::patchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
Cannot find any patch or group names matching cyclic1
--> FOAM Warning :
From function Foam::labelHashSet Foam::polyBoundaryMesh::patchSet(const Foam::UList<Foam::wordRe>&, bool, bool) const
in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 804
Cannot find any patch or group names matching cyclic2

ingraban November 25, 2019 06:54

From the warning messages, I guess, you've got the syntax of createPatchDict wrong. Apparently, you tried to use the patch name 'wall' twice. Maybe there is already a patch 'wall' in your model. And possibly, you tried to use faceSet names that aren't defined (e.g. in topoSetDict). If you post the file createPatchDict, maybe we'll know more.

mekim November 25, 2019 13:31

thank u for answering.

My createPatch file:



Code:

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

// 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
(
    {
        //- Master side patch
        name            periodic1;
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.0001;
            neighbourPatch  periodic2;
          // transform      noOrdering;
            transform translational;
            separationVector (0 -0.032841912 0);
        }
        constructFrom patches;
        patches (cyclic1);
    }

    {
        //- Slave side patch
        name            periodic2;
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.0001;
            neighbourPatch  periodic1;
      //    transform      noOrdering;
        transform translational;
            separationVector (0 0.032841912 0);
        }
        constructFrom patches;
        patches (cyclic2);
    }

   
   
    {
        //- Master side patch
        name            frontcyc;
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.0001;
            neighbourPatch  backcyc;
          // transform      noOrdering;
            transform translational;
            separationVector (0 0 -0.0005);
        }
        constructFrom patches;
        patches (cyclic1);
    }

    {
        //- Slave side patch
        name            backcyc;
        patchInfo
        {
            type            cyclic;
            matchTolerance  0.0001;
            neighbourPatch  frontcyc;
      //    transform      noOrdering;
 transform translational;
            separationVector (0 0 0.0005);
        }
        constructFrom patches;
        patches (cyclic2);
    }
   
  /* {
        name inlet;
        patchInfo
        {
            type            patch;
        }
        constructFrom set;
        set inletFaces;
    }
    {
        name outlet;
        patchInfo
        {
            type            patch;
        }
        constructFrom set;
        set outletFaces;
    }*/
);

// ************************************************************************* //


ingraban November 26, 2019 03:31

I don't understand the warning about patchGroup 'wall'. This name is not used in your createPatchDict. Maybe, you should also check the file /constant/polyMesh/boundary.
The other warnings are about patches to be created from the existing patches 'cyclic1' and 'cyclic2'. I expect, these patches must also be defined in /constant/polyMesh/boundary. If they are not there, createPatch cannot find them.

Krao November 26, 2019 04:19

Hi Mekim, attaching your boundary mesh would help to find the error

mekim November 26, 2019 08:12

thank u for your attention.



my boundary file:


Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
       
(
    backcyc
    {
        type patch;
        nFaces 39606;
        startFace 78626;
    }
    periodic1
    {
        type patch;
        nFaces 268;
        startFace 118232;
    }
    periodic2
    {
        type patch;
        nFaces 268;
        startFace 118500;
    }
    frontcyc
    {
        type patch;
        nFaces 39606;
        startFace 118768;
    }
    inlet
    {
        type patch;
        nFaces 147;
        startFace 158374;
    }
    outlet
    {
        type patch;
        nFaces 119;
        startFace 158521;
    }
    wall
    {
        type wall;
        nFaces 370;
        startFace 158640;
    }
)


ingraban November 28, 2019 09:22

So, this is your boundary file after running createPatch, is it? It seems fine. Maybe you tried to run createPatch twice? ;)

mekim November 28, 2019 14:04

I solved the problem. I edited the pacthes (..) part.

boffin5 June 8, 2021 20:19

'edited the patches (..) part' ??
 
Hi,
I am having the same problem, but I don't understand what you mean when you say you solved the problem. Can you give more detail about what you did with the 'patches (..)' part?

evrenykn January 15, 2022 15:45

Hi,

I am taking the same problem when I define wedges in my boundry and I can't solve the problem.

Code:

--> FOAM Warning : Creating fvModels from "constant/fvOptions"

Selecting finite volume model type radiation
    Name: radiation
Selecting radiationModel P1
Selecting absorptionEmissionModel greyMeanCombustion
Selecting scatterModel none
Selecting soot model none
--> FOAM Warning :
    From function const Foam::HashTable<Foam::List<int>, Foam::word>& Foam::polyBoundaryMesh::groupPatchIDs() const
    in file meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C at line 473
    Removing patchGroup 'wall' which clashes with patch 5 of the same name.
--> FOAM Warning : Creating fvConstraints from "constant/fvOptions" rather than system/fvConstraints
No fvConstraints present


anothr_acc January 18, 2023 18:20

Rename group wall to walls.
 
Allow me.

I had the same. My system/blockMesh showed,

Code:

boundary ( wall { type wall; faces ( (0 1 2 3) (4 5 6 7) ); } )
Changing to

Code:

boundary ( walls { type wall; faces ( (0 1 2 3) (4 5 6 7) ); } )
fixed things. Don't forget to update references to wall in 0/* to walls.

Apologies for the inline format.

BR,

Mark.


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