Error when creating boundary conditions (OpenFOAM)

  • Thread starter JD_PM
  • Start date
  • #1
JD_PM
1,128
158
TL;DR Summary
I get a FOAM FATAL ERROR error when I run createPatch -overwrite to create the BCs
Let's give some context. I created a Mesh via snappyHexMesh and next I am setting the boundary conditions (BCs).

First I copied the patches folder "createPatchDict" to my system's folder via the command "cp $FOAM_ETC/caseDicts/mesh/manipulation/patches/createPatchDict ./system"

Taking into account that the BCs have names that you would like to change for the computation and that could also have particular types, createPatchDict text doc has the following patches

Code:
patches
(
    {
       name free_air;
       patchInfo
       {
          type patch;
       }
       constructFrom patches;
       patches (river_patch0);
    }
    {
       name inlet_water;
       patchInfo
       {
          type patch;
       }
       constructFrom set;
       set inlet_water;
    }
    {
       name inlet_air;
       patchInfo
       {
          type patch;
       }
       constructFrom set;
       set inlet_air;
    }
    {
       name outlet;
       patchInfo
       {
          type patch;
       }
       constructFrom patches;
       patches (river_patch5);
    }
    {
       name river_walls;
       patchInfo
       {
          type wall;
       }
       constructFrom patches;
       patches (river_patch2 river_patch4 river_patch6);
    }
    {
       name pillar;
       patchInfo
       {
          type wall;
       }
       constructFrom patches;
       patches (river_patch1);
    }
)

The issue is the following. When I run createPatch -overwrite to create the new BCs I get the following error.

--> FOAM FATAL ERROR:
"ill defined primitiveEntry starting at keyword 'patches' on line 19 and ending at line 78"

The text within the mentioned lines is basically what I wrote above but I do not understand how to fix the error.

I can always provide more details if needed be


Any help is appreciated :biggrin:
 

Answers and Replies

  • #2
36,856
8,899
Although I know next to nothing about FOAM, I suspect the problem is that you are using a keyword, patches, for the name of a case in the code you posted.

Sections 4.1 and 4.2 of the OpenFOAM docs talk about boundaries.
boundary a list of patches, containing a dictionary entry for each patch, declared using the patch name, e.g.

Code:
movingWall
{
  type patch;
  nFaces 20;
  startFace 760;
}

The startFace is the index into the face list of the first face in the patch, and nFaces is the number of faces in the patch.
Hope this helps.
 
  • #3
JD_PM
1,128
158
Thanks.

It had to do with patches but in the way I wrote it. Putting a space between patches and () made it work (there wasn't in the code I was running).
 

Suggested for: Error when creating boundary conditions (OpenFOAM)

Replies
1
Views
467
Replies
14
Views
1K
Replies
1
Views
286
  • Last Post
Replies
8
Views
349
Replies
1
Views
368
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
23
Views
2K
Replies
6
Views
658
  • Last Post
Replies
2
Views
1K
Top