0
Time control settings for a periodic bulk forcing

Hello everyone,
I want some help regarding controlDict settings.
I have a periodic bulk forcing for my model set at 50000 rad/s. So, I figured that the cycle is at 2e-5, therefore I need to time step and write data in order 1e-6 or lower.
Now, I am able to run it with these settings, but only when the endTime is 0.01 or greater. This takes a lot of my hard disk space (~175GB).
I just want to run it so that I capture data for a few cycles, like for startTime 0 to endTime 0.001 , but if I am setting endTime less than 0.01, the solver does not do anything.
I am solving for laminar flow using pimpleFoam.

Please suggest methods to fix this.

Following is my current controlDict file:

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

application pimpleFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 0.01;

deltaT 5e-7;

writeControl adjustableRunTime;

writeInterval 5e-6;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 7;

runTimeModifiable yes;

adjustTimeStep yes;

//maxCo 5;

maxDeltaT 9e-7;

functions
{
include "wallShearStress";
}


OpenFOAM 20-05-21, 6:22 p.m. Samridh
0

Hi,

The reason why redcuing the endTime doesn't start your simulation could be that the time files from the previous run (endTime 0.01) are already present in your case directory. And since you have selected startFrom as latestTime, the solver sees that the latestTime already present in your directory is greated than the specified endTime and doesn't solve it.

You could try changing your startFrom to startTime or you could remove all the previous run files using the command foamListTimes -rm and run the simulation again with the new endTime. Either way, try to create a copy of your previous run, so that you still have that data as a backup.

Please let us know if that worked. If not we could take a look at the case files to fix them.

Regards,
Ashley

20-05-21, 6:40 p.m. ashleymelvin

Thanks for your reply Ashley,
Before my every run I actually use foamCleanTutorials in my case file to clean it up, and as you suggested, after fixing startTime I used foamListTimes -rm to clear previous run files.
The problem has not yet solved, I changed endTime to 1e-3, then on running the case I get following:

/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 8-1c9b5879390b
Exec   : mypimpleFoam
Date   : May 21 2021
Time   : 22:33:11
Host   : "samridh-GL63-8RC"
PID    : 73091
I/O    : uncollated
Case   : /home/samridh/OpenFOAM/samridh-8/run/smr4_amb
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time
Create mesh for time = 0

PIMPLE: Convergence criteria found
        p: tolerance 1e-06
        U: tolerance 1e-06

PIMPLE: Operating solver in transient mode with 1 outer corrector
PIMPLE: Operating solver in PISO mode

Reading field p
Reading field U
Reading/calculating face flux field phi
Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
No MRF models present
No finite volume options present
Courant Number mean: 0 max: 0
Starting time loop
End

But when I change endTime to 0.1 then the solver was working after starting time loop.

/*---------------------------------------------------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  8
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
Build  : 8-1c9b5879390b
Exec   : mypimpleFoam
Date   : May 21 2021
Time   : 22:34:57
Host   : "samridh-GL63-8RC"
PID    : 82016
I/O    : uncollated
Case   : /home/samridh/OpenFOAM/samridh-8/run/smr4_amb
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PIMPLE: Convergence criteria found
        p: tolerance 1e-06
        U: tolerance 1e-06


PIMPLE: Operating solver in transient mode with 1 outer corrector
PIMPLE: Operating solver in PISO mode


Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
No MRF models present

No finite volume options present
Courant Number mean: 0 max: 0

Starting time loop

Courant Number mean: 0 max: 0
deltaT = 8.33333e-07
Time = 8.33333e-07

DILUPBiCGStab:  Solving for Ux, Initial residual = 0, Final residual = 0, No Iterations 0
DILUPBiCGStab:  Solving for Uy, Initial residual = 1, Final residual = 8.68907e-06, No Iterations 5
DILUPBiCGStab:  Solving for Uz, Initial residual = 0, Final residual = 0, No Iterations 0
GAMG:  Solving for p, Initial residual = 0.999999, Final residual = 0.00881613, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0316546, Final residual = 0.000147678, No Iterations 4
time step continuity errors : sum local = 1.34875e-10, global = 4.15045e-13, cumulative = 4.15045e-13
GAMG:  Solving for p, Initial residual = 0.0800336, Final residual = 0.000503752, No Iterations 3
GAMG:  Solving for p, Initial residual = 0.00270202, Final residual = 3.5654e-08, No Iterations 22
time step continuity errors : sum local = 3.51488e-14, global = -1.42908e-15, cumulative = 4.13616e-13
ExecutionTime = 1.41 s  ClockTime = 1 s

Courant Number mean: 1.46746e-07 max: 1.49566e-06
deltaT = 8.33333e-07
Time = 1.66667e-06

DILUPBiCGStab:  Solving for Ux, Initial residual = 0.34226, Final residual = 6.30088e-06, No Iterations 5
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.735843, Final residual = 7.03418e-06, No Iterations 5
DILUPBiCGStab:  Solving for Uz, Initial residual = 0.461507, Final residual = 8.4511e-06, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.360947, Final residual = 0.0030817, No Iterations 4
GAMG:  Solving for p, Initial residual = 0.0167637, Final residual = 7.75396e-05, No Iterations 4
time step continuity errors : sum local = 1.56596e-10, global = -9.29582e-14, cumulative = 3.20658e-13
GAMG:  Solving for p, Initial residual = 0.0454496, Final residual = 0.000262178, No Iterations 3
GAMG:  Solving for p, Initial residual = 0.0014425, Final residual = 9.94576e-08, No Iterations 20
time step continuity errors : sum local = 2.10779e-13, global = 1.85612e-15, cumulative = 3.22514e-13
ExecutionTime = 2.28 s  ClockTime = 2 s

Courant Number mean: 2.22305e-07 max: 3.34115e-06
deltaT = 8.33333e-07
Time = 2.5e-06

DILUPBiCGStab:  Solving for Ux, Initial residual = 0.245746, Final residual = 3.67497e-06, No Iterations 5
DILUPBiCGStab:  Solving for Uy, Initial residual = 0.64668, Final residual = 6.04482e-06, No Iterations 5
DILUPBiCGStab:  Solving for Uz, Initial residual = 0.378219, Final residual = 6.84117e-06, No Iterations 4

 


21-05-21, 10:45 p.m. Samridh

Could you share the entire case files with us? You could share via any cloud drives (google drive preferrably).

Regards,
Ashley


23-05-21, 5:23 p.m. ashleymelvin

Hey Ashley,
Sorry for this delayed response, I actually figured that "writeControl adjustableRunTime;" had to be changed to timeStep and set writeInterval on basis of my total runTime.
Following controlDict settings work!
 

application     pimpleFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.0003;

deltaT          5e-7;

writeControl    timeStep;

writeInterval   1;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

//adjustTimeStep  yes;

//maxCo           5;

maxDeltaT    9e-7;

functions
{
    include "wallShearStress";
}


08-06-21, 8:07 p.m. Samridh

Login to add comment


0
These time control settings for a periodic bulk forcing are perfect, and I like the information here. I am working for the best resume writing service, and I hope that I can get more information about this soon.
16-09-21, 11:32 p.m. ZaynSalvador


Log-in to answer to this question.