choose a specific time
My problem is: I want to choose a specific time in my post-processing code but I don't know how. I have seen a lot of loop with runtime where it chooses all the time-directories one after another but nothing about only the last time-directory for example.
You can find that code in postChannel:
// For each time step read all fields
Info<< "Collapsing fields for time " << runTime.timeName() << endl;
# include "readFields.H"
# include "calculateFields.H"
// Average fields over channel down to a line
# include "collapse.H"
But me I try to get (roughly) ----> //For last Time step read all field
I try several things but I'm not familiar with C++.
If someone could give me a hint, it will be great.
I have never done this myself, but just guessing: if you look at the 'postChannel' source (which you quote anyway), there is a reference to a 'timeSelector' class:
As I said, I haven't tested it, just a hint.
I'll give you feedback on this shortly.
I didn't succeed the way you suggested. However I have been able to do what I wanted. I wrote my latestTime's number in a dictionary and asked openFoam to read and use it.
|All times are GMT -4. The time now is 00:44.|