|
[Sponsors] |
December 13, 2014, 04:52 |
How to access previous time
|
#1 |
Member
Join Date: Nov 2009
Posts: 65
Rep Power: 16 |
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 |
|
December 16, 2014, 09:40 |
|
#2 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 19 |
This would also be interesting to me. My simulations are very dynamic and often become instable, which forces me to reduce the courant number temporarily to avoid unphysical results. Since these results are sometimes detectable (for example by extreme changes in min/max temperature), it would be nice if we could step back one time step, decrease the courant number and calculate again starting from the previous step.
|
|
December 16, 2014, 19:39 |
|
#3 |
Member
Join Date: Nov 2009
Posts: 65
Rep Power: 16 |
My objective is to calculate moment and force vectors dynamically from field values at the previous time step, within my original solidMeshMotionFunctions developing for using in such a pimpleDyMFoam solver.
In the pimpleDyMSolver(may also be in the other DyM solvers), after a time stepping, mesh.update() was called before new p and U were calculated. If the mesh motion was prescribed using omega(rad/s) defined in the dynamicMeshDict, there's no problem. But for my simulation, mesh motion (i.e., eulerAngles of mesh rotation) should be numerically defined by using the moment and forces those previous U and p. That's why I should access the previous time step values of the field values (NOT the previous output data!). Any comments and suggestions were highly appreciated ! Thanks in advance, waku2005 |
|
December 16, 2014, 20:06 |
|
#4 |
Member
Join Date: Nov 2009
Posts: 65
Rep Power: 16 |
Wmmm..., I'd like to know at first,
1) U.oldTime() is automatically stored ? 2) U.oldTime() is the U of the previous time step, not the previous outputted U in a time folder ? Sorry for my primitive questions. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
Multiple floating objects | CKH | OpenFOAM Running, Solving & CFD | 14 | February 20, 2019 10:08 |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 14:40 |
Star cd es-ice solver error | ernarasimman | STAR-CD | 2 | September 12, 2014 01:01 |
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 | bookie56 | OpenFOAM Installation | 8 | August 13, 2011 05:03 |