CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   2D mesh from netgen to OpenFOam (https://www.cfd-online.com/Forums/openfoam/101801-2d-mesh-netgen-openfoam.html)

xiyuqiu May 14, 2012 13:17

2D mesh from netgen to OpenFOam
 
Hello all,

I have created a 2D backward facing step flow and meshed it in netgen. However, when I try to do the

netgenNeutralToFoam filename conversion, openFoam abort the process and give me fatal error.


--> FOAM FATAL ERROR:
face 0 in patch 1 does not have neighbour cell face: 3(2023 0 8)

From function polyMesh::facePatchFaceCells(const faceList& patchFaces,const labelListList& pointCells,const faceListList& cellsFaceShapes,const label patchID)
in file meshes/polyMesh/polyMeshFromShapeMesh.C at line 124.

FOAM aborting

#0 Foam::error::printStack(Foam::Ostream&) in "/share/apps/of/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::error::abort() in "/share/apps/of/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 Foam::polyMesh::facePatchFaceCells(Foam::List<Foam ::face> const&, Foam::List<Foam::List<int> > const&, Foam::List<Foam::List<Foam::face> > const&, int) const in "/share/apps/of/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so"
#3 Foam::polyMesh::polyMesh(Foam::IOobject const&, Foam::Xfer<Foam::Field<Foam::Vector<double> > > const&, Foam::List<Foam::cellShape> const&, Foam::List<Foam::List<Foam::face> > const&, Foam::List<Foam::word> const&, Foam::List<Foam::word> const&, Foam::word const&, Foam::word const&, Foam::List<Foam::word> const&, bool) in "/share/apps/of/OpenFOAM-1.7.0/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 main in "/share/apps/of/OpenFOAM-1.7.0/applications/bin/linux64GccDPOpt/netgenNeutralToFoam"
#5 __libc_start_main in "/lib64/libc.so.6"
#6 __gxx_personality_v0 in "/share/apps/of/OpenFOAM-1.7.0/applications/bin/linux64GccDPOpt/netgenNeutralToFoam"
Aborted

Anyone know why?

thanks so much

Djub June 18, 2012 12:20

same kind of error
 
Hi,
I have the same kind of error:

Code:

--> FOAM FATAL ERROR:
face 0 in patch 0 does not have neighbour cell face: 4(1 5 6 2)

Nevertheless, my code is so simple it shouldn't have any problem!

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.0.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// convertToMeters 1;
vertices       
(
 (-4 -2 0) (10 -2 0) (10 2 0) (-4 2 0)
 (-4 -2 4) (10 -2 4) (10 2 4) (-4 2 4)
);
blocks         
(
    hex (0 1 2 3 5 6 7) (100 30 30) simpleGrading (.5 1 1)
);
edges         
(
);
boundary
(
    flux_entrant {
 type patch;
        faces ( (0 4 7 3) )  ; // pointe à l'exterieur du domaine
    }
    flux_sortant {
 type patch;
        faces ( (1 2 6 5) )  ;
    }
    les_parois {
 type symmetryPlane ;
 faces (
      (0 1 5 4)
      (4 5 6 7)
      (7 6 2 0)
      (3 2 1 0) );
    }
);
mergePatchPairs
(
);
// ************************************************************************* //

Could anybody help me? :confused:

xiyuqiu June 18, 2012 13:32

Hi, I have found out netgen will not create a 2D geometry. If you want 2D case, you should use block mesh. This is how I get around the problem. hope this helps.


Quote:

Originally Posted by Djub (Post 367042)
Hi,
I have the same kind of error:

Code:

--> FOAM FATAL ERROR:
face 0 in patch 0 does not have neighbour cell face: 4(1 5 6 2)

Nevertheless, my code is so simple it shouldn't have any problem!

Code:

/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.0.1                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.com                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// convertToMeters 1;
vertices       
(
 (-4 -2 0) (10 -2 0) (10 2 0) (-4 2 0)
 (-4 -2 4) (10 -2 4) (10 2 4) (-4 2 4)
);
blocks         
(
    hex (0 1 2 3 5 6 7) (100 30 30) simpleGrading (.5 1 1)
);
edges         
(
);
boundary
(
    flux_entrant {
 type patch;
        faces ( (0 4 7 3) )  ; // pointe à l'exterieur du domaine
    }
    flux_sortant {
 type patch;
        faces ( (1 2 6 5) )  ;
    }
    les_parois {
 type symmetryPlane ;
 faces (
      (0 1 5 4)
      (4 5 6 7)
      (7 6 2 0)
      (3 2 1 0) );
    }
);
mergePatchPairs
(
);
// ************************************************************************* //

Could anybody help me? :confused:


anon_a June 19, 2012 02:02

hex (0 1 2 3 4 5 6 7)

Also:
(7 6 2 3)

Djub June 19, 2012 04:15

Thanks
 
:o:o:o
so sully...
place setting of shame...
Of course, it works now.
I will try not annoying you anymore for that stupid mistakes...

anon_a June 19, 2012 11:02

No problem, blockMesh is a little hard to master because you don't see what you are doing.
What about switching to another program?
For example, you can try SALOME, enGrid, gmsh...
Just take a look around the forum.

Djub June 19, 2012 11:45

discretizer
 
A colleague of mine adviced me on discretizer (http://www.discretizer.org/).
By the way, I have allready so much to learn about OF, I prefer to concentrate on it and not get involved in different software (I also have to learn Linux-Suse, paraFoam,...).
'nice eveaning,
Julien


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