|
[Sponsors] |
March 18, 2019, 01:48 |
Floating point exception for pimpleFoam
|
#1 |
New Member
Gareth
Join Date: Apr 2010
Location: Sydney Aus
Posts: 14
Rep Power: 16 |
Hey there,
When running pimpleFoam, the following message is received: [56] #0 Foam::error:rintStack(Foam::Ostream&) at ??:? [56] #1 Foam::sigFpe::sigHandler(int) at ??:? [56] #2 ? in /lib64/libc.so.6 [56] #3 Foam::divide(Foam::Field<double>&, double const&, Foam::UList<double> const&) at ??:? [56] #4 Foam::tmp<Foam::GeometricField<double, Foam::volMesh> > Foam:perator/<Foam::fvPatchField, Foam::volMesh>(Foam::dimensioned<double> const&, Foam::tmp<Foam::GeometricField<double, Foam::volMesh> > const&) at ??:? [56] #5 Foam::fv::meanVelocityForce::constrain(Foam::fvMat rix<Foam::Vector<double> >&, int) at ??:? [56] #6 ? at ??:? [56] #7 __libc_start_main in /lib64/libc.so.6 [56] #8 ? at ??:? I have no idea why this happens. The checkMesh produces no error messages and all the settings are well defined. OpenFoam version is v1806. Also tested with v6, same error. When I test the exact same case using OpenMPI, there is no FPE. Anyone has any idea? Cheers |
|
March 18, 2019, 05:53 |
|
#2 |
Senior Member
|
Hi,
If you unwind a little bit your error, you see that it happens in meanVelocityForce::constrain method and it is FPE caused by division by zero. If you go to (https://develop.openfoam.com/Develop...tyForce.C#L231), you will find the following code: Code:
... rAPtr_() = 1.0/eqn.A(); ... |
|
March 21, 2019, 00:21 |
|
#3 |
New Member
Gareth
Join Date: Apr 2010
Location: Sydney Aus
Posts: 14
Rep Power: 16 |
Hi Alexeym,
Thanks for your response. A bit of context of what I'm trying to do. I am trying to simulate a channel flow with roughness elements. Roughness elements are cubes with no-slip. Top wall is set to slip, whereas all the other lateral boundaries are cyclic. The channel flow is driven by a source term in the momentum equation, i.e. meanVelocityForce. For this particular case, the number of elements = 25 mil. Also, to check whether this could be an issue with OpenFOAM itself, I ran the pimplefoam/channel395 tutorial, with the following cases: • Case 1: Standard channel case tutorial on my machine • Case 2: Standard channel case tutorial on cluster • Case 3: Channel case tutorial, but with very fine mesh = 25 million, timestep reduced to deltaT=0.01s. Parallel with np=48. • Case 4: Channel case tutorial, very fine mesh = 25 million, timestep reduced to deltaT=0.01s. Parallel with np=96. What I found out was that: • Cases 1 & 2 run perfectly fine. • Case 3 runs fine so far. • Case 4 crashes without any signs of divergence. Courant No. shows good stability. I also attach here the log files if you are interested. Could the problem lie in the incompatibility of the compiler? See https://bugs.openfoam.org/view.php?id=2067 for example. Case 3 is compiled on my own machine using gcc/5.4.0 while case 4 is provided by the cluster compiled using intel MPI, presumably 18.0.2 (I am not sure how to find out which version was used to compile OpenFOAM on the cluster). Appreciate your thoughts on this. |
|
March 21, 2019, 05:27 |
|
#4 |
Senior Member
|
Hi,
Log files are quite interesting. In the first message it is mean velocity fvOptions, who divides by zero. In the last message it is WALE LES model, who is not able to calculate magSqr of a tensor. The bug, you are referencing, was in version 3.0 and according to bug tracker is fixed. It seems your solution depends on decomposition. Did you try to use PCG instead of GAMG for pressure equation? |
|
March 31, 2019, 21:35 |
|
#5 |
New Member
Gareth
Join Date: Apr 2010
Location: Sydney Aus
Posts: 14
Rep Power: 16 |
Hi Alexeym,
Thanks for your message. As per your suggestion, I ran the pimplefoam/channel395 tutorial (with very fine mesh = 25 million, timestep reduced to deltaT=0.01s) using PCG. The simulation ran and there was no FPE error. However, as you can see from the log file attached, the no. of iterations for pressure is way too high. Would you have any suggestions as to how to reduce the number of iterations? Cheers |
|
April 1, 2019, 04:31 |
|
#6 |
Senior Member
|
Hi,
Usually GAMG requires lower number of iterations to converge, though PCG and GAMG have different time per iteration. Let's take a look at your fvSolution to check your settings (for both solvers). |
|
April 1, 2019, 20:52 |
|
#7 |
New Member
Gareth
Join Date: Apr 2010
Location: Sydney Aus
Posts: 14
Rep Power: 16 |
Hi,
The fvSolution is attached here for your reference. You can find both solvers are inside the file, one of them is commented. Cheers |
|
April 2, 2019, 04:16 |
|
#8 |
Senior Member
|
Hi,
I look at your execution logs and a question rises: why do you think that one outer PIMPLE iteration is enough for convergence? Initial residuals for pressure are rather large. Could you increase nOuterCorrectors and use convergence criteria in PIMPLE dictionary? |
|
May 10, 2021, 09:55 |
Similar Floating Point Exception
|
#9 |
New Member
Ashish
Join Date: Mar 2020
Posts: 7
Rep Power: 6 |
Hello All,
I am also getting some error in my simulation with PimpleFOAM Code:
PIMPLE: Iteration 1 smoothSolver: Solving for cellDisplacementx, Initial residual = 0.0740798382, Final residual = 2.958561232e-07, No Iterations 1000 smoothSolver: Solving for cellDisplacementy, Initial residual = 0.05155271984, Final residual = 2.032595483e-07, No Iterations 1000 GAMG: Solving for pcorr, Initial residual = 1, Final residual = 8.18571987e-05, No Iterations 51 GAMG: Solving for pcorr, Initial residual = 0.3298674795, Final residual = 8.848076892e-06, No Iterations 86 time step continuity errors : sum local = 9.584976172e-09, global = -3.267797411e-11, cumulative = 2.862766843e-08 smoothSolver: Solving for Ux, Initial residual = 0.02713224174, Final residual = 8.984365086e-09, No Iterations 8 smoothSolver: Solving for Uy, Initial residual = 0.01279174078, Final residual = 3.869818122e-09, No Iterations 9 #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::GAMGSolver::scale(Foam::Field<double>&, Foam::Field<double>&, Foam::lduMatrix const&, Foam::FieldField<Foam::Field, double> const&, Foam::UPtrList<Foam::lduInterfaceField const> const&, Foam::Field<double> const&, unsigned char) const at ??:? #4 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 Foam::GAMGSolver::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? #6 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:? #7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/pimpleFoam" #8 Foam::fvMatrix<double>::solve() in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/pimpleFoam" #9 ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/pimpleFoam" #10 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #11 ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/pimpleFoam" Code:
PIMPLE: Iteration 16 smoothSolver: Solving for Ux, Initial residual = 0.9999598623, Final residual = 4.591920031e-07, No Iterations 21 smoothSolver: Solving for Uy, Initial residual = 0.9999598623, Final residual = 4.591920031e-07, No Iterations 21 DICPCG: Solving for p, Initial residual = 1, Final residual = 8.056018001e-16, No Iterations 2 DICPCG: Solving for p, Initial residual = 0.4638702675, Final residual = 1.090106591e-16, No Iterations 2 time step continuity errors : sum local = 8.38411891e+58, global = -6.678511561e+46, cumulative = -6.678511561e+46 DICPCG: Solving for p, Initial residual = 0.07147288922, Final residual = 3.45333497e-17, No Iterations 2 DICPCG: Solving for p, Initial residual = 0.1452222127, Final residual = 1.388630575e-16, No Iterations 2 time step continuity errors : sum local = 1.330171891e+59, global = -7.122488046e+46, cumulative = -1.380099961e+47 PIMPLE: Iteration 17 smoothSolver: Solving for Ux, Initial residual = 0.9999620036, Final residual = 9.932747014e-07, No Iterations 371 smoothSolver: Solving for Uy, Initial residual = 0.9999682313, Final residual = 9.784521833e-07, No Iterations 372 #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::DICPreconditioner::calcReciprocalD(Foam::Field<double>&, Foam::lduMatrix const&) at ??:? #4 Foam::DICPreconditioner::DICPreconditioner(Foam::lduMatrix::solver const&, Foam::dictionary const&) at ??:? #5 Foam::lduMatrix::preconditioner::addsymMatrixConstructorToTable<Foam::DICPreconditioner>::New(Foam::lduMatrix::solver const&, Foam::dictionary const&) at ??:? #6 Foam::lduMatrix::preconditioner::New(Foam::lduMatrix::solver const&, Foam::dictionary const&) at ??:? #7 Foam::PCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const at ??:? #8 Foam::fvMatrix<double>::solveSegregated(Foam::dictionary const&) at ??:? #9 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/pimpleFoam" #10 Foam::fvMatrix<double>::solve() in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/pimpleFoam" #11 ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/pimpleFoam" #12 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #13 ? in "/opt/openfoam7/platforms/linux64GccDPInt32Opt/bin/pimpleFoam" Floating point exception (core dumped) Attached case files. Let me know if you want to see any other file. Can Anyone help me to understand the reason behind it? Thanks in advance |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
icoFoam floating point exception (8) | leizhao512 | OpenFOAM Running, Solving & CFD | 7 | November 1, 2018 12:43 |
A floating point exception has occurred: floating point exception [Overflow]. | starlight | STAR-CCM+ | 4 | May 4, 2016 10:08 |
A floating point exception - SEM Model | yansheng | STAR-CCM+ | 1 | April 4, 2016 05:57 |
Floating point exception from twoPhaseEulerFoam | openfoammaofnepo | OpenFOAM Running, Solving & CFD | 1 | March 19, 2016 14:56 |
Floating point exception (core dumped) for GAMG solver | yuhou1989 | OpenFOAM Running, Solving & CFD | 2 | March 24, 2015 20:28 |