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

Limit amount of output

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

Like Tree2Likes
  • 2 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 26, 2011, 08:07
Default Limit amount of output
  #1
New Member
 
Arve
Join Date: Sep 2011
Location: Norway
Posts: 8
Rep Power: 15
Taltan is on a distinguished road
I am running a compressible LES simulation and I want to only save the p and U fields for each time step. Currently it saves all variables which quickly eats up my allocated storage.

Is this possible to do without changing the source code?

I tried the "printCoeffs" variable and seeing no effect at all.
Taltan is offline   Reply With Quote

Old   January 29, 2015, 09:47
Default
  #2
Member
 
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17
blaise is on a distinguished road
Hello Taltan,

did you solve that problem? I am looking for a solution to that myself.

Best regards,

Pascal.
blaise is offline   Reply With Quote

Old   January 29, 2015, 10:00
Default
  #3
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,

There is partialWrite functionObject (see $FOAM_SRC/postProcessing/functionObjects/IO/partialWrite for more details).

In controlDict you can set writeInterval to something quite large, while in partialWrite you choose necessary fields and set writeInterval to 1.
alexeym is offline   Reply With Quote

Old   January 29, 2015, 10:18
Default
  #4
Member
 
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17
blaise is on a distinguished road
Hello alexeym,

that was a quick answer with the right keyword!
So you mean something like that in the controlDict functions section:

partialWrite
{
type partialWrite;
functionObjectLibs ("libIOFunctionObjects.so");
outputControl outputTime;
objectNames (U p k);
outputInterval 1; // (timeStep, outputTime)

//writeInterval 10.5; //(adjustableTime, runTime, clockTime, cpuTime)
}

That will give me ONLY U, p, k fields as output in every timestep? What will the last line do? The output timing is already set in the upper part of the controlDict!

Cheers,

Pascal.
blaise is offline   Reply With Quote

Old   January 29, 2015, 10:27
Default
  #5
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,

Quote:
Originally Posted by blaise View Post
That will give me ONLY U, p, k fields as output in every timestep?
It is supposed to

Quote:
What will the last line do? The output timing is already set in the upper part of the controlDict!
You set outputInterval (integer value) if your outputControl is either timeStep, or outputTime. Otherwise you set writeInterval (real value).
alexeym is offline   Reply With Quote

Old   January 29, 2015, 11:03
Default
  #6
Member
 
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17
blaise is on a distinguished road
Hello alexeym,

that does not seem to work, as I still get the full amount of fields written.
I use OF 2.3.x. Here is my controlDict:

libs
(
"libOpenFOAM.so"
"libincompressibleTurbulenceModel.so"
"libincompressibleRASModels.so"
"libLEMOS-2.3.x.so"
);
application pisoFoam;
startFrom startTime;
startTime 25.0;
stopAt endTime;
endTime 26;
deltaT 0.0001;
maxDeltaT 0.01;
adjustTimeStep off; // on;
maxCo 0.7;
writeControl timeStep;
writeInterval 1;
purgeWrite 0;
writeFormat ascii;
writePrecision 12;
writeCompression uncompressed;
timeFormat general;
timePrecision 12;
runTimeModifiable false;

functions
{
#include "readFields"
partialWrite
{
type partialWrite;
functionObjectLibs ("libIOFunctionObjects.so");
outputControl outputTime;
objectNames (U p k);
outputInterval 1; // (timeStep, outputTime)

writeInterval 1; //(adjustableTime, runTime, clockTime, cpuTime)
}
}

When I comment out writeInterval (as I understand it from your answer, because outputInterval is set to an integer), I get an error because of the missing writeInterval setting. And writeInterval has to be an integer, concluding from the error message if I set it to 1.5.
What am I misunderstanding here?

Thank you,

Pascal.

Edit:
Even when I set writeInterval in controlDict to 10000, I still get the full set of files written each timestep.
???
blaise is offline   Reply With Quote

Old   January 29, 2015, 11:39
Default
  #7
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,

My bad It was just a guess. Was not able to make partialWrite work also. But writeRegisteredObject does the job quite nice:

Code:
    wro
    {
        type            writeRegisteredObject;

        // Where to load it from
        functionObjectLibs ("libIOFunctionObjects.so");

        // Execute upon options:
        //  timeStep
        //  outputTime
        //  adjustableTime
        //  runTime
        //  clockTime
        //  cpuTime
        outputControl   timeStep;

        // Objects (fields or lagrangian fields in any of the clouds)
        // to write every outputTime
        objectNames    (p);

        exclusiveWriting     false;

        // Interval of time (sec) to write down(
        writeInterval   1; //(adjustableTime, runTime, clockTime, cpuTime)
    }
This saves p every time step. And this time I've checked it
blaise and acgnipper like this.
alexeym is offline   Reply With Quote

Old   January 30, 2015, 02:29
Default
  #8
Member
 
P.A.
Join Date: Mar 2009
Location: Germany
Posts: 83
Rep Power: 17
blaise is on a distinguished road
Hello alexeym,

that's it! Works perfectly!

Thank you VERY much!

Best regards,

Pascal.
blaise 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
Questions about data output aki_yafuji OpenFOAM Running, Solving & CFD 3 September 9, 2010 01:59
lift and drag on ship superstructures vaina74 OpenFOAM Running, Solving & CFD 3 June 8, 2010 12:30
[Other] Output Format of MetaMesh t42 OpenFOAM Meshing & Mesh Conversion 0 August 3, 2007 04:28
can "output control " output Nu in expression? prayskyer CFX 3 July 7, 2006 19:37
Help with DPM UDF for OUTPUT needed Zhengcai Ye FLUENT 0 January 5, 2004 16:58


All times are GMT -4. The time now is 20:59.