CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   keyword "SecondaryWriteControls" (https://www.cfd-online.com/Forums/openfoam-solving/180795-keyword-secondarywritecontrols.html)

Lorenzo92 November 30, 2016 09:25

keyword "SecondaryWriteControls"
 
Hello Foamers,

I'm trying to understand the effect of the keyword "SecondaryWriteControls" in controlDict. The same applies to "SecondaryWriteInterval" and "SecondaryPurgeWrite" Is there anyone who knows how writing and saving of fields is related to this keyword?


Thankss

alexeym November 30, 2016 10:53

Hello Lorenzo,

It depends on OpenFOAM version you utilise. In 4.x these keywords have lost their meaning (i.e. they were removed), guess, this functionality was generalised in functionObjects. In 2.4.x they have literal meaning: after checking primary write controls (i.e. writeControl, writeInterval, purgeWrite), library checks secondary (see OpenFOAM/db/Time/TimeIO.C).

Lorenzo92 December 1, 2016 02:50

Thank you for your answer Alexeym,

I' currently using OF 2.4.0 and such options still are available ( following your suggestion I checked TimeIO.C). I was wondering if it is possible to activate differente purgeWriting frequency between common fields(like U,p for instamce) and secondary fields generated by functionObjects such as fieldAverage (like pMean, pPrime2Mean, UMean und so on).

Is it possible according to your esperience/knowledge of OF?

alexeym December 1, 2016 03:38

Not sure if I got your question (and in fact I have no experience with secondary* settings), purge operation removes whole time folders and can not operate on individual fields.

If you want something like (let's say purgeWrite is 3 and you would like to keep UMean just for the second and third kept time, U and p fields just for the first two):

t1:
U p
t2:
U p UMean
t3:
UMean

you can try to use systemCall function object and do file manipulations using script (in the most comfortable language). Though it requires allowSystemOperations to be set to 1.

(Also you can try to modify post title to something like "[OpenFOAM][2.4.0] purgeWrite for individual fields", so people can avoid reading the whole thread to get to the essence of the question).

Lorenzo92 December 1, 2016 13:24

Yes, sorry Alexeym. The topic was indeed secondaryWriteControls, the last question was just a second parallel thought.
However thank you very much for the suggestion, I wasn't aware of the functionality of systemCall :)

If there is anyone who has already experienced the functionality of secondaryWriteControls I am all ears


All times are GMT -4. The time now is 21:15.