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/)
-   -   Foam fatal IO error (https://www.cfd-online.com/Forums/openfoam-solving/202074-foam-fatal-io-error.html)

arriluk May 20, 2018 06:55

Foam fatal IO error
 
Hello everyone, I am new in Open foam and I'm just facing some problems that I am unable to solve. Once I created my mesh and I have done gmshTofoam and set all the values in the folders 0 constant and system, when I run checkMesh, an error appears but I don't know why, I leave you here the code:

Quote:

Create time

Create mesh for time = 0

Time = 0

Mesh stats
points: 167260
internal points: 0
faces: 334670
internal faces: 166123
cells: 83680
faces per cell: 5.98462
boundary patches: 8
point zones: 0
face zones: 0
cell zones: 1

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

Checking topology...
Boundary definition OK.
***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.
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
back 83680 83630 ok (non-closed singly connected)
front 82958 82982 ok (non-closed singly connected)
inlet 27 56 ok (non-closed singly connected)
up 47 96 ok (non-closed singly connected)
outlet 87 176 ok (non-closed singly connected)
down 57 116 ok (non-closed singly connected)
wall 969 1938 ok (non-closed singly connected)
defaultFaces 722 800 ok (non-closed singly connected)

Checking faceZone topology for multiply connected surfaces...
No faceZones found.

Checking basic cellZone addressing...
CellZone Cells Points BoundingBox
fluid 83680 167260 (-2 -1.5 0) (3 1.5 0.1)

Checking geometry...
Overall domain bounding box (-2 -1.5 0) (3 1.5 0.1)
Mesh has 2 geometric (non-empty/wedge) directions (1 1 0)
Mesh has 2 solution (non-empty) directions (1 1 0)
All edges aligned with or perpendicular to non-empty directions.
Boundary openness (-2.6261144e-18 -3.6988763e-18 -1.0586381e-14) OK.
Max cell openness = 6.2447076e-16 OK.
Max aspect ratio = 24.088342 OK.
Minimum face area = 3.3701894e-08. Maximum face area = 0.050357489. Face area magnitudes OK.
Min volume = 3.3701894e-09. Max volume = 0.0050357489. Total volume = 1.4917998. Cell volumes OK.
Mesh non-orthogonality Max: 80.129444 average: 12.836373
*Number of severely non-orthogonal (> 70 degrees) faces: 8.
Non-orthogonality check OK.
<<Writing 8 non-orthogonal faces to set nonOrthoFaces
Face pyramids OK.
***Max skewness = 5.1180369, 15 highly skew faces detected which may impair the quality of the results
<<Writing 15 skew faces to set skewFaces
Coupled point location match (average 0) OK.

Failed 1 mesh checks.

End

On the other hand, when I run icoFoam, another error appears and I can't contiune with my simulation:

Quote:

Create time

Create mesh for time = 0


PISO: Operating solver in PISO mode

Reading transportProperties

Reading field p



--> FOAM FATAL IO ERROR:
Cannot find patchField entry for defaultFaces

file: /home/albert/Documents/upc/Mecanicadefluids/Projecte/Laminar/0/p.boundaryField

From function void Foam::GeometricField<Type, PatchField, GeoMesh>::Boundary::readField(const Foam::DimensionedField<TypeR, GeoMesh>&, const Foam::dictionary&) [with Type = double; PatchField = Foam::fvPatchField; GeoMesh = Foam::volMesh]
in file /home/albert/OpenFOAM/OpenFOAM-v1712/src/OpenFOAM/lnInclude/GeometricBoundaryField.C at line 191.

FOAM exiting
Thank you very much,

Albert

arriluk May 20, 2018 09:23

I think that the error may come from this line,


***Total number of faces on empty patches is not divisible by the number of cells in the mesh. Hence this mesh is not 1D or 2D.


But I don't know how to solve it, any ideas?

simrego May 20, 2018 09:58

Hi!


Check your mesh definition. Is it a 2D or a 3D mesh?


The second error means that you have a patch named defaultFaces in your mesh, but there is no definition for this patch in your p (and i think in U and etc.) file. When you import a mesh or create with blockMesh, every patch without definition automatically placed into patch called defaultFaces.

arriluk May 20, 2018 10:02

Quote:

Originally Posted by simrego (Post 692951)
Hi!


Check your mesh definition. Is it a 2D or a 3D mesh?


The second error means that you have a patch named defaultFaces in your mesh, but there is no definition for this patch in your p (and i think in U and etc.) file. When you import a mesh or create with blockMesh, every patch without definition automatically placed into patch called defaultFaces.


Hi, thanks for your remply! I have founded the solution. I just had to put empty on defaultFaces in the boundary archive.



But now I am facing a new problem. One I start the simulation, an error appears after some iterations saying



Quote:

Courant Number mean: 1.6328519e+32 max: 8.7269861e+35
#0 Foam::error::printStack(Foam::Ostream&) at ??:?
#1 Foam::sigFpe::sigHandler(int) at ??:?
#2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::GaussSeidelSmoother::smooth(Foam::word const&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::Field<double> const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, unsigned char, int) at ??:?
#4 Foam::GaussSeidelSmoother::smooth(Foam::Field<doub le>&, Foam::Field<double> const&, unsigned char, int) const at ??:?
#5 Foam::smoothSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
#6 Foam::fvMatrix<Foam::Vector<double> >::solveSegregated(Foam::dictionary const&) at ??:?
#7 Foam::fvMatrix<Foam::Vector<double> >::solveSegregatedOrCoupled(Foam::dictionary const&) at ??:?
#8 Foam::fvMesh::solve(Foam::fvMatrix<Foam::Vector<do uble> >&, Foam::dictionary const&) const at ??:?
#9 ? at ??:?
#10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#11 ? at ??:?
Floating point excepction


I have been looking for this Floating point error but I can't solve it, any ideas?

simrego May 20, 2018 10:11

First of all, your Courant number is huge!!
Code:

Courant Number mean: 1.6328519e+32 max: 8.7269861e+35
Honestly I'm not so pro in understanding these "Floating point exception" errors, but based on your checkMesh post, your mesh is bad. As i know orthogonality > 75 or 80 (not sure which) is an instant divergence. It is too high. And also skewness > 4 is bad. You should solve these first. It can cause divergence pretty easily.
If you'll still have problems you could check your boundary conditions.
And also try to use nonOrthogonalCorrectors in your fvSolution.
Code:

  Mesh non-orthogonality Max: 80.129444 average: 12.836373
  *Number of severely non-orthogonal (> 70 degrees) faces: 8.
    Non-orthogonality check OK.
  <<Writing 8 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
 ***Max skewness = 5.1180369, 15 highly skew faces detected which may impair the quality of the results
  <<Writing 15 skew faces to set skewFaces


arriluk May 20, 2018 10:31

1 Attachment(s)
Quote:

Originally Posted by simrego (Post 692954)
First of all, your Courant number is huge!!
Code:

Courant Number mean: 1.6328519e+32 max: 8.7269861e+35
Honestly I'm not so pro in understanding these "Floating point exception" errors, but based on your checkMesh post, your mesh is bad. As i know orthogonality > 75 or 80 (not sure which) is an instant divergence. It is too high. And also skewness > 4 is bad. You should solve these first. It can cause divergence pretty easily.
If you'll still have problems you could check your boundary conditions.
And also try to use nonOrthogonalCorrectors in your fvSolution.
Code:

  Mesh non-orthogonality Max: 80.129444 average: 12.836373
  *Number of severely non-orthogonal (> 70 degrees) faces: 8.
    Non-orthogonality check OK.
  <<Writing 8 non-orthogonal faces to set nonOrthoFaces
    Face pyramids OK.
 ***Max skewness = 5.1180369, 15 highly skew faces detected which may impair the quality of the results
  <<Writing 15 skew faces to set skewFaces



What do you mean by bad mesh? Non-structured? Sorry for these basic questions but this is my first simulation in OpenFoam. I give you my .geo file so you can tell me what's wrong, if it is possible.


Thank you in advance.

simrego May 20, 2018 10:37

I'm not so familiar with gmsh. I mean bad mesh like the quality of your mesh is bad. Your checkMesh already told you: "Failed 1 mesh checks."
You should fix it.

deepbandivadekar June 26, 2018 05:54

Quote:

Originally Posted by arriluk (Post 692956)
What do you mean by bad mesh? Non-structured? Sorry for these basic questions but this is my first simulation in OpenFoam. I give you my .geo file so you can tell me what's wrong, if it is possible.


Thank you in advance.


You need a balance of finer mesh (increases computation time) with corresponding smaller time step (increases computation time) and stability of the solution.


All times are GMT -4. The time now is 12:51.