CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   How to force function object writing only to a file? (https://www.cfd-online.com/Forums/openfoam-post-processing/237415-how-force-function-object-writing-only-file.html)

gaza July 16, 2021 09:19

How to force function object writing only to a file?
 
Hi
Is it possible to set a function object (e.g. wallHeatFlux) to be written as field into

time directories only at prescribed times and written to the file more frequently?
For instance, if I have in controlDict
Code:

application    rhoPimpleFoam;

startFrom      startTime;

startTime      0;

stopAt          endTime;

endTime        1;

deltaT          0.01;

writeControl    runTime;

writeInterval  0.1;

and in the wallHeatFlux function object
Code:

functions
{
HF
{
    type            wallHeatFlux;
    libs            ("libfieldFunctionObjects.so");
 
    patches    (movingWall); // (wall1 "(wall2|wall3)");
 
    writeToFile    true;

    executeControl  timeStep;
    executeInterval 1;
    writeControl    writeTime;
}
}

the HF will be written each 0.1 s to the time directories 0.1, 0.2, ....
But in the postProcessing directory the output will also be only written in these
times.



Is it possible to set HF to be written in time directories only at writeTime
and writing to the file in postProcessing directory more frequently?


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