
[Sponsors] 
Transonic Diffuser Case: Floating Point Exception 

LinkBack  Thread Tools  Search this Thread  Display Modes 
December 7, 2018, 23:54 
Transonic Diffuser Case: Floating Point Exception

#1 
Member
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 7 
Hi Foamers,
I am tying to duplicate the results of a diffuser (Converging Diverging) case, the original results have been obtained using sonicTurboFoam which has been replaced years ago. In the original case, the author solved the case as steadystate and laminar first with lower outlet pressure then he used the results as initial condition for the transient run. I tried first to run the case using sonicFoam directly but I receive floating point exception after a number of iterations, then I decided to run the case as steadystate laminar first using rhoSimpleFoam, however, I receive the floating point exception after some iterations but the source of error seems different. I am using here openFoam 5.0 The two cases are attached without the polyMesh folder due to the attachment size constraint, however, the checkMesh output as follow: nProcs : 1 sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE). fileModificationChecking : Monitoring runtime modified files using timeStampMaster (fileModificationSkew 10) allowSystemOperations : Allowing usersupplied system call operations // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Create time Create polyMesh for time = 0 Time = 0 Mesh stats points: 202202 internal points: 0 faces: 400800 internal faces: 198600 cells: 99900 faces per cell: 6 boundary patches: 5 point zones: 0 face zones: 0 cell zones: 0 Overall number of cells of each type: hexahedra: 99900 prisms: 0 wedges: 0 pyramids: 0 tet wedges: 0 tetrahedra: 0 polyhedra: 0 Checking topology... Boundary definition OK. 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 Inlet 90 182 ok (nonclosed singly connected) Outlet 90 182 ok (nonclosed singly connected) UpperWall 1110 2222 ok (nonclosed singly connected) BottomWall 1110 2222 ok (nonclosed singly connected) FrontBack 199800 202202 ok (nonclosed singly connected) Checking geometry... Overall domain bounding box (0.17776 0 0) (0.3806 0.066 0.1) Mesh has 2 geometric (nonempty/wedge) directions (1 1 0) Mesh has 2 solution (nonempty) directions (1 1 0) All edges aligned with or perpendicular to nonempty directions. Boundary openness (1.5802e17 8.90504e16 5.60963e15) OK. Max cell openness = 2.52446e16 OK. Max aspect ratio = 5.95444 OK. Minimum face area = 3.77399e08. Maximum face area = 0.00019282. Face area magnitudes OK. Min volume = 3.77399e09. Max volume = 1.33046e07. Total volume = 0.00314933. Cell volumes OK. Mesh nonorthogonality Max: 22.7385 average: 4.27349 Nonorthogonality check OK. Face pyramids OK. Max skewness = 0.10047 OK. Coupled point location match (average 0) OK. Mesh OK. End The mesh seems fine Any help will be appreciated Saleh 

December 9, 2018, 10:00 

#2 
Member
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 7 
Any ideas?


December 10, 2018, 12:53 

#3 
New Member
Allen George
Join Date: Dec 2013
Posts: 16
Rep Power: 11 
Upload a photo of error you obtained.


December 10, 2018, 23:09 

#4 
Member
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 7 
Hi Allen,
Thanks for your reply. For the rhoSimpleFoam: Time = 0.000252 smoothSolver: Solving for Ux, Initial residual = 0.0182727, Final residual = 0.000888658, No Iterations 4 smoothSolver: Solving for Uy, Initial residual = 0.054948, Final residual = 0.00275268, No Iterations 2 smoothSolver: Solving for e, Initial residual = 0.0210301, Final residual = 0.000716406, No Iterations 2 GAMG: Solving for p, Initial residual = 0.260595, Final residual = 0.011883, No Iterations 14 time step continuity errors : sum local = 0.00349148, global = 0.00136865, cumulative = 0.0674022 ExecutionTime = 22.95 s ClockTime = 23 s Time = 0.000256 smoothSolver: Solving for Ux, Initial residual = 0.0182673, Final residual = 0.00180064, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.0550647, Final residual = 0.00277076, No Iterations 2 smoothSolver: Solving for e, Initial residual = 0.0210038, Final residual = 0.000707412, No Iterations 2 #0 Foam::error:rintStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64linuxgnu/libc.so.6" #3 Foam::hePsiThermo<Foam:siThermo, Foam:ureMixture<Foam::sutherlandTransport<Foam:: species::thermo<Foam::hConstThermo<Foam:erfectGa s<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:? #4 Foam::hePsiThermo<Foam:siThermo, Foam:ureMixture<Foam::sutherlandTransport<Foam:: species::thermo<Foam::hConstThermo<Foam:erfectGa s<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:? #5 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam" #6 __libc_start_main in "/lib/x86_64linuxgnu/libc.so.6" #7 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam" Floating point exception For the sonicFoam: Time = 3.6e05 Courant Number mean: 0.018126 max: 1.85612 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 PIMPLE: iteration 1 smoothSolver: Solving for Ux, Initial residual = 0.0297792, Final residual = 1.78038e09, No Iterations 1000 smoothSolver: Solving for Uy, Initial residual = 0.189271, Final residual = 9.04104e08, No Iterations 1000 smoothSolver: Solving for e, Initial residual = 0.104757, Final residual = 7.51345e05, No Iterations 1000 smoothSolver: Solving for p, Initial residual = 0.0440183, Final residual = 1.27881e14, No Iterations 1000 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 6.62023e16, global = 3.55668e17, cumulative = 9.73302e16 PIMPLE: iteration 2 smoothSolver: Solving for Ux, Initial residual = 0.0113747, Final residual = 4.76704e10, No Iterations 1000 smoothSolver: Solving for Uy, Initial residual = 0.110579, Final residual = 9.35679e09, No Iterations 1000 smoothSolver: Solving for e, Initial residual = 0.0467253, Final residual = 2.49276e05, No Iterations 1000 smoothSolver: Solving for p, Initial residual = 0.0153356, Final residual = 1.15887e14, No Iterations 1000 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 time step continuity errors : sum local = 6.54113e16, global = 2.44197e17, cumulative = 9.97721e16 smoothSolver: Solving for epsilon, Initial residual = 0.0888693, Final residual = 0.00189198, No Iterations 1000 smoothSolver: Solving for k, Initial residual = 0.0665843, Final residual = 0.000930416, No Iterations 1000 ExecutionTime = 212.68 s ClockTime = 212 s Time = 4e05 Courant Number mean: 0.0200068 max: 3.56817 diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0 PIMPLE: iteration 1 smoothSolver: Solving for Ux, Initial residual = 0.0313989, Final residual = 1.00651e09, No Iterations 1000 smoothSolver: Solving for Uy, Initial residual = 0.233467, Final residual = 3.06705e08, No Iterations 1000 smoothSolver: Solving for e, Initial residual = 0.149963, Final residual = 2.32507e05, No Iterations 1000 #0 Foam::error:rintStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64linuxgnu/libc.so.6" #3 Foam::symGaussSeidelSmoother::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::symGaussSeidelSmoother::smooth(Foam::Field<d ouble>&, 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<double>::solveSegregated(Foam::dict ionary const&) at ??:? #7 Foam::fvMatrix<double>::solve(Foam::dictionary const&) in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/sonicFoam" #8 Foam::fvMatrix<double>::solve() in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/sonicFoam" #9 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/sonicFoam" #10 __libc_start_main in "/lib/x86_64linuxgnu/libc.so.6" #11 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/sonicFoam" Thank you in advance 

December 11, 2018, 04:06 
Courant Number

#5 
New Member
Allen George
Join Date: Dec 2013
Posts: 16
Rep Power: 11 
This happened because your maximum courant number value went above 1 which should be always kept below 1, preferrably below 0.5 . So you have to reduce the timestep ( deltaT ) in controlDict to bring down the courant number value and to get stable solutions.


December 16, 2018, 08:56 

#6 
Member
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 7 
Hi Allen,
Thanks for your reply. Even if I reduce the time step or make it adjustable, it is just delaying the blowing. In the original case, the author faced the same problem for the transient, so he was increasing the pressure on the outlet gradually and ran the case as steadystate. So, I am not following the transient run (sonicFoam) any more. For me, I am not able to get convergence for the steadyState (using rhoSimpleFoam) case. I think the problem in the BC, I just followed the original case which was produced using sonicTurboFoam. Any ideas? Regards, 

December 16, 2018, 10:48 

#7 
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 238
Rep Power: 15 
Marhaba Saleh,
I was facing such a problem as I used simpleFoam to simulate axial fan in the past and got a solution by adding a reference pressure to the inlet. Try to add it to the pressure in your case: Inlet { type fixedValue; value uniform 116800; refValue $internalField; } I am not sure that this suggestion could solve the problem, cause I dont use the solver u r using here, anyway try it and see if you could fix the problem by this suggestion. Reduce also a relexationFactor for rho field to look like this: fields { p 0.3; rho 0.01; } Give a feed back please, if it works. I could not test those suggestions on your case, cause there is no blockMesh to generate the mesh. Regards Peter 

December 16, 2018, 11:25 

#8 
Member
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 7 
Marhaba Peter,
Thanks for your kind reply. I tried adding the refValue, but that didn't change anything For reducing the relaxation factor, it is only accelerating the floating point error. #0 Foam::error:rintStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64linuxgnu/libc.so.6" #3 Foam::hePsiThermo<Foam:siThermo, Foam:ureMixture<Foam::sutherlandTransport<Foam:: species::thermo<Foam::hConstThermo<Foam:erfectGa s<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() at ??:? #4 Foam::hePsiThermo<Foam:siThermo, Foam:ureMixture<Foam::sutherlandTransport<Foam:: species::thermo<Foam::hConstThermo<Foam:erfectGa s<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() at ??:? #5 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam" #6 __libc_start_main in "/lib/x86_64linuxgnu/libc.so.6" #7 ? in "/opt/openfoam5/platforms/linux64GccDPInt32Opt/bin/rhoSimpleFoam" Grüße 

December 16, 2018, 11:28 

#9 
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 238
Rep Power: 15 
OK!
upload please the whole case so I could make some experiments. Or just add the blockMesh here... I generated an easy mesh myself and I got a solution without any problem. That why I am asking for a mesh. Regards Peter 

December 16, 2018, 12:16 

#10 
Member
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 7 
Hi Peter,
You may find the polyMesh folder in the below link. https://1drv.ms/f/s!Amq2JoBgpHbgk1yCmQwwDwnkPMM If you want to check the original case/results which I am trying to duplicate, you can find it in the thesis of Benjamin Wuethrich the transonic Diffuser case. Thank you in advance Saleh 

December 16, 2018, 13:01 

#11 
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 238
Rep Power: 15 
Moin!
I made some changes in the case and it seams to work. I will try to summery all the changes I made:  Adding a reference pressure to the inlet type fixedValue; value uniform 116800; refValue 1e5;  deltaT 1e04;  nNonOrthogonalCorrectors 1;  relaxationFactors { fields { p 0.1; rho 0.01; } equations { p 0.3; U 0.9; e 0.8; k 0.9; epsilon 0.9; } }  rhoMin 0.01; rhoMax 2; The last one is necessery cause the results shows that the maximum density is 1.5, anyway in your default setups the maximum density is limited by you to be 1.05. Those changes makes the simulation works. At least I did not get a divergence yet after 0.3 sec or more than 3000 iterations. Which change made the simulation works, I am not realy sure, cause I made all of them in one step... Regards Peter Last edited by peterhess; December 16, 2018 at 16:13. 

December 17, 2018, 02:42 

#12 
Member
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 7 
Hi Peter,
Thank you very much, I got a convergence finally (>20K iterations) Well, the results not similar to the benchmark one, may be I need to tighten more the residuals control. If you try the suggestions one at a time, no convergence will occur. I think it is a mix of relaxation factors and density bounding. I am sure the refValue doesn't have any effect. I tested it. Regards, 

December 17, 2018, 04:29 

#13 
Member
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 7 
Hi Peter,
Actually, I don't know if we can call this a convergence When I tighten the residuals, the solver blow out at around 35,000 iterations One more point, the continuity error keeps increasing This is the last iteration before the error: Time = 38167 smoothSolver: Solving for Ux, Initial residual = 0.000524352, Final residual = 7.86366e06, No Iterations 2 smoothSolver: Solving for Uy, Initial residual = 0.000465268, Final residual = 1.0039e05, No Iterations 2 smoothSolver: Solving for e, Initial residual = 0.000405433, Final residual = 5.78933e06, No Iterations 2 GAMG: Solving for p, Initial residual = 2.26562e05, Final residual = 3.37786e08, No Iterations 1 GAMG: Solving for p, Initial residual = 2.16707e05, Final residual = 2.67125e08, No Iterations 1 time step continuity errors : sum local = 810.117, global = 339.066, cumulative = 1.45143e+07 ExecutionTime = 3084.73 s ClockTime = 3107 s Regards, 

December 17, 2018, 08:58 

#14 
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 238
Rep Power: 15 
Hello Saleh!
Well, I did not run the simuilation for more than 3000 iterations. That why I cant see how the progress is going forwared... Anyway, The results in paraView für the 3000 iterations where actualy plausible and the reiduals where realy fine, as I uploaded im my last comment... I suggest to compare the results between 3000 and 30000 iterations using paraView! The 3000 iterations are realy somth and nice, that why I suggest to use it as a compare stage... If the results are the same or almost the same, then the results are acceptable... If not, then something is going wrong... That the residuals sometimes fluctuating so much is not nice but acceptable... Addetionaly, the Final residual are realy low... I would accept the results, if the 3000 and 30000 iterations results are identical... Regards Peter 

December 17, 2018, 10:08 

#15 
Member
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 7 
Hi Peter,
Actually there is difference between the results from 3000 to 30000 iterations and both don't match the reference/benchmark results. You may check the attached screenshots. What about the high continuity error? Regards, 

December 17, 2018, 10:22 

#16 
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 238
Rep Power: 15 
Hello Saleh,
The main question ist, are the results of 3000 and 30000 identical? If yes, we can say, that the solution is under its conditions acceptable, for itself After that I suggest trying to do the next step, comparing the setups of the original simulation with yours... As example, try to be sure that the pressure at the inlet and the outlet are realy statical as you defind them and not totalPressure as I gess... By the way, I would also put a question mark on the results of the original simulation. They are not Quran Regards Peter PS: I see they are not identical... I will run the simulation myself and have a look 

December 17, 2018, 10:37 

#17 
Member
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 7 
Hello Peter,
As you noted .. they don't match. All the pressure values are static and the case setup is identical, however those results have been produced using sonicTurboFoam, so may be I need not to follow the same setup . The results in the original case have been validated using experimental data and by using another CFD code, so I trust his result (more than mine at least ) Thank you again for your support 

December 17, 2018, 11:05 

#18  
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 238
Rep Power: 15 
Quote:
As I mentioned before, I did not use sonicTurboFoam in the past and I cant comment about it... All suggestions made above are for rhoSimpleFoam.  Three more notices...  The bottom wall is defined to be wall! Is that right or you mean symmetrical? If you want to simulate a nozzle and you are simulating the half, then it must be type symmetrical!   Re number? in your case: rho at the inlet = 1.5 (I gess) charasterestical length is the height of the tunnel (nozzle) X 2 (by defination in heat atlas) = 2 X 0.066 (supposing the bottom wall is wall) U = 150.6 Mu = 1.8 e5 Re = 1.5 X 2 X 0.066 X 150.6 / 1.8e5 Re = 33 e6 I would say the flow is turbulent (I gess) and you are simulating laminar! And one more time I am talking about rhoSimpleFoam here... Is the original simulation laminar or turbulent?  If you have experiment results, are the front and back, as you defined in the case realy empty or they should be walls? I still simulating. I will give a feed back later. Regards Peter 

December 17, 2018, 21:33 

#19 
Senior Member
Peter Hess
Join Date: Apr 2011
Location: Austria
Posts: 238
Rep Power: 15 
Hello Saleh!
I executed the simulation with rhoSimpleFoam applying the changes I suggested above and used OF6. I got stable residuals until about 14000 iterations, then the simulation became unstable, until it explode by 45000 iterations. The divergence happens very late cause the relaxationsFactor of the pressure has been reduced. The simulation became very conservative like that... Regards Peter 

December 18, 2018, 02:10 

#20  
Member
Saleh Abuhanieh
Join Date: Nov 2017
Posts: 82
Rep Power: 7 
Quote:
Hi Peter,  the case is not symmetrical, it is a convergent/divergent channel with a flat bottom  As I mentioned in my first post, the case is turbulent and transient, however, we run the case as steadyState and laminar with lower outlet pressure to initialize the transient case (I am here now). I didn't get convergence directly (without initialization from steadyState) neither the author of the original case.  The case is pure 2D, the third direction is empty You may check the case in section 4.2 (page 65/100) https://www.researchcollection.ethz.ch/bitstream/handle/20.500.11850/150401/eth3035701.pdf 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Floating point exception in tutorials case  xujr  OpenFOAM Running, Solving & CFD  0  May 21, 2015 03:31 
Floating point exception (core dumped) in transonicMRFDyMFoam  sam.ho  OpenFOAM Running, Solving & CFD  0  April 29, 2014 01:30 
interDyMFoam Floating point exception Error  marhamat  OpenFOAM Running, Solving & CFD  2  December 26, 2012 13:40 
[Gmsh] Gmsh and samplesurface  touf  OpenFOAM Meshing & Mesh Conversion  2  December 10, 2007 02:27 
Free surface boudary conditions with SOLAVOF  Fan  Main CFD Forum  10  September 9, 2006 12:24 