CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   feature or bug - deltaT issue (https://www.cfd-online.com/Forums/openfoam-solving/95872-feature-bug-deltat-issue.html)

wyldckat January 9, 2012 11:11

You can open another bug report with a feature request ;)

alberto January 9, 2012 17:11

You can re-open the bug report I think (scroll down the page).

wyldckat January 10, 2012 03:38

Quote:

Originally Posted by alberto (Post 338536)
You can re-open the bug report I think (scroll down the page).

Nope, only the original poster can re-open his/her own bug report. And I've reported before about this and... see for yourself: http://www.openfoam.com/mantisbt/view.php?id=228 :D

alberto January 10, 2012 08:51

Quote:

Originally Posted by wyldckat (Post 338584)
Nope, only the original poster can re-open his/her own bug report. And I've reported before about this and... see for yourself: http://www.openfoam.com/mantisbt/view.php?id=228 :D

Hmm. I add this as a reason to prefer bugzilla to mantis ;-)

wyldckat January 25, 2012 18:57

Hi Alberto and Daniel,

Quote:

Originally Posted by alberto (Post 338626)
Hmm. I add this as a reason to prefer bugzilla to mantis ;-)

I think mantis has an option for this... but I'm not 100% certain about this :(

By the way, to close the loop on this thread, a proper solution has been implemented for the issue that lead to the creation of this thread! Seen here: http://www.openfoam.com/mantisbt/view.php?id=382#c950 - the aforementioned commit is this one: https://github.com/OpenFOAM/OpenFOAM...e6cf8aa2c9bf39

Apparently the solution was a lot simpler than I first deduced... I thought there would be far more logical/cyclic issues with these variables, but I didn't look deep enough into an actual solution :rolleyes:

Best regards,
Bruno

lakeat January 25, 2012 19:19

It's good to see Henry's revision.

Code:

    if (timeDict.readIfPresent("deltaT", deltaT_))

    // Read and set the deltaT only if timestep adjustment is active

    // otherwise use the deltaT from the controlDict

    if (controlDict_.lookupOrDefault<Switch>("adjustTimeStep", false))

    {
        deltaTSave_ = deltaT_;
        deltaT0_ = deltaT_;

        if (timeDict.readIfPresent("deltaT", deltaT_))
        {
            deltaTSave_ = deltaT_;
            deltaT0_ = deltaT_;
        }
    }

To change deltaT, "Go to controlDict" is a user's most natural selection.

sdharmar November 1, 2012 02:19

What would be the reason for this
 
Hi Bruno, Daniel, Albreto and others,

I created tempPimpleFoam solver adding T field into basic pimpleFoam. And I tested it for pitzDaily tutorial case. But when I run the actual case it gave me the following error massage after running few iterations.

deltaT = 1.58835e-65
--> FOAM Warning :
From function Time::perator++()
in file db/Time/Time.C at line 1010
Increased the timePrecision from 145 to 146 to distinguish between timeNames at time 0.00166302
Time = 0.001663021666070488464861387711835050140507519245 147705078125



I could see that deltaT is keep on reducing and timePrecision value was adjusting in every timestep.

Sorry I can not attach the test case since the forum file size is very small.

Any idea would be appreciated.
Best regards,
Suranga.

Bdew8556 October 23, 2019 17:48

similar problem
 
Hey guys,

I'm getting super small time steps:
circa 1x10^-8 when I've set my deltaT to 0.001

Anyone know why its doing this?

Also does anyone have any best practice tips for getting a fireFoam simulation to run a bit faster? for example can you get by with a course mesh? any parameters in fvSchemes or fvSolution that you would recommend?

I'm aware LES solvers take a long time to solve but mine is taking a bit too long I think.

This is my fvSolution file:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
"(rho|rhoFinal)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-6;
relTol 0;
};

p_rgh
{
solver GAMG;
tolerance 1e-6;
relTol 0.1;
smoother GaussSeidel;
};

p_rghFinal
{
$p_rgh;
tolerance 1e-6;
relTol 0;
};

ph_rgh
{
$p_rgh;
}


"(U|Yi|k|h)"
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-6;
relTol 0.1;
nSweeps 1;
};

"(U|Yi|k|h)Final"
{
$U;
tolerance 1e-6;
relTol 0;
};

Ii
{
solver GAMG;
tolerance 1e-4;
relTol 0;
smoother symGaussSeidel;
maxIter 1;
nPostSweeps 1;
}

G
{
solver PCG;
preconditioner DIC;
tolerance 1e-04;
relTol 0;
}

}

PIMPLE
{

nNonOrthogonalCorrectors 2;
pRefPoint (1 0 0.25);
pRefValue 84437;


momentumPredictor yes;
nOuterCorrectors 1;
nCorrectors 2;
nNonOrthogonalCorrectors 0;

hydrostaticInitialization yes;
nHydrostaticCorrectors 5;
}

relaxationFactors
{
equations
{
"(U|k).*" 1;
"(CH4|O2|H2O|CO2|h).*" 1;
}
}

// ************************************************** *********************** //



Followed by fvSchemes:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default none;

div(phi,U) Gauss LUST grad(U);
div(phi,K) Gauss linear;
div(phi,k) Gauss limitedLinear 1;
div(phi,Yi_h) Gauss multivariateSelection
{
O2 limitedLinear01 1;
C12H24 limitedLinear01 1;
N2 limitedLinear01 1;
H2O limitedLinear01 1;
CO2 limitedLinear01 1;
h limitedLinear 1;
};
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
div(Ji,Ii_h) Gauss upwind;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}


// ************************************************** *********************** //

Michael@UW August 8, 2020 01:07

I have a similar question about time control when using overPimpleDyMFoam in OpenFOAM v2006. It's weird that I lose the data for the last few time steps when I try to write out data every 10 time steps.

I tried different combinations but none of them work.

Option 1:

Code:

deltaT                      0.00001028; // small time step to reduce CFL
writeControl            adjustableRunTime;
writeInterval            0.0001028;
  // every 10 time steps to save space
runTimeModifiable    yes; // changing to 'no' doe not work either
adjustTimeStep              no;
timePrecision          10; //time precision is enough


Option 2:

Code:

deltaT                      0.00001028;
writeControl            timeStep;
writeInterval            10;

runTimeModifiable    no;
adjustTimeStep              no;
timePrecision          10;

Option 2:

Code:

deltaT                      0.00001028;
writeControl        runTime;
writeInterval            0.0001028;
// = 10 time steps
runTimeModifiable    no;
adjustTimeStep              no;
timePrecision          10;


Here is the complete controlDcit for the first one:
Code:

application    overPimpleDyMFoam;


startFrom                latestTime;

deltaT          0.00001028;

startTime                0.0073502;

endTime                0.0147004;
//0.294008


writeControl    adjustableRunTime;
writeInterval  0.0001028;
//writeControl    timeStep;
//writeInterval  10;
//writeControl    runTime;
//writeInterval  0.0001028;

purgeWrite      0;

writeFormat    binary;

writePrecision  10;

writeCompression off;

timeFormat      general;

timePrecision  10;

runTimeModifiable yes;
adjustTimeStep        no;
maxCo 2.0;
maxDeltaT 0.0001028;

Here is the time directories (first column) generated. The second column is the time difference calcualted by hand (current - previous time step). It shows the deltaT is correct. But the last one is 0.0072988 which should be 0.0073502 as set in controlDict. That means the data for the last 5 time steps are not outputed. But when I the log file shows the solver goes through all the time steps including Time = 0.00733992.

Code:

time        time difference
0       
0.0001028        0.0001028
0.0002056        0.0001028
0.0003084        0.0001028
0.0004112        0.0001028
0.000514        0.0001028
0.0006168        0.0001028
0.0007196        0.0001028
0.0008224        0.0001028
0.0009252        0.0001028
0.001028        0.0001028
0.0011308        0.0001028
0.0012336        0.0001028
0.0013364        0.0001028
0.0014392        0.0001028
0.001542        0.0001028
0.0016448        0.0001028
0.0017476        0.0001028
0.0018504        0.0001028
0.0019532        0.0001028
0.002056        0.0001028
0.0021588        0.0001028
0.0022616        0.0001028
0.0023644        0.0001028
0.0024672        0.0001028
0.00257        0.0001028
0.0026728        0.0001028
0.0027756        0.0001028
0.0028784        0.0001028
0.0029812        0.0001028
0.003084        0.0001028
0.0031868        0.0001028
0.0032896        0.0001028
0.0033924        0.0001028
0.0034952        0.0001028
0.003598        0.0001028
0.0037008        0.0001028
0.0038036        0.0001028
0.0039064        0.0001028
0.0040092        0.0001028
0.004112        0.0001028
0.0042148        0.0001028
0.0043176        0.0001028
0.0044204        0.0001028
0.0045232        0.0001028
0.004626        0.0001028
0.0047288        0.0001028
0.0048316        0.0001028
0.0049344        0.0001028
0.0050372        0.0001028
0.00514        0.0001028
0.0052428        0.0001028
0.0053456        0.0001028
0.0054484        0.0001028
0.0055512        0.0001028
0.005654        0.0001028
0.0057568        0.0001028
0.0058596        0.0001028
0.0059624        0.0001028
0.0060652        0.0001028
0.006168        0.0001028
0.0062708        0.0001028
0.0063736        0.0001028
0.0064764        0.0001028
0.0065792        0.0001028
0.006682        0.0001028
0.0067848        0.0001028
0.0068876        0.0001028
0.0069904        0.0001028
0.0070932        0.0001028
0.007196        0.0001028
0.0072988        0.0001028 // last one dumped

By the way, the delataT in uniform/time shows consistent with that in controlDict.
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "0.0072988/uniform";
    object      time;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

value          0.00729879999999991612; // this value looks weired

name            "0.0072988";

index          710;

deltaT          1.028e-05; // same value as that in controlDict

deltaT0        1.028e-05; // same value ... but in scientific format

I hope Bruno, Alberto or some others can have a look at my problem. I have been stuck in this problem for a few days. I will add more information if needed.

Michael@UW August 8, 2020 01:34

After posting, I just found I changed the endTime during the run incorrectly which made the endTime not a multiple of writeInterval though it is a multiple of deltaT. That's why the data were not outputed.

Sorry about that!


All times are GMT -4. The time now is 03:25.