|
[Sponsors] |
January 4, 2011, 20:10 |
choose a specific time
|
#1 |
New Member
David Thériault
Join Date: Nov 2010
Posts: 8
Rep Power: 15 |
Hi All
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 forAll(timeDirs, timeI) { runTime.setTime(timeDirs[timeI], timeI); 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. Thx David Last edited by dav1dt; January 4, 2011 at 22:03. |
|
January 7, 2011, 10:46 |
|
#2 | ||
Member
Robertas N.
Join Date: Mar 2009
Location: Kaunas, Lithuania
Posts: 53
Rep Power: 17 |
Quote:
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: Code:
instantList timeDirs = timeSelector::select0(runTime, args); Quote:
Code:
argList::validOptions.insert("latestTime", ""); As I said, I haven't tested it, just a hint. |
|||
January 10, 2011, 11:19 |
|
#3 |
New Member
David Thériault
Join Date: Nov 2010
Posts: 8
Rep Power: 15 |
Thank you
I'll give you feedback on this shortly. |
|
January 20, 2011, 15:20 |
|
#4 |
New Member
David Thériault
Join Date: Nov 2010
Posts: 8
Rep Power: 15 |
Hi
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. david |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure time history at specific points on a surface during unsteady simulation | drrbradford | Fidelity CFD | 0 | July 15, 2010 10:13 |
PostChannel | maka | OpenFOAM Post-Processing | 5 | July 22, 2009 09:15 |
Problems with simulating TurbFOAM | barath.ezhilan | OpenFOAM | 13 | July 16, 2009 05:55 |
Differences between serial and parallel runs | carsten | OpenFOAM Bugs | 11 | September 12, 2008 11:16 |
Could anybody help me see this error and give help | liugx212 | OpenFOAM Running, Solving & CFD | 3 | January 4, 2006 18:07 |