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/)
-   -   why adjustableRunTime doesn't work in sonicFoam? (https://www.cfd-online.com/Forums/openfoam-solving/113066-why-adjustableruntime-doesnt-work-sonicfoam.html)

immortality February 11, 2013 15:05

why adjustableRunTime doesn't work in sonicFoam?
 
my controlDict is as below:
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application    rhoPimpleFoam;

startFrom      latestTime;

startTime      0;

stopAt          endTime;

endTime        .02;//0.020708089

deltaT          5.6e-9;

writeControl    adjustableRunTime;

writeInterval  .000001;

purgeWrite      0;

writeFormat    binary;

writePrecision  10;

writeCompression on;

timeFormat      general;

timePrecision  6;

runTimeModifiable true;

adjustTimeStep  yes;

maxCo          0.1;

maxDeltaT      .0001;

libs ( "libOpenFOAM.so" "libgroovyBC.so" ) ;

but courant goes high as 20...50 and only decrease when i lessen deltaT or maxdeltaT.does not this solver support this feature to control CFL number?how can i modify it to involve it?

chegdan February 11, 2013 16:22

sonicFoam does not have this currently implemented. To add this, try looking at

http://www.cfd-online.com/Forums/ope...nt-number.html

or, you could look at the transient solvers that have the ability to adjust time-step size based on courant number. For inspiration, look at interFoam, rhoPimpleFoam, or bubbleFoam. You are looking at the lines

Code:

   
.
.
.
        #include "setInitialDeltaT.H"
.
.
.

        #include "setDeltaT.H"
.
.
.

and their placement before or within the time-loop after the Courant number is determined for the flow. Look in the directory

Code:

$FOAM_SRC/finiteVolume/cfdTools/general/include
for the source of these files. Good luck.

Tushar@cfd March 15, 2013 01:19

Hello,
 
Regarding the solvers..

Why do we need both together "setinitialDeltaT.H" & "setDeltaT.H" ?

Please correct me if I am wrong.

Thanks in advance.


All times are GMT -4. The time now is 00:05.