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/)
-   -   interFoam printStack error (https://www.cfd-online.com/Forums/openfoam-solving/136005-interfoam-printstack-error.html)

gooya_kabir May 21, 2014 08:01

interFoam printStack error
 
1 Attachment(s)
Hello Foam'ers

I am working on a simple geometry(attachment). I fill the first part of volume with setField and when I run interFoam, this error appears:
[PHP]MULES: Solving for alpha1
Phase-1 volume fraction = 0.0566561 Min(alpha1) = 0 Max(alpha1) = 1
MULES: Solving for alpha1
Phase-1 volume fraction = 0.0549789 Min(alpha1) = 0 Max(alpha1) = 1
#0 Foam::error::printStack(Foam::Ostream&) in "/home/reza/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/home/reza/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libOpenFOAM.so"
#2 Uninterpreted:
#3 void Foam::fvc::surfaceIntegrate<Foam::Vector<double> >(Foam::Field<Foam::Vector<double> >&, Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/home/reza/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#4 Foam::tmp<Foam::GeometricField<Foam::Vector<double >, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::surfaceIntegrate<Foam::Vector<double> >(Foam::GeometricField<Foam::Vector<double>, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/home/reza/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#5 at gaussDivSchemes.C:0
#6 Foam::fv::gaussDivScheme<Foam::Tensor<double> >::fvcDiv(Foam::GeometricField<Foam::Tensor<double >, Foam::fvPatchField, Foam::volMesh> const&) in "/home/reza/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libfiniteVolume.so"
#7 Foam::tmp<Foam::GeometricField<Foam::innerProduct< Foam::Vector<double>, Foam::Tensor<double> >::type, Foam::fvPatchField, Foam::volMesh> > Foam::fvc::div<Foam::Tensor<double> >(Foam::GeometricField<Foam::Tensor<double>, Foam::fvPatchField, Foam::volMesh> const&) in "/home/reza/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libincompressibleTurbulenceModel.so"
#8 Foam::incompressible::laminar::divDevRhoReff(Foam: :GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&) const in "/home/reza/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/lib/libincompressibleTurbulenceModel.so"
#9
in "/home/reza/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/bin/interFoam"
#10 __libc_start_main in "/lib/i386-linux-gnu/libc.so.6"
#11
in "/home/reza/OpenFOAM/OpenFOAM-2.2.x/platforms/linuxGccDPOpt/bin/interFoam"
Floating point exception (core dumped)
/PHP]

I appreciate any help :)
thanks

gooya_kabir May 23, 2014 07:43

1 Attachment(s)
Hello again,

It works with a simple rectangular cube, but when I add the triangle shape to the geometry (with just changing the blockMeshDict), this error appears. something is wrong with geometry that I cannot understand. I attached the blockmeshDict, which might help.

alexeym May 23, 2014 08:02

Hi,

surely it'll be easier for everybody if you show...

1. Your case files (as the error may be in mesh, schemes, solver, boundary conditions, initial conditions, elsewhere).

2. If 1 is not possible for some reason, your checkMesh output in CODE tag.

gooya_kabir May 23, 2014 08:19

1 Attachment(s)
Thank you. I attached the case.

alexeym May 23, 2014 09:12

Well,

I'd say it's rather rude to ignore blockMesh warning ;)

Code:

Creating block mesh topology
--> FOAM Warning :
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -66666.7 for face 0
--> FOAM Warning :
    From function cellModel::mag(const labelList&, const pointField&)
    in file meshes/meshShapes/cellModel/cellModel.C at line 128
    zero or negative pyramid volume: -66666.7 for face 1
...

You've made a mistake in the numbering of vertexes in your blocks description.

As a result you've got these parameters of the mesh:

Code:

    Mesh non-orthogonality Max: 180 average: 151.951
 ***Number of non-orthogonality errors: 7050.
  <<Writing 7050 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
 ***Max skewness = 6.01549, 3510 highly skew faces detected which may impair the quality of the results
  <<Writing 3510 skew faces to set skewFaces
    Coupled point location match (average 0) OK.

Failed 2 mesh checks.

It's rather difficult to run simulations with that kind of mesh.

gooya_kabir June 3, 2014 07:54

Thank you. I tried to change the blockMeshDict to correct the mesh generation problem (geometry shape is in first post). I tried the
PHP Code:

prism 

for block generation and also I changed the vertexes number, but still it does not work. What is wrong with mesh?
last update of mesh is like this:
PHP Code:

convertToMeters 0.000001;

vertices
(
(
0 0 5)
(
400 0 5)
(
0 200 5)
(
400 200 5)
(
440 -70 5)
(
480 0 5)
(
440 270 5)
(
480 200 5)
(
880 0 5)
(
880 200 5)
(
0 0 0)
(
400 0 0)
(
0 200 0)
(
400 200 0)
(
440 -70 0)
(
480 0 0)
(
440 270 0)
(
480 200 0)
(
880 0 0)
(
0 0 0)
(
400 0 0)
(
0 200 0)
(
400 200 0)
(
440 -70 0)
(
480 0 0)
(
440 270 0)
(
480 200 0)
(
880 0 0)
(
880 200 0)
blocks
(
    
hex (0 1 3 2 10 11 13 12) (30 30 1simpleGrading (1 1 1)
    
prism (1 4 5 11 14 15) (30 30 1simpleGrading (1 1 1)
    
prism (3 7 6 13 17 16) (30 30 1simpleGrading (1 1 1)
    
hex (1 5 7 3 11 15 17 13) (30 30 1simpleGrading (1 1 1)
    
hex (5 8 9 7 15 18 19 17) (30 30 1simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    
fixedWall
    
{
type wall;
        
faces
        
(
(
0 1 11 10)
(
1 4 14 11)
(
4 5 15 14)
(
5 8 18 15)
(
2 12 13 3)
(
3 13 16 6)
(
6 16 17 7)
(
7 17 19 9)
        );
    }
    
frontAndBack
    
{
        
type empty;
        
faces
        
(
(
10 11 13 12)
(
2 3 1 0)
(
3 7 5 1)
(
3 6 7)
(
1 5 4)
(
7 9 8 5)
(
11 14 15)
(
13 17 16)
(
11 15 17 13)
(
15 18 19 17)
        );
    }
outlet
    
{
        
type patch;
        
faces
        
(
            (
8 9 19 18)
        );
    }
    
inlet
    
{
type patch;
        
faces
        
(
            (
0 10 12 2)
        );
    }

);

mergePatchPairs
(
); 


alexeym June 3, 2014 08:14

Hi,

the code, you've posted, doesn't work at all. So I've decided to look closer at the case you've posted previously. I've modified blocks section the following way:

Code:

blocks
(
    hex (2 6 7 3 0 4 5 1) (30 30 1) simpleGrading (1 1 1)
    hex (6 10 11 7 4 8 9 5) (30 30 1) simpleGrading (1 1 1)
    hex (10 14 15 11 8 12 13 9) (30 30 1) simpleGrading (1 1 1)
    hex (14 18 19 15 12 16 17 13) (30 30 1) simpleGrading (1 1 1)
);

and after this modification checkMesh is quite happy with a mesh:

Code:

Checking geometry...
    Overall domain bounding box (0 -7e-05 0) (0.00088 0.00027 5e-06)
    Mesh (non-empty, non-wedge) directions (1 1 0)
    Mesh (non-empty) directions (1 1 0)
    All edges aligned with or perpendicular to non-empty directions.
    Boundary openness (6.37937e-19 -2.34485e-18 3.95487e-16) OK.
    Max cell openness = 1.92162e-16 OK.
    Max aspect ratio = 10.1333 OK.
    Minimum face area = 6.66667e-12. Maximum face area = 8.88889e-11.  Face area magnitudes OK.
    Min volume = 4.4963e-17. Max volume = 4.44444e-16.  Total volume = 9.08e-13.  Cell volumes OK.
    Mesh non-orthogonality Max: 59.4113 average: 28.0489
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 3.65102 OK.
    Coupled point location match (average 0) OK.

You mistake was really in wrong numbering of the vertices. In you hex statements you first described top plane and then bottom plane and as a results volume of the hexagonal block was negative.

Not quite sure about high difference in cell sizes between outer and central parts of the mesh but you can start with the mesh you've got and if results should be improved, you can make mesh cell sizes more uniform.


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