diff --git a/src/ODE/ODESolvers/ODESolver/ODESolver.C b/src/ODE/ODESolvers/ODESolver/ODESolver.C index 00db4bf3c4..f4dd3588eb 100644 --- a/src/ODE/ODESolvers/ODESolver/ODESolver.C +++ b/src/ODE/ODESolvers/ODESolver/ODESolver.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ Foam::ODESolver::ODESolver(const ODESystem& ode, const dictionary& dict) : n_(ode.nEqns()), absTol_(n_, dict.lookupOrDefault("absTol", SMALL)), - relTol_(n_, dict.lookupOrDefault("relTol", 1e-6)), + relTol_(n_, dict.lookupOrDefault("relTol", 1e-4)), maxSteps_(10000) {} diff --git a/src/ODE/ODESolvers/adaptiveSolver/adaptiveSolver.C b/src/ODE/ODESolvers/adaptiveSolver/adaptiveSolver.C index 34cc9c347b..13951ae7b3 100644 --- a/src/ODE/ODESolvers/adaptiveSolver/adaptiveSolver.C +++ b/src/ODE/ODESolvers/adaptiveSolver/adaptiveSolver.C @@ -86,7 +86,15 @@ void Foam::adaptiveSolver::solve y = yTemp_; // If the error is small increase the step-size - dxTry = min(max(safeScale_*pow(err, -alphaInc_), minScale_), maxScale_)*dx; + if (err > pow(maxScale_/safeScale_, -1.0/alphaInc_)) + { + dxTry = + min(max(safeScale_*pow(err, -alphaInc_), minScale_), maxScale_)*dx; + } + else + { + dxTry = safeScale_*maxScale_*dx; + } } diff --git a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties index 92c8953315..2c59e83d27 100644 --- a/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties +++ b/tutorials/combustion/LTSReactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties @@ -34,7 +34,8 @@ EulerImplicitCoeffs odeCoeffs { solver KRR4; - eps 0.05; + absTol 1e-12; + relTol 0.01; } // ************************************************************************* // diff --git a/tutorials/combustion/chemFoam/gri/constant/chemistryProperties b/tutorials/combustion/chemFoam/gri/constant/chemistryProperties index f4dc73c192..50c50759d3 100644 --- a/tutorials/combustion/chemFoam/gri/constant/chemistryProperties +++ b/tutorials/combustion/chemFoam/gri/constant/chemistryProperties @@ -34,7 +34,8 @@ EulerImplicitCoeffs odeCoeffs { solver SIBS; - eps 0.01; + absTol 1e-12; + relTol 1e-4; } diff --git a/tutorials/combustion/chemFoam/h2/constant/chemistryProperties b/tutorials/combustion/chemFoam/h2/constant/chemistryProperties index b08455efb4..2c0182864e 100644 --- a/tutorials/combustion/chemFoam/h2/constant/chemistryProperties +++ b/tutorials/combustion/chemFoam/h2/constant/chemistryProperties @@ -28,7 +28,8 @@ initialChemicalTimeStep 1e-10; odeCoeffs { solver SIBS; - eps 0.001; + absTol 1e-12; + relTol 1e-2; } diff --git a/tutorials/combustion/chemFoam/ic8h18/constant/chemistryProperties b/tutorials/combustion/chemFoam/ic8h18/constant/chemistryProperties index 0f13184b2f..7528b62231 100644 --- a/tutorials/combustion/chemFoam/ic8h18/constant/chemistryProperties +++ b/tutorials/combustion/chemFoam/ic8h18/constant/chemistryProperties @@ -28,7 +28,8 @@ initialChemicalTimeStep 1e-10; odeCoeffs { solver SIBS; - eps 1e-03; + absTol 1e-12; + relTol 1e-3; } diff --git a/tutorials/combustion/chemFoam/nc7h16/constant/chemistryProperties b/tutorials/combustion/chemFoam/nc7h16/constant/chemistryProperties index 50aebd8dce..d7e58ddc14 100644 --- a/tutorials/combustion/chemFoam/nc7h16/constant/chemistryProperties +++ b/tutorials/combustion/chemFoam/nc7h16/constant/chemistryProperties @@ -28,7 +28,8 @@ initialChemicalTimeStep 1e-10; odeCoeffs { solver SIBS; - eps 1e-04; + absTol 1e-14; + relTol 1e-4; } diff --git a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/panelRegion/chemistryProperties b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/panelRegion/chemistryProperties index 9f8ecdd196..5535bbdb93 100644 --- a/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/panelRegion/chemistryProperties +++ b/tutorials/combustion/fireFoam/les/oppositeBurningPanels/constant/panelRegion/chemistryProperties @@ -28,7 +28,8 @@ initialChemicalTimeStep 1e-07; odeCoeffs { solver SIBS; - eps 0.05; + absTol 1e-12; + relTol 0.01; } diff --git a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties index 79a1768caf..41e24d715b 100644 --- a/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties +++ b/tutorials/combustion/reactingFoam/ras/counterFlowFlame2D/constant/chemistryProperties @@ -34,7 +34,8 @@ EulerImplicitCoeffs odeCoeffs { solver KRR4; - eps 0.05; + absTol 1e-12; + relTol 0.01; } // ************************************************************************* //