# Floating point exception (yes...)

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

October 23, 2016, 14:42
Floating point exception (yes...)
#1
New Member

Join Date: May 2014
Posts: 13
Rep Power: 11
Hello world !

I’ve been keeping an eye on the forum since a few days, when a problem has stopped my current analysis of a F1 car in OpenFoam… It was all running fine until I got into trouble, and it is called Floating point exception ! As much as I could read here and with my own conclusions, it is a problem in solving the simulation, some forces starts to increase to infinite and there becomes the trouble. I suppose it is a bad config of the 0 folder, however this exercises are just a mere copy of a modified motorbike tutorial, to suit my goals. Also I have run this simulation before, using this configuration with 11M and 8M elements, and it all were fine…

I copy the error for you to see if it is possible to solve it (how can I?), then I write the details.

Log.simplefoam:
Code:
```.
.
Time = 16

smoothSolver:  Solving for Ux, Initial residual = 0.4577433, Final residual = 0.049488617, No Iterations 89
smoothSolver:  Solving for Uy, Initial residual = 0.50514958, Final residual = 0.045692466, No Iterations 111
smoothSolver:  Solving for Uz, Initial residual = 0.54803684, Final residual = 0.05058686, No Iterations 99
GAMG:  Solving for p, Initial residual = 0.99997705, Final residual = 0.045319146, No Iterations 4
time step continuity errors : sum local = 5.724511e+22, global = -2.0239651e+19, cumulative = -2.0239691e+19
smoothSolver:  Solving for omega, Initial residual = 0.0018840911, Final residual = 0.0018840911, No Iterations 0
smoothSolver:  Solving for k, Initial residual = 0.12713486, Final residual = 0.010924944, No Iterations 4
ExecutionTime = 1531.99 s  ClockTime = 1587 s

forceCoeffs FC_all write:
Cm    = 4.4527335e+38
Cd    = 2.2644272e+38
Cl    = -3.1365293e+38
Cl(f) = 2.8844689e+38
Cl(r) = -6.0209981e+38

forceCoeffs FC_DF write:
Cm    = -8.6279513e+36
Cd    = 1.8271275e+35
Cl    = 3.0221822e+36
Cl(f) = -7.1168602e+36
Cl(r) = 1.0139042e+37

forceCoeffs FC_FW write:
Cm    = -3.9464373e+35
Cd    = -3.8710834e+35
Cl    = 8.5864521e+35
Cl(f) = 3.467888e+34
Cl(r) = 8.2396633e+35

forceCoeffs FC_RW write:
Cm    = -1.6720172e+34
Cd    = -6.7760632e+32
Cl    = 3.3563058e+33
Cl(f) = -1.5042019e+34
Cl(r) = 1.8398325e+34

forceCoeffs FC_MC write:
Cm    = -6.9842379e+36
Cd    = 2.0477325e+36
Cl    = 4.0989468e+36
Cl(f) = -4.9347645e+36
Cl(r) = 9.0337113e+36

forceCoeffs FC_FT write:
Cm    = 4.6200689e+38
Cd    = 2.2455591e+38
Cl    = -3.2199196e+38
Cl(f) = 3.0101091e+38
Cl(r) = -6.2300287e+38

forceCoeffs FC_RT write:
Cm    = -3.6955346e+35
Cd    = 3.9559462e+34
Cl    = 8.4964137e+34
Cl(f) = -3.2707139e+35
Cl(r) = 4.1203553e+35

forceCoeffs FC_FS write:
Cm    = -3.2520765e+35
Cd    = -5.4436352e+33
Cl    = 2.6467591e+35
Cl(f) = -1.9286969e+35
Cl(r) = 4.575456e+35

forceCoeffs FC_RS write:
Cm    = -1.1199115e+34
Cd    = 2.4305181e+33
Cl    = 2.7576384e+33
Cl(f) = -9.8202954e+33
Cl(r) = 1.2577934e+34

forceCoeffs FC_HM write:
Cm    = -3.3366807e+33
Cd    = 7.6042636e+33
Cl    = 3.3570304e+33
Cl(f) = -1.6581655e+33
Cl(r) = 5.0151959e+33

forceCoeffs FC_MS write:
Cm    = -6.9195888e+32
Cd    = 8.0411046e+30
Cl    = 1.4585541e+32
Cl(f) = -6.1903117e+32
Cl(r) = 7.6488659e+32

forces F_all write:
sum of forces:
pressure : (5.5478467e+40 4.7693711e+41 -7.6844967e+40)
viscous  : (-5.2084616e+23 2.7371834e+24 1.4683138e+24)
porous   : (0 0 0)
sum of moments:
pressure : (-2.2639604e+41 1.0909197e+41 5.2415948e+41)
viscous  : (6.0845954e+23 -1.8867381e+24 3.7820324e+24)
porous   : (0 0 0)

forces F_DF write:
sum of forces:
pressure : (4.4764624e+37 1.5554199e+38 7.4043465e+38)
viscous  : (3.0718397e+20 -4.8158765e+19 2.6805852e+19)
porous   : (0 0 0)
sum of moments:
pressure : (1.2705452e+39 -2.1138481e+39 2.8288225e+38)
viscous  : (5.0873584e+19 -4.173384e+19 -6.2600578e+20)
porous   : (0 0 0)

forces F_FW write:
sum of forces:
pressure : (-9.4841542e+37 -1.4490273e+38 2.1036808e+38)
viscous  : (-8.509648e+21 -8.5489268e+20 2.6137722e+21)
porous   : (0 0 0)
sum of moments:
pressure : (3.3877115e+38 -9.6687713e+37 5.6202687e+37)
viscous  : (3.9632255e+21 -2.5455955e+21 1.4065171e+22)
porous   : (0 0 0)

forces F_MC write:
sum of forces:
pressure : (5.0169446e+38 1.5739133e+39 1.004242e+39)
viscous  : (-8.6441911e+21 5.3699526e+20 9.6584024e+21)
porous   : (0 0 0)
sum of moments:
pressure : (1.2975152e+39 -1.7111383e+39 1.8464863e+39)
viscous  : (1.6914593e+22 -1.0897105e+22 1.7843728e+22)
porous   : (0 0 0)

forces F_RW write:
sum of forces:
pressure : (-1.6601355e+35 -1.1157278e+36 8.2229493e+35)
viscous  : (2.5444248e+18 -2.4638871e+17 4.2237586e+18)
porous   : (0 0 0)
sum of moments:
pressure : (2.2067933e+36 -4.0964422e+36 -5.083615e+36)
viscous  : (6.9600611e+18 -1.8908935e+19 -5.3236883e+18)
porous   : (0 0 0)

Time = 17

smoothSolver:  Solving for Ux, Initial residual = 0.65619427, Final residual = 7.0498179, No Iterations 1000
smoothSolver:  Solving for Uy, Initial residual = 0.69676997, Final residual = 5.9391165, No Iterations 1000
smoothSolver:  Solving for Uz, Initial residual = 0.69566693, Final residual = 7.7600318, No Iterations 1000
[5] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[5] #1  Foam::sigFpe::sigHandler(int) at ??:?
[5] #2  ? in "/lib/x86_64-linux-gnu/libc.so.6"
[5] #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 ??:?
[5] #4  Foam::GaussSeidelSmoother::smooth(Foam::Field<double>&, Foam::Field<double> const&, unsigned char, int) const at ??:?
[5] #5  Foam::GAMGSolver::Vcycle(Foam::PtrList<Foam::lduMatrix::smoother> const&, Foam::Field<double>&, Foam::Field<double> const&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::Field<double>&, Foam::PtrList<Foam::Field<double> >&, Foam::PtrList<Foam::Field<double> >&, unsigned char) const at ??:?
[5] #6  Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:?
[5] #7  Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:?
[5] #8  Foam::fvMatrix<double>::solve(Foam::dictionary const&) at ??:?
[5] #9  Foam::fvMatrix<double>::solve() at ??:?
[5] #10  ? at ??:?
[5] #11  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
[5] #12  ? at ??:?
[ubuntu:04458] *** Process received signal ***
[ubuntu:04458] Signal: Floating point exception (8)
[ubuntu:04458] Signal code:  (-6)
[ubuntu:04458] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x354a0)[0x7f1a8f6094a0]
[ubuntu:04458] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7f1a8f609418]
[ubuntu:04458] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x354a0)[0x7f1a8f6094a0]
[ubuntu:04458] [ 3] /opt/openfoam4/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZN4Foam19GaussSeidelSmoother6smoothERKNS_4wordERNS_5FieldIdEERKNS_9lduMatrixERKS5_RKNS_10FieldFieldIS4_dEERKNS_8UPtrListIKNS_17lduInterfaceFieldEEEhi+0x42d)[0x7f1a9085788d]
[ubuntu:04458] [ 4] /opt/openfoam4/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam19GaussSeidelSmoother6smoothERNS_5FieldIdEERKS2_hi+0x28)[0x7f1a90857c98]
[ubuntu:04458] [ 5] /opt/openfoam4/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver6VcycleERKNS_7PtrListINS_9lduMatrix8smootherEEERNS_5FieldIdEERKS8_S9_S9_S9_S9_S9_RNS1_IS8_EESD_h+0x93d)[0x7f1a9087552d]
[ubuntu:04458] [ 6] /opt/openfoam4/platforms/linux64GccDPInt32Opt/lib/libOpenFOAM.so(_ZNK4Foam10GAMGSolver5solveERNS_5FieldIdEERKS2_h+0x86d)[0x7f1a90877cfd]
[ubuntu:04458] [ 7] /opt/openfoam4/platforms/linux64GccDPInt32Opt/lib/libfiniteVolume.so(_ZN4Foam8fvMatrixIdE15solveSegregatedERKNS_10dictionaryE+0x15b)[0x7f1a929d395b]
[ubuntu:04458] [ 8] simpleFoam(_ZN4Foam8fvMatrixIdE5solveERKNS_10dictionaryE+0x191)[0x468e51]
[ubuntu:04458] [ 9] simpleFoam(_ZN4Foam8fvMatrixIdE5solveEv+0xd4)[0x4690a4]
[ubuntu:04458] [10] simpleFoam[0x422d25]
[ubuntu:04458] [11] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f1a8f5f4830]
[ubuntu:04458] [12] simpleFoam[0x4248e9]
[ubuntu:04458] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 5 with PID 4458 on node ubuntu exited on signal 8 (Floating point exception).

#END OF LOG.SIMPLEFOAM```
My exercise:
Simulate half a F1 car using kOmegaSST turbulence model, at 20m/s.
Boundary conditions:
-DF: Diffuser, a wall
-FW: Front wing, a wall
-RW: Rear wing, a wall
-MC: Monocoque, a wall
-HM: Helmet, a wall
-MS: Monkeyseat, a wall
-FS: Front suspension, a wall
-RS: Rear suspension, a wall
-FT: Front tire, rotating wall
-RT: Rear tire, rotating wall

blockMeshDict:
-Sym1: symmetric plane
-movwall: tarmarc, moving at constant velocity, 20m/s
-slipwall and slipwallFR: upper and front patches, slip walls.
-inlet and outlet

Mesh seems not to have any problem, except for some skew faces.

I attached my case files, the original one that worked perfectly, and the case A_1 and A_2. In case A_1 the mesh is a little bit more refined and the FW .stl file has changed (result: 11M elements). In the A_2 the mesh is even more refined, but the problem is the same (15M elements).

I beg your pardon, I know this is a common issue, but I don't have a real clue on how to solve it, or why the case A works properly and the other 2 don't ... I've also added some screenshots for you to see the geometry and some post process.
Attached Images
 P1.jpg (110.2 KB, 13 views) df2.jpg (131.4 KB, 10 views)
Attached Files
 A.zip (19.7 KB, 1 views) A_1.zip (100.8 KB, 0 views) A_2.zip (63.1 KB, 0 views)

 Tags exception, floating, point, solve