CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   XiFoam simulation error (

raysark March 11, 2013 15:50

XiFoam simulation error
Hi everyone,

I am trying to run a simulation in XiFoam with an object from snappyHexMesh.

After running blockMesh, snappyHexMesh -overwrite and XiFoam in time step 0.00158 I get this error.


#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/"
#1  Foam::sigFpe::sigHandler(int) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/"
#2  in "/lib/x86_64-linux-gnu/"
#3  Foam::sqrt(Foam::Field<double>&, Foam::UList<double> const&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/"
 at XiFoam.C:0
 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/XiFoam"
#6  __libc_start_main in "/lib/x86_64-linux-gnu/"
 in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/XiFoam"
Floating point exception(core dumped)

Paraview runs normally the simulation until 0.0015 where of course stops.
I suspect that somewhere XiFoam divides with 0 as it is a common problem with Floating Point error.

I would really appreciate any help that you could provide as this will help progress my dissertation.

The following link has the case file
Please take a look.

Thank you

wyldckat March 11, 2013 19:07

Hi Stratos,

That error message is indicating that a square root has gone very wrong ;)

But you could have posted what truly lead to this crash:

Courant Number mean: 0.016017 max: 8.74872
Time = 0.00158

diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
DILUPBiCG:  Solving for Ux, Initial residual = 0.0333502, Final residual = 0.00140485, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.0460333, Final residual = 0.00297582, No Iterations 2
DILUPBiCG:  Solving for Uz, Initial residual = 0.0450505, Final residual = 0.00291196, No Iterations 2
StCorr = 1
Max St-Courant Number = 0.0022791
Igniting cell 22118 state : 0.442633 1.31785 0.431142 9.95666
DILUPBiCG:  Solving for b, Initial residual = 0.00147667, Final residual = 7.13629e-08, No Iterations 1
min(b) = 0.441463
DILUPBiCG:  Solving for Xi, Initial residual = 0.00251158, Final residual = 3.12975e-05, No Iterations 1
max(Xi) = 1.51737
max(XiEq) = 5.24266
Combustion progress = 0.00442978%
DILUPBiCG:  Solving for hu, Initial residual = 0.115582, Final residual = 0.00124521, No Iterations 3
DILUPBiCG:  Solving for h, Initial residual = 0.118145, Final residual = 0.00128932, No Iterations 3
--> FOAM Warning :
    From function janafThermo<EquationOfState>::limit(const scalar T) const
    in file /home/user/OpenFOAM/OpenFOAM-2.1.x/src/thermophysicalModels/specie/lnInclude/janafThermoI.H at line 108
    attempt to use janafThermo<EquationOfState> out of temperature range 200 -> 5000;  T = 5.78718

The first warning sign is that the Courant number is really high:

Courant Number mean: 0.016017 max: 8.74872
After changing in "system/controlDict" the entry "adjustTimeStep" to "yes" instead of "no", it seemed to be more stable, at least when it comes to the Courant number...
:eek: although, around "Time=0.001523", it dropped "deltaT" to "9.26622e-12", making it rather impractical to simulate.

Oh, and the "sqrt" problem was due to the temperature being out of range and leading to one of the calculations after that to use bad values.

After taking a look at the geometry, I suggest the following:
  • Do a simpler mesh, using a parallelepiped shaped object, meshed solely with blockMesh. I say this because the mesh you've got is far from perfect, specially for combustion :(
  • So it would be best that you first sort out how to perform a good combustion simulation and only after that should you work on having a good mesh for your desired case.
  • Because if you still can't do a good combustion case with mesh created with only blockMesh, then upgrade to OpenFOAM 2.2.x, because it has got better combustion solvers (or at least it should), as well as a better meshing capabilities in snappyHexMesh.
Good luck! Best regards,

raysark March 11, 2013 19:28

Hi Bruno,

Thanks a lot for the comments.

I know the simulation wasn't good as I started working with XiFoam this Friday and this was a first trial but I wanted to see what was wrong.

Do you have any suggestions for mesh in combustion? Actually at the end I want simulate a transition from subsonic combustion to supersonic combustion (detonation).

Thanks again.

raysark March 13, 2013 14:32

Hey Bruno,

I changed the geometry a bit and the endTime of the simulation.

I left the mesh coarse as I want to run very quick simulations and I dont want to spend time waiting (I am not looking for results at this stage).

From paraView I can see the movement of the gas and the combustion which seems quite logical but after a certain time the temperature reaches weird numbers. I uploaded this case on the link above. Could you tell me what's the problem with the temperatures?

PS: Do you know anyone that could set up an accurate combustion with good mesh in case I need it? (with a payment of course for his time)

Thanks a lot

wyldckat March 18, 2013 18:02

Hi Stratos,

I'm really short for time. Only around the 28th will I be able to try and look into this :(.

As for someone to help you, right now I can only remember the freelancers forum:
Now that I think a bit more about it... you can also try contacting Tobi:

Best regards,

All times are GMT -4. The time now is 17:32.