|
[Sponsors] |
foamListTimes: How to select latestTime or 0/ folder |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
January 27, 2021, 15:04 |
foamListTimes: How to select latestTime or 0/ folder
|
#1 |
Member
Petros Ampatzidis
Join Date: Oct 2018
Location: Bath, UK
Posts: 64
Rep Power: 8 |
Hi all,
I hope I am not posting a question that has been previously answered. Question How can I use foamListTimes to get the latest time directory regardless the presence of just the 0/ folder? More specifically, if a folder contains 0/, 1000/, 2000/ time directories I want to select the 2000/ while if a folder contains only the 0/ folder then I want it to return 0/ with no problem. Context When I use Code:
latestTime=$(foamListTimes -latestTime) However, when I intent to use the same piece of code for a probes folder then things are getting complicated as output for probes is written to a single time directory, and specifically the one that matches the startTime value. Of course the alternative: Code:
latestTime=$(foamListTimes -latestTime -withZero) Code:
postProcessing/probes/0\n2000 Any help will be much appreciated. Best, Petros |
|
January 28, 2021, 08:11 |
|
#2 |
Senior Member
Jan
Join Date: Jul 2009
Location: Hamburg
Posts: 144
Rep Power: 20 |
Code:
latestTime=$(foamListTimes -latestTime -withZero | tail -n 1) Best, Jan |
|
Tags |
foamlisttimes |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM.com] v1606+ Run Folder | JSMOKA | OpenFOAM Installation | 5 | December 18, 2016 20:47 |
polyMesh in /0 folder | PanPeter | OpenFOAM Running, Solving & CFD | 1 | August 11, 2016 08:00 |
[snappyHexMesh] SnappyHexMesh in parallel missing 0 folder | libindaniel2000 | OpenFOAM Meshing & Mesh Conversion | 0 | May 26, 2016 23:46 |
Cht tutorial in 15 | braennstroem | OpenFOAM Running, Solving & CFD | 197 | June 10, 2015 04:02 |
In CFX workbench, which surface, i have to select | senCFX | CFX | 19 | December 19, 2011 02:31 |