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

Problem understanding nFaces / startFace

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   November 4, 2009, 18:22
Default Beginners Problem: patch is not divisible by the number of cells
  #1
Member
 
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 7
Horus is on a distinguished road
Hello,

I've been playing around with openfoam for some time (actually freefoam which is based on openfoam 1.5) and after having worked through the tutorials I want to start my own little pet case.
So far I've successfully created the geometry. It is 2D, with an inlet on side and an outlet on the other. There is a rectangle (balken) in the middle, all other boundaries are empty (frontAndBack). This is my blockMeshDict file.
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}

convertToMeters 1;

vertices        
(
    (0 0 0)
    (10 0 0)
    (10 10 0)
    (0 10 0)
    (0 0 1)
    (10 0 1)
    (10 10 1)
    (0 10 1)

    (4 4 0)
    (6 4 0)
    (6 6 0)
    (4 6 0)

    (4 4 1)
    (6 4 1)
    (6 6 1)
    (4 6 1)

);

blocks          
(
    hex (0 1 2 3 4 5 6 7) (40 40 1) simpleGrading (1 1 1)  // global
    hex (8 9 10 11 12 13 14 15) (1 1 1) simpleGrading (1 1 1) // balken, the solid rectangle
);

edges           
(
);

patches         
(
    wall balken
    (
        (8 9 10 11)
        (12 13 14 15)
        (8 11 15 12)
        (11 10 14 15)
        (10 9 13 14)
        (8 9 13 12)
    )

    patch inlet
    (
        (0 3 7 4)
    )

    patch outlet
    (
        (2 6 5 1)
    )
    empty frontAndBack 
    (
        (0 3 2 1)
        (4 5 6 7)
        (1 5 4 0)
        (3 7 6 2)
    )

);

mergePatchPairs 
(
);
blockMesh gives no errors and the geometry in Paraview looks fine. However icoFoam complains:
Code:
This mesh contains patches of type empty but is not 1D or 2D
    by virtue of the fact that the number of faces of this
    empty patch is not divisible by the number of cells.

    From function emptyFvPatchField<Type>::updateCoeffs()
    in file /Users/florian/freeFoam/build/include/finiteVolume/../../../freefoam-0.1.0rc4/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 148
What could be the problem here? Could it be that I put one block (balken) just over the the first one (which is my global domain)?

Thanks for any hints,

Florian

Last edited by Horus; November 4, 2009 at 22:39.
Horus is offline   Reply With Quote

Old   November 5, 2009, 03:28
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
You did not define the empty patch correctly. This is meant for 2-D or 1-D, for the front and back plane: it means that the number of faces in the empty patch (for 2-D) should be twice the number of cells.

The code says this is not the case for you. Have a look at the mesh in paraview, switch on patch names and it should be obvious.

Enjoy,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   November 5, 2009, 07:57
Default
  #3
Member
 
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 7
Horus is on a distinguished road
Hello,
for me the mesh looks fine in Paraview. frontAndBack is a mesh that covers the two sides and "ceiling" and "floor", forming a kind of rectangular tunnel.
How do I define the number faces? The file boundary which contains the nFaces entry is created from the blockMesh utility, so there is no use to edit something there.
Sorry, I still don't see what is the problem here. Could you be a bit more detailed?

Thanks,

Florian
Horus is offline   Reply With Quote

Old   November 5, 2009, 08:15
Default
  #4
Senior Member
 
Anonymous
Join Date: Mar 2009
Posts: 110
Rep Power: 8
madad2005 is on a distinguished road
Florian,

run it through checkMesh for more information.
madad2005 is offline   Reply With Quote

Old   November 5, 2009, 10:54
Default
  #5
Member
 
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 7
Horus is on a distinguished road
Ok, the complete checkMesh output is:

Code:
Create time

Create polyMesh for time = constant

Time = constant

Mesh stats
    points:           3370
    internal points:  0
    faces:            6486
    internal faces:   3120
    cells:            1601
    boundary patches: 4
    point zones:      0
    face zones:       0
    cell zones:       0

Number of cells of each type: 
    hexahedra:     1601
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
   *Number of regions: 2
    The mesh has multiple regions which are not connected by any face.
  <<Writing region information to "constant/cellToRegion"

Checking patch topology for multiply connected surfaces ...
    Patch               Faces    Points   Surface topology                  
    balken              6        8        ok (closed singly connected)      
    inlet               40       82       ok (non-closed singly connected)  
    outlet              40       82       ok (non-closed singly connected)  
    frontAndBack        3280     3362     ok (non-closed singly connected)  

Checking geometry...
    Overall domain bounding box (0 0 0) (10 10 1)
    Mesh (non-empty) directions (1 0 0)
    Mesh (non-empty, non-wedge) dimensions 1
    All edges aligned with or perpendicular to non-empty directions.
Trying to instantiate 'mpiPstreamImpl'
    Boundary openness (0 0 0) OK.
    Max cell openness = 0 OK.
    Max aspect ratio = 4 OK.
    Minumum face area = 0.0625. Maximum face area = 4.  Face area magnitudes OK.
    Min volume = 0.0625. Max volume = 4.  Total volume = 104.  Cell volumes OK.
    Mesh non-orthogonality Max: 0 average: 0
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 0 OK.

Mesh OK.

End
At least there are a lot of OKs. ;-)
I guess:
Code:
   *Number of regions: 2
    The mesh has multiple regions which are not connected by any face.
  <<Writing region information to "constant/cellToRegion"
could indicate a problem. The cellToRegion file contains a dictionary with a lot 0, with a single 1 as the last entry.

But so far I'm still helpless...

Thanks your help,

Florian
Horus is offline   Reply With Quote

Old   November 7, 2009, 13:01
Default
  #6
Member
 
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 7
Horus is on a distinguished road
Dare to bump it up. Anybody any hint for me?
Horus is offline   Reply With Quote

Old   November 20, 2009, 07:20
Default
  #7
RBJ
New Member
 
Robin Koldeweij
Join Date: Nov 2009
Posts: 19
Rep Power: 7
RBJ is on a distinguished road
Maybe a bit late, but if you look at your empty frontAndBack, there might be a problem with the part of "balken" there. A small portion of your front and back sides are formed by global AND balken. Maybe you should merge the balken patches of this side as slaves to global as master:

Code:
mergePatchPairs 
 

( 
<frontAndBack> <balken> ) );


or without the <> or with the vertices in places of the name. I don't really know, but I think it's something like this
RBJ is offline   Reply With Quote

Old   November 21, 2009, 04:34
Default
  #8
Member
 
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 7
Horus is on a distinguished road
My freeFoam (which is based on openFoam 1.5) says:

mergePatchPairs not currently supported.

Currently I'm running it on a Mac but since I'm about to migrate to Linux I'll try it again there with 1.6 in a couple of days.

Thanks,

Florian
Horus is offline   Reply With Quote

Old   December 12, 2009, 17:36
Default
  #9
Pat
New Member
 
toupador
Join Date: Oct 2009
Posts: 5
Rep Power: 7
Pat is on a distinguished road
Hallo
Maybe somebody can help. I've got the same Problem. I have created (in ICEM)a 2D geometrie and Mesh for airfoil in canal. in Parawien the mesh ist 2D (no split in z direction) but wenn i run the case (rhoSimpleFoam) i've got the following error :
This mesh contains patches of type empty but is not 1D or 2D
by virtue of the fact that the number of faces of this
empty patch is not divisible by the number of cells.

From function emptyFvPatchField<Type>::updateCoeffs()
in file /Users/florian/freeFoam/build/include/finiteVolume/../../../freefoam-0.1.0rc4/src/finiteVolume/fields/fvPatchFields/constraint/empty/emptyFvPatchField.C at line 148
please tell me what kann i do?
Pat is offline   Reply With Quote

Old   December 13, 2009, 13:26
Default
  #10
RBJ
New Member
 
Robin Koldeweij
Join Date: Nov 2009
Posts: 19
Rep Power: 7
RBJ is on a distinguished road
IS the amount of cells in z-direction equal to 1?
RBJ is offline   Reply With Quote

Old   December 13, 2009, 16:34
Default
  #11
Member
 
Florian
Join Date: Nov 2009
Posts: 59
Rep Power: 7
Horus is on a distinguished road
For my part: Yes (see my first posting). I have now upgraded from 1.5 to 1.6 on Linux but I get still the same error as Pat.

When I chang my blockMeshDict file to:
Code:
mergePatchPairs 
( 
 (<frontAndBack> <balken> ) 
);
as proposed by RBJ I get a segfault:
Code:
lorian@horus:~/OpenFOAM/run/canal> blockMesh 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.6                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 1.6-f802ff2d6c5a                                                      
Exec   : blockMesh                                                             
Date   : Dec 13 2009                                                           
Time   : 21:34:12                                                              
Host   : horus                                                                 
PID    : 5105                                                                  
Case   : /home/florian/OpenFOAM/run/canal                                      
nProcs : 1                                                                     
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).             

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


Creating block mesh from
    "/home/florian/OpenFOAM/run/canal/constant/polyMesh/blockMeshDict"


Creating blockCorners

Creating curved edges

Creating blocks

Creating patches

Creating block mesh topology

Default patch type set to empty

Check block mesh topology

        Basic statistics
                Number of internal faces : 0
                Number of boundary faces : 12
                Number of defined boundary faces : 12
                Number of undefined boundary faces : 0

        Checking patch -> block consistency

Creating block offsets

Creating merge list .

Creating points with scale 1

Creating cells

Creating patches

Creating mesh from block mesh

Default patch type set to empty
Creating merge patch pairs

#0  Foam::error::printStack(Foam::Ostream&) in "/home/florian/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#1  Foam::sigSegv::sigSegvHandler(int) in "/home/florian/OpenFOAM/OpenFOAM-1.6/lib/linux64GccDPOpt/libOpenFOAM.so"
#2  ?? in "/lib64/libc.so.6"
#3  main in "/home/florian/OpenFOAM/OpenFOAM-1.6/applications/bin/linux64GccDPOpt/blockMesh"
#4  __libc_start_main in "/lib64/libc.so.6"
#5  _start at /usr/src/packages/BUILD/glibc-2.9/csu/../sysdeps/x86_64/elf/start.S:116
Segmentation fault
Thanks,

Florian
Horus is offline   Reply With Quote

Old   December 15, 2009, 15:33
Default
  #12
Pat
New Member
 
toupador
Join Date: Oct 2009
Posts: 5
Rep Power: 7
Pat is on a distinguished road
Thank you RBJ for your reply. i ve found my error now my mesh work fine.
I haved make mistake ICEM. I ve not correctly select the mesh for frontAndback someone was merged with internalMesh.
Pat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UDF compiling problem Wouter Fluent UDF and Scheme Programming 6 June 6, 2012 04:43
Incoherent problem table in hollow-fiber spinning Gianni FLUENT 0 April 5, 2008 10:33
natural convection problem for a CHT problem Se-Hee CFX 2 June 10, 2007 06:29
Adiabatic and Rotating wall (Convection problem) ParodDav CFX 5 April 29, 2007 19:13
convergence problem Trushar Phoenics 5 August 27, 2002 23:40


All times are GMT -4. The time now is 13:39.