|
[Sponsors] |
storing and using a volVectorField from last timestep and the timestep before |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 1, 2015, 22:10 |
storing and using a volVectorField from last timestep and the timestep before
|
#1 |
Member
Join Date: Jul 2012
Posts: 67
Rep Power: 13 |
Hi foamers,
I am wondering if I could store a volVectorField for two consecutive previous timesteps and call it at current timestep. I know that I can output such a field at every time step using IOobject, but this is not efficient especially when I need to run thousands of steps. Does anyone know if OpenFoam has the similar function of C_UDSI_M1 and C_UDSI_M2 in Fluent? How can I implement such a procedure. Thank you in advance, carlen |
|
April 2, 2015, 00:51 |
|
#2 |
Senior Member
|
Dear Carlen,
This is very interesting query Please consider my comment as a hint (it's my guess/way of solving). I may not be very specific. Try defining a counter which varies from 0 to 1. where 1 refers to previous iteration value and 0 refers to a value before previous iteration. Assign volVectorField variables for the respective counters. Access these variables inside your code. - Best Luck! Last edited by Tushar@cfd; April 2, 2015 at 02:12. |
|
April 2, 2015, 04:54 |
|
#3 |
Member
Join Date: Jul 2012
Posts: 67
Rep Power: 13 |
Thanks Tushar,
I manged to solve this problem by using e.g. U.oldTime() for the last timestep and U.oldTime().oldTime() for the timestep before last. kind regards, carlen |
|
April 3, 2015, 00:39 |
|
#4 | |
Senior Member
|
Quote:
Thanks for sharing these information of inbuilt OpenFOAM functions with all. - Best Regards! |
||
|
|