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

Periodically ignore removal by purgeWrite

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

Like Tree1Likes
  • 1 Post By Bernhard

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 4, 2012, 08:41
Default Periodically ignore removal by purgeWrite
  #1
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
Suppose I have the following settings in my controlDict

Code:
writeControl    adjustableRunTime;
writeInterval   0.02;
purgeWrite      3;
Suppose I am at t=5.67, then I will have the time-steps 5.62, 5.64 and 5.66 stored. When time goes beyond 5.68, the output from t=5.62 will get removed. This is expected purgeWrite behavior.

What I want to do now, is using the purgeWrite option, but keeping some more timesteps (or not removing them). Suppose I had a flag
Code:
keepEach  1.0
The expected behavior in the above example, is that I have the following timesteps stored:
1, 2, 3, 4, 5, 5.62, 5.64, 5.66

Any suggestions on how to do this? Is there such a flag, or should I put it as a feature request on the bugtracker?

Last edited by Bernhard; October 4, 2012 at 08:42. Reason: typos
Bernhard is offline   Reply With Quote

Old   October 8, 2012, 04:40
Default
  #2
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
The purgeWrite code is defined in:/src/OpenFOAM/db/Time/TimeIO.C (318-326)
Code:
        if (writeOK && purgeWrite_)
        {
            previousOutputTimes_.push(timeName());

            while (previousOutputTimes_.size() > purgeWrite_)
            {
                rmDir(objectRegistry::path(previousOutputTimes_.pop()));
            }
        }
This obviously confirms that there is no such flag by default.

With adding a dictionary input and an if-statement in the while loop, this can easily be implemented, I suppose.

Is it possible to compile this into a library, and put it as a library in the controlDict, allowing to add the required flag? My impression is that the answer would be no, because I need to recompile the solver at least. Any hints on library linking is welcome here.
Bernhard is offline   Reply With Quote

Old   October 10, 2012, 03:14
Default
  #3
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 21
Bernhard is on a distinguished road
I tried compiling some libmyOpenFOAM and without new changes, I compiled it with myIcoFoam. Now I get a conflict between libOpenFOAM and libmyOpenFOAM.
Quote:
*** glibc detected *** myIcoFoam: double free or corruption (!prev): 0x000000000072fee0 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x75558)[0x7f299f250558]
/lib64/libc.so.6(cfree+0x6c)[0x7f299f2554fc]
/me/OpenFOAM/me-2.1.0/platforms/linux64GccDPOpt/lib/libmyOpenFOAM.so(_ZN4Foam10dictionaryD2Ev+0x86)[0x7f29a00e6366]
/lib64/libc.so.6(__cxa_finalize+0xa5)[0x7f299f210b95]
/opt/apps/openfoam-2.1.0/OpenFOAM-2.1.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so(+0x161c16)[0x7f299e7f2c16]
======= Memory map: ========
Which occurs at the end of the run after completing.

I tried to compile myIcoFoam manually, by stripping the references to lOpenFOAM and src/OpenFOAM/lnInclude, but, without any success until now. Any hints to not use libOpenFOAM.so using wmake?
hua1015 likes this.
Bernhard is offline   Reply With Quote

Old   August 19, 2022, 09:19
Default
  #4
New Member
 
Arun Pandey
Join Date: Aug 2022
Posts: 1
Rep Power: 0
arunPandey is on a distinguished road
I am trying to do this using secondaryWriteControl but have not succeeded yet. Have you got any solution?
arunPandey 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
Is it possible to ignore conduction in a fluid zone? bawfuls FLUENT 3 August 11, 2011 21:50
layer removal only- OpenFOAM-1.5-dev phsieh2005 OpenFOAM Running, Solving & CFD 0 July 2, 2010 05:57
How to use the engine solvers with layer addition and removal francesco OpenFOAM Running, Solving & CFD 2 March 19, 2009 03:29
cell removal john Siemens 0 November 9, 2005 04:35
Mass removal and injection...Please help! Kevin Till Siemens 27 July 25, 2005 13:09


All times are GMT -4. The time now is 03:55.