CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

time step directories naming issue

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 5, 2014, 10:30
Default time step directories naming issue
  #1
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 17
Andrea_85 is on a distinguished road
Hi all,

i need to write all the time step of my simulation. I am running with a fixed time step of 5e-5 and i have to simulate 0.2s. This is my controlDict


Code:
application     interFoam;

startFrom    startTime;

startTime    10.4;

stopAt          endTime;

endTime         10.6;

deltaT          0.00005;

writeControl    adjustableRunTime;

writeInterval   0.00005;

purgeWrite    0;

writeFormat     ascii;

writePrecision  9;

writeCompression uncompressed;

timeFormat    general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  no;

maxCo           0.5;
maxAlphaCo    0.5;

maxDeltaT    0.00005;

libs ("libOpenFOAM.so" "libtwoPhaseInterfaceProperties.so");
I am facing a problem with the time directory naming. The time directory names look like this:

10.4
10.4001
10.4001000000000001
10.40015
10.4001999999999999
10.4002499999999998
10.4002999999999997
10.4003499999999995
10.4003999999999994


while they should be like this

10.4
10.40005
10.4001
10.40015
10.4002 etc...

This is quite annoying because then i need to read data with matlab and i have to manually change name of each directory. Below there's also the log file. There are some warning messages about increasing time precision.

Code:
Starting time loop

Courant Number mean: 0.00148614073 max: 0.303144605
Interface Courant Number mean: 5.38948102e-05 max: 0.303144605
Time = 10.4001

--> FOAM Warning :
    From function Time::operator++()
    in file db/Time/Time.C at line 982
    Increased the timePrecision from 6 to 7 to distinguish between timeNames at time 10.4000167
MULES: Solving for alpha1
Liquid phase volume fraction = 0.164643782  Min(alpha1) = -5.55381607e-46  Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0.164644025  Min(alpha1) = -3.37485691e-45  Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0.164644269  Min(alpha1) = -4.76080439e-45  Max(alpha1) = 1
Grade of smoothing = 2
Writing smoothalpha to smoothalpha in 10.4001
GAMG:  Solving for p_rgh, Initial residual = 0.00543959373, Final residual = 6.23882747e-08, No Iterations 9
time step continuity errors : sum local = 2.38346752e-11, global = -1.60602192e-12, cumulative = 6.94564916e-13
GAMG:  Solving for p_rgh, Initial residual = 0.000201843987, Final residual = 4.01651211e-08, No Iterations 9
time step continuity errors : sum local = 1.53588127e-11, global = 1.07222161e-12, cumulative = 1.76678653e-12
GAMG:  Solving for p_rgh, Initial residual = 3.00238209e-05, Final residual = 9.56358153e-08, No Iterations 5
time step continuity errors : sum local = 3.65660978e-11, global = 7.24334616e-13, cumulative = 2.49112115e-12
ExecutionTime = 24.34 s  ClockTime = 26 s

Courant Number mean: 0.0014855605 max: 0.302896685
Interface Courant Number mean: 5.33625861e-05 max: 0.302896685
--> FOAM Warning :
    From function Time::operator++()
    in file db/Time/Time.C at line 982
    Increased the timePrecision from 7 to 18 to distinguish between timeNames at time 10.4001
Time = 10.4001000000000001

MULES: Solving for alpha1
Liquid phase volume fraction = 0.164644513  Min(alpha1) = -2.97775766e-46  Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0.164644756  Min(alpha1) = -9.91081624e-46  Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0.164645  Min(alpha1) = -1.25277352e-45  Max(alpha1) = 1
Grade of smoothing = 2
Writing smoothalpha to smoothalpha in 10.4001000000000001
GAMG:  Solving for p_rgh, Initial residual = 0.00249554859, Final residual = 5.71703818e-08, No Iterations 9
time step continuity errors : sum local = 2.18635862e-11, global = 2.63315627e-12, cumulative = 5.12427741e-12
GAMG:  Solving for p_rgh, Initial residual = 7.90524647e-05, Final residual = 8.58188344e-08, No Iterations 6
time step continuity errors : sum local = 3.28120032e-11, global = -1.57658811e-13, cumulative = 4.9666186e-12
GAMG:  Solving for p_rgh, Initial residual = 1.25003466e-05, Final residual = 8.61067505e-08, No Iterations 4
time step continuity errors : sum local = 3.29224682e-11, global = -2.04224721e-13, cumulative = 4.76239388e-12
ExecutionTime = 41.58 s  ClockTime = 43 s

Courant Number mean: 0.00148533135 max: 0.300659555
Interface Courant Number mean: 5.31966294e-05 max: 0.300659555
Time = 10.40015

MULES: Solving for alpha1
Liquid phase volume fraction = 0.164645244  Min(alpha1) = -7.17538037e-45  Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0.164645487  Min(alpha1) = -6.77163286e-47  Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0.164645731  Min(alpha1) = -9.93804815e-46  Max(alpha1) = 1
Grade of smoothing = 2
Writing smoothalpha to smoothalpha in 10.40015
GAMG:  Solving for p_rgh, Initial residual = 0.00184160353, Final residual = 7.29332095e-08, No Iterations 9
time step continuity errors : sum local = 2.78910717e-11, global = 1.10182416e-12, cumulative = 5.86421804e-12
GAMG:  Solving for p_rgh, Initial residual = 5.55810316e-05, Final residual = 4.73679855e-08, No Iterations 7
time step continuity errors : sum local = 1.81135596e-11, global = -7.20435115e-13, cumulative = 5.14378292e-12
GAMG:  Solving for p_rgh, Initial residual = 1.08571513e-05, Final residual = 9.63068815e-08, No Iterations 4
time step continuity errors : sum local = 3.68292096e-11, global = -4.63255022e-13, cumulative = 4.6805279e-12
ExecutionTime = 64.94 s  ClockTime = 68 s

Courant Number mean: 0.00148529064 max: 0.300990496
Interface Courant Number mean: 5.31640257e-05 max: 0.300990496
Time = 10.4001999999999999

MULES: Solving for alpha1
Liquid phase volume fraction = 0.164645974  Min(alpha1) = -3.85869166e-46  Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0.164646218  Min(alpha1) = -6.8588981e-47  Max(alpha1) = 1
MULES: Solving for alpha1
Liquid phase volume fraction = 0.164646462  Min(alpha1) = -9.93805413e-46  Max(alpha1) = 1
Grade of smoothing = 2
Writing smoothalpha to smoothalpha in 10.4001999999999999
GAMG:  Solving for p_rgh, Initial residual = 0.00166888183, Final residual = 3.77611789e-08, No Iterations 8
time step continuity errors : sum local = 1.44420185e-11, global = -2.41979023e-13, cumulative = 4.43854888e-12
GAMG:  Solving for p_rgh, Initial residual = 4.23143833e-05, Final residual = 9.16112292e-08, No Iterations 6
time step continuity errors : sum local = 3.50366967e-11, global = -6.472814e-13, cumulative = 3.79126748e-12
GAMG:  Solving for p_rgh, Initial residual = 8.42928722e-06, Final residual = 8.26065114e-08, No Iterations 4
time step continuity errors : sum local = 3.1593808e-11, global = -4.16446564e-13, cumulative = 3.37482091e-12
ExecutionTime = 82.45 s  ClockTime = 86 s

Courant Number mean: 0.00148528797 max: 0.300591493
Interface Courant Number mean: 5.31360064e-05 max: 0.300591493
Time = 10.4002499999999998
Is there something wrong in my controlDict?

Best
Andrea
Andrea_85 is offline   Reply With Quote

Old   April 3, 2014, 07:08
Default
  #2
New Member
 
Howard NJOKU
Join Date: Nov 2010
Location: Nsukka, Nigeria
Posts: 9
Rep Power: 16
Oke'e is on a distinguished road
Hi Andrea,

I am having exactly the same problem as you are. If you have succeeded with solving it, could you share solution with me?

Howard
Oke'e is offline   Reply With Quote

Old   April 3, 2014, 08:51
Default
  #3
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 17
Andrea_85 is on a distinguished road
Hi,

if i remember correctly i've just changed the initial time from 10.4 to 0 (and also renamed the corresponding folder)....don't ask why it didn't work with 10.4

best,
andrea
Andrea_85 is offline   Reply With Quote

Old   April 3, 2014, 09:38
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

I guess the problem is in

Code:
timePrecision   6;
I've tried to reproduce the error, and it's really there with 'timePrecision 6'. While with 'timePrecision 12' everything is OK.

If you look at src/OpenFOAM/db/Time/Time.C

Code:
Foam::word Foam::Time::timeName(const scalar t)
{
    std::ostringstream buf;
    buf.setf(ios_base::fmtflags(format_), ios_base::floatfield);
    buf.precision(precision_);
    buf << t;
    return buf.str();
}
your 10.40015 doesn't fit into precision 6 (see http://www.cplusplus.com/reference/i...ase/precision/ for more details), so you've got all these strange folder names.
KateEisenhower likes this.
alexeym is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 05:13
Extrusion with OpenFoam problem No. Iterations 0 Lord Kelvin OpenFOAM Running, Solving & CFD 8 March 28, 2016 12:08
AMI interDyMFoam for mixer nu problem danny123 OpenFOAM Programming & Development 8 September 6, 2013 03:34
mixerVesselAMI2D's mass is not balancing sharonyue OpenFOAM Running, Solving & CFD 6 June 10, 2013 10:34
plot over time fferroni OpenFOAM Post-Processing 7 June 8, 2012 08:56


All times are GMT -4. The time now is 14:43.