CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Bugs (http://www.cfd-online.com/Forums/openfoam-bugs/)
-   -   reactingFoam solution is strongly dependent on time step size (http://www.cfd-online.com/Forums/openfoam-bugs/90496-reactingfoam-solution-strongly-dependent-time-step-size.html)

andras July 12, 2011 08:12

reactingFoam solution is strongly dependent on time step size
 
Dear Foamers and CFD-hackers,

This is a (desperate) cross-post from the "Running+Solving" section.

I am using OpenFoam-1.7.1 (git: 03e7e056c215). I noticed that there is a tight dependence between "T gas max" and the CFL number in the reactingFoam tutorial case. Lower Courant-numbers lead to lower maximum temperatures and vice versa.

In "applications/solvers/combustion/reactingFoam/chemistry.H" the line

// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);

with an _absolute_ runTime.deltaT() clearly is an error, isn't it?

Also to test mesh dependence of the solution i tried this:

I refined the original mesh from the tutorial from 4000 -> 400000 cells (x10 in both directions) and ran the tutorial again. It crashes both in single and parallel at around 0.0007s. I also tried removing runTime.deltaT() from the kappa-equation in the source code, recompiled it, and ran it to the same effect. At some point epsilon becomes negative and the solver crashes.


Can this be considered a bug or is it just a defficiency in the underlying Chalmers PaSR model?


Cheers,
Andras

alberto July 13, 2011 02:45

According to http://www.openfoam.com/mantisbt/view.php?id=249 it seems not to be a bug, but it depends on the model. You might want to refer to the original literature to be safe.

andras July 13, 2011 07:50

Chalmers PaSR model
 
According to "F. P. Kärrholm: Numerical Modelling of Diesel Spray Injection, Turbulence Interaction and Combustion, Department of Applied Mechanics, Chalmers University of Technology, Göteborg, Sweden (2008)" the reaction rate multiplier kappa is defined by

kappa = tc / (tc + tmix)

where tc is the chemical time scale and tmix is the turbulence time scale, where

tmix = Cmix * k/epsilon

using Cmix=0.03.

The source code of reactingFoam introduces the absolute time step into the k-equation, and uses Cmix=0.1 (in the tutorial case):

---- OpenFOAM/OpenFOAM-1.7.1/applications/solvers/combustion/reactingFoam/chemistry.H ----
// Chalmers PaSR model
kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk);
----


Cheers,
Andras

alberto July 13, 2011 10:28

I guess the implementation is older. However, I would write this in you bug report ;-)


All times are GMT -4. The time now is 06:02.