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

[Other] Can't Shake Erros: patch type 'patch' not constraint type 'empty'

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By deepsterblue
  • 1 Post By Saeb-sahand

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 15, 2014, 22:54
Default Can't Shake Erros: patch type 'patch' not constraint type 'empty'
  #1
Member
 
Brenda EM
Join Date: Jan 2012
Posts: 38
Rep Power: 14
BrendaEM is on a distinguished road
Hi,

I am trying to make a naca duct, meshed with Solome/Netgen in tetrahedrons.
I've seen other threads about non-othogonal issues, but the mesh seems to check out.

I keep getting these in decomposePar, using scotch:

Code:
--> FOAM FATAL IO ERROR: 

    patch type 'patch' not constraint type 'empty'

:
The Mesh seems okay

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           2863229
    faces:            32727449
    internal faces:   32248843
    cells:            16244073
    faces per cell:   4
    boundary patches: 5
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     0
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    16244073
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology                  
    inlet               28210    14366    ok (non-closed singly connected)  
    nowall              244160   122731   ok (non-closed singly connected)  
    outlet1             27442    13982    ok (non-closed singly connected)  
    outlet2             2269     1235     ok (non-closed singly connected)  
    wall                176525   88892    ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (-0.16 -0.1 -0.0150429) (0.17 0.1 0.06)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)
    Boundary openness (-5.2313e-15 4.00333e-15 -7.32111e-14) OK.
    Max cell openness = 3.08746e-16 OK.
    Max aspect ratio = 5.19132 OK.
    Minimum face area = 1.22756e-08. Maximum face area = 2.5373e-06.  Face area magnitudes OK.
    Min volume = 6.91365e-13. Max volume = 1.2265e-09.  Total volume = 0.00409514.  Cell volumes OK.
    Mesh non-orthogonality Max: 56.1469 average: 15.1307
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0.734916 OK.
    Coupled point location match (average 0) OK.

Mesh OK.

End
I've looked at snappyhexmesh, but the setup looks really complicated.
I built from 2.3.0 source. Was anything fixed in 2.3.x that would affect this?
Does OpenFoam just not play well with tetrahedrons?

I am pretty disappointed. Any help would be appreciated.

Last edited by BrendaEM; October 17, 2014 at 16:11. Reason: Clearification
BrendaEM is offline   Reply With Quote

Old   October 17, 2014, 16:21
Default
  #2
Member
 
Brenda EM
Join Date: Jan 2012
Posts: 38
Rep Power: 14
BrendaEM is on a distinguished road
I am considering opening a bug report.
BrendaEM is offline   Reply With Quote

Old   October 17, 2014, 16:41
Default
  #3
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
You have a tetrahedral mesh, but use an empty patch type? Shouldn't that be restricted to 2D meshes alone?

You should post your entire decomposePar output
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   October 17, 2014, 17:50
Default
  #4
Member
 
Brenda EM
Join Date: Jan 2012
Posts: 38
Rep Power: 14
BrendaEM is on a distinguished road
I wondered that too, that's why I (not cross) posted this in the appropriate sub forum.

Could you give me a hint, as to which type I could use for the truncated surfaces of a solve that is not necessarily symmetrical, nor 2.5D Extruded?

BTW, I've found that both decomposePar and IcoFoam both error, so I suspect that the problem is not in the decomposePar. I posted the icoFoam output at the end. It's pretty much the same error.

There just aren't enough small 3D samples in the tutorials, and the motorbike is so included and detailed as to make it formidable for a beginner tutorial.

p

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

dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;

boundaryField
{
    inlet
    {
        type            zeroGradient;
    }

    outlet1
    {
        type            fixedValue;
        value           uniform 0;
    }

    outlet2
    {
        type            fixedValue;
        value           uniform 0;
    }

    wall
    {
        type            zeroGradient;
    }
    nowall
    {
        type            empty;
    }
}

// ************************************************************************* //
U:

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


dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    wall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    inlet
    {
        type            fixedValue;
        value           uniform (44.704 0 0); // 100MPH along x dimention
    }
    outlet1
    {
        type            zeroGradient;
    }
    outlet2
    {
        type            zeroGradient;
    }
    nowall
    {
        type             empty;
    }
}    

// ************************************************************************* //
icoFoam:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : icoFoam
Date   : Oct 17 2014
Time   : 14:47:05
Host   : "Brenda-W540"
PID    : 2999
Case   : /home/brenda/OpenFOAM/OpenFOAM-2.3.0/run/naca
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading transportProperties

Reading field p



--> FOAM FATAL IO ERROR: 

    patch type 'patch' not constraint type 'empty'
    for patch nowall of field p in file "/home/brenda/OpenFOAM/OpenFOAM-2.3.0/run/naca/0/p"

file: /home/brenda/OpenFOAM/OpenFOAM-2.3.0/run/naca/0/p.boundaryField.nowall from line 46 to line 46.

    From function emptyFvPatchField<Type>::emptyFvPatchField
(
    const fvPatch& p,
    const Field<Type>& field,
    const dictionary& dict
)

    in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 100.

FOAM exiting


decomposePar:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 2.3.0-f5222ca19ce6
Exec   : decomposePar
Date   : Oct 17 2014
Time   : 15:48:03
Host   : "Brenda-W540"
PID    : 4482
Case   : /home/brenda/OpenFOAM/OpenFOAM-2.3.0/run/naca
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Disallowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time



Decomposing mesh region0

Create mesh

Calculating distribution of cells
Selecting decompositionMethod scotch

Finished decomposition in 22.52 s

Calculating original mesh data

Distributing cells to processors

Distributing faces to processors

Distributing points to processors

Constructing processor meshes

Processor 0
    Number of cells = 923645
    Number of faces shared with processor 1 = 6120
    Number of faces shared with processor 2 = 5371
    Number of processor patches = 2
    Number of processor faces = 11491
    Number of boundary faces = 32175

Processor 1
    Number of cells = 922718
    Number of faces shared with processor 0 = 6120
    Number of faces shared with processor 2 = 1531
    Number of faces shared with processor 3 = 2722
    Number of faces shared with processor 5 = 4224
    Number of processor patches = 4
    Number of processor faces = 14597
    Number of boundary faces = 26623

Processor 2
    Number of cells = 927333
    Number of faces shared with processor 0 = 5371
    Number of faces shared with processor 1 = 1531
    Number of faces shared with processor 3 = 5250
    Number of processor patches = 3
    Number of processor faces = 12152
    Number of boundary faces = 30852

Processor 3
    Number of cells = 929606
    Number of faces shared with processor 1 = 2722
    Number of faces shared with processor 2 = 5250
    Number of faces shared with processor 4 = 6600
    Number of faces shared with processor 5 = 2100
    Number of processor patches = 4
    Number of processor faces = 16672
    Number of boundary faces = 24460

Processor 4
    Number of cells = 926893
    Number of faces shared with processor 3 = 6600
    Number of faces shared with processor 5 = 5008
    Number of faces shared with processor 6 = 2124
    Number of faces shared with processor 7 = 6303
    Number of processor patches = 4
    Number of processor faces = 20035
    Number of boundary faces = 25977

Processor 5
    Number of cells = 925384
    Number of faces shared with processor 1 = 4224
    Number of faces shared with processor 3 = 2100
    Number of faces shared with processor 4 = 5008
    Number of faces shared with processor 6 = 4326
    Number of processor patches = 4
    Number of processor faces = 15658
    Number of boundary faces = 23410

Processor 6
    Number of cells = 922515
    Number of faces shared with processor 4 = 2124
    Number of faces shared with processor 5 = 4326
    Number of faces shared with processor 7 = 3650
    Number of processor patches = 3
    Number of processor faces = 10100
    Number of boundary faces = 28170

Processor 7
    Number of cells = 922298
    Number of faces shared with processor 4 = 6303
    Number of faces shared with processor 6 = 3650
    Number of processor patches = 2
    Number of processor faces = 9953
    Number of boundary faces = 29187

Number of processor faces = 55329
Max number of cells = 929606 (0.492623% above average 925049)
Max number of processor patches = 4 (23.0769% above average 3.25)
Max number of faces between processors = 20035 (44.8427% above average 13832.2)

Time = 0


--> FOAM FATAL IO ERROR: 

    patch type 'patch' not constraint type 'empty'
    for patch nowall of field p in file "/home/brenda/OpenFOAM/OpenFOAM-2.3.0/run/naca/0/p"

file: /home/brenda/OpenFOAM/OpenFOAM-2.3.0/run/naca/0/p.boundaryField.nowall from line 46 to line 46.

    From function emptyFvPatchField<Type>::emptyFvPatchField
(
    const fvPatch& p,
    const Field<Type>& field,
    const dictionary& dict
)

    in file fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 100.

FOAM exiting


Thank you for your reply : )

Last edited by BrendaEM; October 17, 2014 at 18:51.
BrendaEM is offline   Reply With Quote

Old   October 17, 2014, 21:41
Default
  #5
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
You may want to use a symmetry type boundary instead of empty if you're trying to achieve a pseudo 2D result with a 3D mesh. Otherwise, take a 2D mesh and extrude in the third direction by one cell to get a mesh that's truly 2D. Also ensure that the constant/polyMesh/boundary file is consistent with all your other fields like p, U, etc. That's probably the reason for the error that you're seeing.
luoyang likes this.
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   October 18, 2014, 12:56
Default
  #6
Member
 
Brenda EM
Join Date: Jan 2012
Posts: 38
Rep Power: 14
BrendaEM is on a distinguished road
Actually, I do not want a pseudo 2D solve. I am trying to do a 3D one, and so symmetry seem inappropriate. I don't want to confine the air near at the top and sides, so slip seems wrong as well.

From the manual, as in RTFM, I do not see an appropriate boundary condition for the truncated sides 3D simulations, whereas the air/fluid touching a face will cease/become extinct.

Thank you for your reply.

Last edited by BrendaEM; October 18, 2014 at 14:33.
BrendaEM is offline   Reply With Quote

Old   October 18, 2014, 14:57
Default
  #7
Member
 
Brenda EM
Join Date: Jan 2012
Posts: 38
Rep Power: 14
BrendaEM is on a distinguished road
Interesting, I tried:

{
type fixedValue;
value uniform 0;
}

Which gave me an expecting "(" syntax-type error.

Looking at the motorbike example, I tried:

nowall
{
type slip;
}

...and the decomposePar worked, though I cannot find documentation explain whether or not "slip" will negate pressure. In other words, I don't know if there are fluid effects that send effects all the way to the boundaries of my solve/simulation, I do not want them ever coming back into the solution.

If I can get this case going, I will document it, make a video, and share it.
BrendaEM is offline   Reply With Quote

Old   October 18, 2014, 17:52
Default
  #8
Member
 
Brenda EM
Join Date: Jan 2012
Posts: 38
Rep Power: 14
BrendaEM is on a distinguished road
OpenFoam exited with an exception. It failed in So6. I don't know if it is is a currant number issue, or from my boundaries, but I should think that it OpenFoam should not crash with exceptions.

Please ignore:
Code:
Sadly, I am finding OpenFoam, cryptic, buggy, and poorly documented. It's shouldn't be this hard to set up and run a case.

Except for where timesteps and mesh are concerned, all the condition settings should live in the same directory/folder. The setup files all should have a common extension, such as .cfg. There are too many different configuration files.

OpenFoam's utilities and solvers should be stripped of inConSistant CamelCase, such as icoFOAM, ideasToFoam.

There needs to be better documentation for 3D examples. Every line in every tutorial configuration file should be commented.

The best tools have no pointy nails driven through their handles.

And lastly, I have lingering fantasies of this whole project being ported to Julia, for its multi-processor and clustering ease.

I feel better now.
BrendaEM is offline   Reply With Quote

Old   October 18, 2014, 18:14
Default
  #9
Senior Member
 
Sandeep Menon
Join Date: Mar 2009
Location: Amherst, MA
Posts: 403
Rep Power: 25
deepsterblue will become famous soon enough
I suspect you'll benefit from this:
http://www.sourceflux.de
OpenFOAM is not too bad once you get going. It's the basis for the PhD theses of plenty of folks, including mine.
__________________
Sandeep Menon
University of Massachusetts Amherst
https://github.com/smenon
deepsterblue is offline   Reply With Quote

Old   October 20, 2014, 14:23
Default
  #10
Member
 
Brenda EM
Join Date: Jan 2012
Posts: 38
Rep Power: 14
BrendaEM is on a distinguished road
I have seen OpenFoam throw exceptions, when it should have trapped and reported problems, but I also seen comparison with other solvers, whereas it seems too close to call which speaks the truth. Still the provided documentation is...interesting.

The book is interesting. I am looking for a lot of case setups using real world 3D examples, explanations and proper use of boundary conditions for 3D unsymmetrical solves--the kind of stuff I've been asking for on the forum. I though that PyFoam's development was in question, as it seems to be Pyflu, now, is not up to 2.3.0.
BrendaEM is offline   Reply With Quote

Old   November 5, 2014, 21:14
Default
  #11
Senior Member
 
kmooney's Avatar
 
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 17
kmooney is on a distinguished road
Quote:
{
type fixedValue;
value uniform 0;
}

Which gave me an expecting "(" syntax-type error.

Looking at the motorbike example, I tried:

nowall
{
type slip;
}
It looks like your trying to assign a scalar value to a vector field here.

Try this instead:
Code:
{
type fixedValue;
value uniform (0 0 0);
}
kmooney is offline   Reply With Quote

Old   August 24, 2018, 12:03
Default
  #12
New Member
 
Thomas M
Join Date: Aug 2018
Posts: 20
Rep Power: 7
tmik is on a distinguished road
It might be that you haven't defined the boundary file correctly. This is an easy mistake to make, and can cause this error.


To use the empty boundary condition using a mesh made in Salome, start with a 2D mesh first. Extrude this to create a single-element 3d mesh.


after you use

Code:
ideasUnvToFoam filename.unv
run
Code:
checkMesh


A key thing you'll see is the line below:

Code:
Checking geometry...
    Overall domain bounding box (-0.16 -0.1 -0.0150429) (0.17 0.1 0.06)
    Mesh (non-empty, non-wedge) directions (1 1 1)
    Mesh (non-empty) directions (1 1 1)

Even though the mesh was imported as 3D, we can define the faces which should be ignored - forcing OpenFOAM to see it as a 2D mesh.
Open the boundary file. Assuming 'frontAndback' is the group which contains the 2D faces, use the following:

Code:
    frontAndback
    {
        type            empty;
        nFaces          50269;
        startFace       85150;
    }

After you've done this, change each of the input files (U, P, etc):
Code:
    frontAndback
    {
        type            empty;
    }


Hope this helps.

Last edited by tmik; August 24, 2018 at 13:26.
tmik is offline   Reply With Quote

Old   April 3, 2022, 18:32
Default
  #13
New Member
 
zurich
Join Date: Apr 2022
Posts: 3
Rep Power: 4
Saeb-sahand is on a distinguished road
To solve the the following error

"patch type 'wall' not constraint type 'symmetry' "

Edit the type of corresponding boundary in constant/polyMesh/boundary
to be symmetry rather than wall e.g.


boundary_name
{
type symmetry;
inGroups List<word> 1(symmetry);
nFaces 8117;
startFace 813891;
}


The following link is also useful

https://discourse.ladybug.tools/t/ho...tric-case/9563
dkk_BO likes this.
Saeb-sahand 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
activeBaffleVelocity boundary condition ? om3ro OpenFOAM Programming & Development 10 November 16, 2020 23:26
[Commercial meshers] Fluent3DMeshToFoam simvun OpenFOAM Meshing & Mesh Conversion 50 January 19, 2020 15:33
[Commercial meshers] Mesh conversion problem (fluent3DMeshToFoam) Aadhavan OpenFOAM Meshing & Mesh Conversion 2 March 8, 2018 01:47
Near wall treatment in k-omega SST Arnoldinho OpenFOAM Running, Solving & CFD 38 March 8, 2017 13:48
Divergent temperature in chtMultiRegion(Simple)Foam akrasemann OpenFOAM Running, Solving & CFD 13 March 24, 2014 02:54


All times are GMT -4. The time now is 07:30.