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

writeInterval not working

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By akashpatel95

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 29, 2020, 09:38
Default writeInterval not working
  #1
New Member
 
Carlos
Join Date: Feb 2020
Location: Barcelona
Posts: 19
Rep Power: 6
cmoreno98 is on a distinguished road
Hello,

I'm new to OpenFOAM and I'm trying to run a microfluidics simulation. I have an issue inside controlDict file.
startTime is 0 s, endTime is 0.2 s and I want to write a folder every 0.0016 s (a total of 125 folders). That is, writeInterval = 0.0016.

The problem is that OF writes data every time step (deltaT = 0.000005 s), no matter what the value of writeInterval is.

The controlDict file is the following:

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

application     interFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.2;

deltaT          0.000005;

writeControl    clockTime;

writeInterval   0.0016;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable yes;

adjustTimeStep  no;

maxCo           2;
maxAlphaCo      1;

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



What is the problem? Thank you in advance,

Carlos.
cmoreno98 is offline   Reply With Quote

Old   March 1, 2020, 17:21
Default
  #2
New Member
 
Akash Patel
Join Date: Dec 2018
Location: Champaign, IL, USA
Posts: 20
Rep Power: 8
akashpatel95 is on a distinguished road
Quote:
Originally Posted by cmoreno98 View Post
Code:
writeControl    clockTime;

writeInterval   0.0016;

Try this,
Code:
writeControl    adjustableRunTime;
writeInterval   0.0016;
Yann, cmoreno98 and daylen like this.
__________________
We are developing an open-source software for constructing reduced order models for your CFD simulations in OpenFOAM that runs several magnitude faster. Visit the link below to learn more.
AccelerateCFD - OpenFOAM based reduced order model solver for CFD using Proper Orthogonal Decomposition.
akashpatel95 is offline   Reply With Quote

Old   March 1, 2020, 17:34
Default
  #3
New Member
 
Carlos
Join Date: Feb 2020
Location: Barcelona
Posts: 19
Rep Power: 6
cmoreno98 is on a distinguished road
Quote:
Originally Posted by akashpatel95 View Post
Try this,
Code:
writeControl    adjustableRunTime;
writeInterval   0.0016;
It works! You're great, thank you very much

Greetings from Spain
cmoreno98 is offline   Reply With Quote

Old   March 2, 2020, 04:55
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
In addition, for the readers who might bump into this thread, I suggest reading the user guide here : https://cfd.direct/openfoam/user-guide/v6-controldict/

Code:
4.3.2    Data writing

  writeControl Controls the timing of write output to file. 
  • timeStep: Writes data every writeInterval time steps.
  • runTime: Writes data every writeInterval seconds of simulated time.
  • adjustableRunTime: Writes data every writeInterval seconds of simulated time, adjusting the time steps to coincide with the writeInterval if necessary — used in cases with automatic time step adjustment.
  • cpuTime: Writes data every writeInterval seconds of CPU time.
  • clockTime: Writes data out every writeInterval seconds of real time.
writeInterval Scalar used in conjunction with writeControl described above.

Cheers,
Yann
Yann is offline   Reply With Quote

Reply

Tags
controldict, writecontrol, writeinterval


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
findCell() in parallel: not working if location is outside the domain TobiWol OpenFOAM 0 January 10, 2018 15:33
Processor 0 not working vishwesh OpenFOAM Running, Solving & CFD 0 November 17, 2017 04:35
IcoFoam with variable time step not writing every writeInterval wildfire230 OpenFOAM Running, Solving & CFD 1 July 31, 2013 18:49
DPM parallel is not working but serial is working johnwinter FLUENT 1 March 27, 2012 03:01
help: results depend on writeInterval ckoch OpenFOAM 2 September 1, 2010 19:42


All times are GMT -4. The time now is 16:10.