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

How to access previous time

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 13, 2014, 03:52
Default How to access previous time
  #1
Member
 
Join Date: Nov 2009
Posts: 65
Rep Power: 16
waku2005 is on a distinguished road
Dear All,

I'd like to know how to declare the previous time and access the previous time folder including 0 within my original library.
I know the current time and the current/previous time step can be obtained as follows, but don't for the previous time step "tp".

----------------------------------------------
const Time& time;

// current Time and timeStep
scalar t = time.value();
scalar dt = time.deltaTValue();

// old Time
scalar tp = ?????
scalar dtp = time.deltaT0Value();

// time step number (i.e., time index)
Info << "Time Step Index: " << time.timeIndex() << endl;
---------------------------------------------

Please let me know any way to the "tp"

Sincerely,
waku2005
waku2005 is offline   Reply With Quote

 


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
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
Multiple floating objects CKH OpenFOAM Running, Solving & CFD 14 February 20, 2019 09:08
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 13:40
Star cd es-ice solver error ernarasimman STAR-CD 2 September 12, 2014 00:01
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 04:03


All times are GMT -4. The time now is 22:57.