CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   Open Source Meshers: Gmsh, Netgen, CGNS, ... (http://www.cfd-online.com/Forums/openfoam-meshing-open/)
-   -   gmsh SIMPLEFoam error (http://www.cfd-online.com/Forums/openfoam-meshing-open/89671-gmsh-simplefoam-error.html)

pcaste12 June 19, 2011 13:52

gmsh SIMPLEFoam error
 
Hi,
I am quit new to gmsh and OF simulation tools, so sorry if the question is very stupid!
I am working on a simple case, here is the .geo file:


Point(1)={0.1,0.0,0.0,1.0};
Point(2)={0.0,0.0,0.0,1.0};
Point(3)={0.0,0.1,0.0,1.0};
Point(4)={0.1,0.0,0.3,1.0};
Point(5)={0.0,0.0,0.3,1.0};
Point(6)={0.0,0.1,0.3,1.0};
Point(7)={0.2,0.0,0.4,1.0};
Point(8)={0.0,0.0,0.4,1.0};
Point(9)={0.0,0.2,0.4,1.0};
Point(10)={0.4,0.0,0.5,1.0};
Point(11)={0.0,0.0,0.5,1.0};
Point(12)={0.0,0.4,0.5,1.0};
Point(13)={0.4,0.0,0.8,1.0};
Point(14)={0.0,0.0,0.8,1.0};
Point(15)={0.0,0.4,0.8,1.0};
Point(16)={0.0,-0.1,0.0,1.0};
Point(17)={0.0,-0.1,0.3,1.0};
Point(18)={0.0,-0.2,0.4,1.0};
Point(19)={0.0,-0.4,0.5,1.0};
Point(20)={0.0,-0.4,0.8,1.0};
Point(21)={-0.1,0.0,0.0,1.0};
Point(22)={-0.1,0.0,0.3,1.0};
Point(23)={-0.2,0.0,0.4,1.0};
Point(24)={-0.4,0.0,0.5,1.0};
Point(25)={-0.4,0.0,0.8,1.0};
Circle(1)={1,2,3};
Circle(2)={4,5,6};
Circle(3)={7,8,9};
Circle(4)={10,11,12};
Circle(5)={13,14,15};
BSpline(6)={1,4,7,10,13};
Circle(7)={16,2,1};
Circle(8)={17,5,4};
Circle(9)={18,8,7};
Circle(10)={19,11,10};
Circle(11)={20,14,13};
BSpline(12)={16,17,18,19,20};
Circle(13)={21,2,16};
Circle(14)={22,5,17};
Circle(15)={23,8,18};
Circle(16)={24,11,19};
Circle(17)={25,14,20};
BSpline(18)={21,22,23,24,25};
Circle(19)={3,2,21};
Circle(20)={6,5,22};
Circle(21)={9,8,23};
Circle(22)={12,11,24};
Circle(23)={15,14,25};
BSpline(24)={3,6,9,12,15};
Line Loop(25)={1,-6,-5,24};
Ruled Surface(26)={25};
Line Loop(27)={7,-12,-11,6};
Ruled Surface(28)={27};
Line Loop(29)={13,-18,-17,12};
Ruled Surface(30)={29};
Line Loop(31)={19,-24,-23,18};
Ruled Surface(32)={31};
Line Loop(33)={1,7,13,19};
Plane Surface(34)={33};
Line Loop(35)={5,11,17,23};
Plane Surface(36)={35};
Surface Loop(37)={26,28,30,32,34,36};
Volume(38)={37};
Physical Volume('thevol')={38};
Physical Surface('outlet')={36};
Physical Surface('inlet')={34};


Then with gmshToFoam and checkMesh I get the following result:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.x |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.7.x-131caa989cd3
Exec : checkMesh
Date : Jun 19 2011
Time : 19:32:00
Host : teotech
PID : 6270
Case : /home/pierre/simul/tuyere
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 9092
faces: 101757
internal faces: 96851
cells: 49652
boundary patches: 3
point zones: 0
face zones: 0
cell zones: 1

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

Checking topology...
Boundary definition 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 74 48 ok (non-closed singly connected)
outlet 1140 611 ok (non-closed singly connected)
defaultFaces 3692 1896 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-0.4 -0.4 0) (0.4 0.4 0.8)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (-4.10056e-19 7.45656e-18 4.60858e-16) OK.
Max cell openness = 5.65946e-16 OK.
Max aspect ratio = 793.778 OK.
Minumum face area = 4.93289e-06. Maximum face area = 0.00114548. Face area magnitudes OK.
Min volume = 4.90021e-10. Max volume = 1.1735e-05. Total volume = 0.182742. Cell volumes OK.
Mesh non-orthogonality Max: 89.5733 average: 21.598
*Number of severely non-orthogonal faces: 188.
Non-orthogonality check OK.
<<Writing 188 non-orthogonal faces to set nonOrthoFaces
Face pyramids OK.
Max skewness = 3.54681 OK.

Mesh OK.

End

Of course the simulation broke with the floating point error.

Does any body have an idea?

Thanks in advance.

vatavuk June 20, 2011 06:10

Hi Pierre,
You said that there was a floating point error. What program were you running when the error ocurred? gmshToFoam, checkMesh or another one? I'm not seeing any error in your listing.
Paulo

pcaste12 June 20, 2011 10:54

Hi Paulo,

I am gona send you the full error tonight. But I think I found some sort of explanation, the use of BSpline instead of Spline is making a mesh that create some "severely non-orthogonal faces" into checkMesh and may create my floating point error!! When I use Spline instead then the simulation is running.

Thanks,
Pierre.

pcaste12 June 20, 2011 16:16

Hi Paulo,
As I told you here is the error:
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.7.x |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : 1.7.x-131caa989cd3
Exec : simpleFoam
Date : Jun 20 2011
Time : 22:11:00
Host : pierre
PID : 3052
Case : /home/pierre/simul/tuyere
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
sigmaEps 1.3;
}


Starting time loop

Time = 0.1

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.0571793, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0546366, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 0.0799892, No Iterations 1
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.00777315, No Iterations 43
time step continuity errors : sum local = 0.00702036, global = 0.000117152, cumulative = 0.000117152
DILUPBiCG: Solving for epsilon, Initial residual = 0.1043, Final residual = 0.00795273, No Iterations 1
bounding epsilon, min: -3441.05 max: 29829.7 average: 36.8162
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 0.0261145, No Iterations 2
ExecutionTime = 0.03 s ClockTime = 0 s

Time = 0.2

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.0288448, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0288084, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 1, Final residual = 0.0286517, No Iterations 2
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.00953786, No Iterations 39
time step continuity errors : sum local = 2.18271e+09, global = 7.90041e+06, cumulative = 7.90041e+06
DILUPBiCG: Solving for epsilon, Initial residual = 1, Final residual = 0.0551685, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 0.0150691, No Iterations 1
ExecutionTime = 0.04 s ClockTime = 0 s

Time = 0.3

DILUPBiCG: Solving for Ux, Initial residual = 0.502541, Final residual = 0.0304122, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.461683, Final residual = 0.0183254, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.785259, Final residual = 0.0228697, No Iterations 1
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.00956886, No Iterations 50
time step continuity errors : sum local = 8.71612e+09, global = 1.08197e+08, cumulative = 1.16098e+08
DILUPBiCG: Solving for epsilon, Initial residual = 0.0528015, Final residual = 2.30919e-05, No Iterations 1
bounding epsilon, min: -1.19594e+21 max: 2.39908e+28 average: 1.0624e+25
DILUPBiCG: Solving for k, Initial residual = 0.894647, Final residual = 0.0496459, No Iterations 2
ExecutionTime = 0.05 s ClockTime = 0 s

Time = 0.4

DILUPBiCG: Solving for Ux, Initial residual = 0.999996, Final residual = 0.0240185, No Iterations 2
DILUPBiCG: Solving for Uy, Initial residual = 0.999997, Final residual = 0.0238356, No Iterations 2
DILUPBiCG: Solving for Uz, Initial residual = 0.999999, Final residual = 0.024046, No Iterations 2
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.00960579, No Iterations 142
time step continuity errors : sum local = 1.14414e+31, global = 2.03965e+30, cumulative = 2.03965e+30
DILUPBiCG: Solving for epsilon, Initial residual = 1, Final residual = 4.55935e-06, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 1, Final residual = 4.70311e-06, No Iterations 1
ExecutionTime = 0.06 s ClockTime = 0 s

Time = 0.5

DILUPBiCG: Solving for Ux, Initial residual = 0.187586, Final residual = 8.20619e-07, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.04668, Final residual = 1.12373e-07, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.126696, Final residual = 1.0614e-07, No Iterations 1
DICPCG: Solving for p, Initial residual = 1, Final residual = 836.029, No Iterations 1001
time step continuity errors : sum local = 1.85282e+36, global = 3.71701e+32, cumulative = 3.73741e+32
DILUPBiCG: Solving for epsilon, Initial residual = 0.21503, Final residual = 5.40936e-18, No Iterations 1
bounding epsilon, min: -3.56599e+78 max: 6.06557e+79 average: 4.49462e+76
DILUPBiCG: Solving for k, Initial residual = 0.0164715, Final residual = 0.000178468, No Iterations 1
bounding k, min: -1.23796e+59 max: 4.7932e+71 average: 1.68407e+68
ExecutionTime = 0.13 s ClockTime = 0 s

Time = 0.6

DILUPBiCG: Solving for Ux, Initial residual = 0.557413, Final residual = 0.0526199, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 0.9219, Final residual = 0.0856363, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.187282, Final residual = 0.00424953, No Iterations 1
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#1 Foam::sigFpe::sigFpeHandler(int) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#2 in "/lib/libc.so.6"
#3 Foam::DICPreconditioner::calcReciprocalD(Foam::Fie ld<double>&, Foam::lduMatrix const&) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#4 Foam::DICPreconditioner::DICPreconditioner(Foam::l duMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#5 Foam::lduMatrix::preconditioner::addsymMatrixConst ructorToTable<Foam::DICPreconditioner>::New(Foam:: lduMatrix::solver const&, Foam::dictionary const&) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#6 Foam::lduMatrix::preconditioner::New(Foam::lduMatr ix::solver const&, Foam::dictionary const&) in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#7 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam171/lib/linux64GccDPOpt/libOpenFOAM.so"
#8 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam171/lib/linux64GccDPOpt/libfiniteVolume.so"
#9
in "/opt/openfoam171/applications/bin/linux64GccDPOpt/simpleFoam"
#10 __libc_start_main in "/lib/libc.so.6"
#11
in "/opt/openfoam171/applications/bin/linux64GccDPOpt/simpleFoam"
Exception en point flottant


As I say I am not yet very familliar with the simulation and I try to understand why the "time step continuity errors" is so high and then the bounding epsilon.

Thanks,
Pierre.

vatavuk June 20, 2011 17:27

Hi Pierre,
So the error occurs when you run SimpleFoam. It seems to me that your calculation is diverging. This can happen because of many causes, including a problem with the mesh.

If the new mesh corrected the problem, then you should consider yourself a lucky person, because you haven’t lost many nights of sleep trying to discover the problem :D.
If you want to investigate the problem more deeply, you may look into the nonOrthoFaces file, that checkMesh says it has created. Then you could try to locate the problematic cells and see what happens with them(I never did this). It's also possible to improve convergence by lowering the relaxationFactors in the fvSolution file, in the system directory, but you have to be carefull with this, because it will make the program converge more slowly.
I hope this helps,
Paulo

pcaste12 June 21, 2011 06:21

Hi Paulo,

Many thanks, I will try this evening both suggestion, it will help me to learn about it. And then post the result. I tried yesterday to increase the size of the cells into the mesh and checkMesh was working fine (no nonOrthoFaces !!) then the simulation was working fine too.
Thanks,
Pierre.

pcaste12 June 21, 2011 17:27

Well, here is the tests I've done:
- modifying the "relaxationFatcors" didn't do much, instead of looping 7 times it does 8 ==> may be I didn't use the them in the best way
- changing the mesh, I've try to figure where are the 'nonOrthoFaces' but on gmsh with thousands of cells it is quit hard, I still have to learn
- re-meshing with smaller element with different options and make it work with 'only' 1 nonOrthoFaces!! but I modify the epsilon on the k-e turbulence model not sure yet to understand all of it ==> lots of work for sure..
Anyway thanks for your help, I will try to go futher..
Pierre.

vatavuk June 22, 2011 14:53

Hi Pierre,
I understood that the solver was converging with the new mesh, but it seems that you are also having trouble with this mesh.
Many other things may cause the lack of convergence, you will find more information searching the forum. See the link below for example:

http://www.cfd-online.com/Forums/ope...e-problem.html

Paulo

pcaste12 June 26, 2011 11:45

Many thanks Paulo, I will look at it and come back with my results.
Pierre.


All times are GMT -4. The time now is 16:01.