|
[Sponsors] |
June 28, 2021, 11:23 |
Access UMean at particular run time
|
#1 |
New Member
Abhishek Mukherjee
Join Date: Sep 2014
Posts: 6
Rep Power: 12 |
Hi, I am running an interfoam simulation in which I need to calculate UMean periodically. My required time period is 0.01s, within which Umean needs to be computed. Then in the next time period (0.01s interval), UMean will be calculated without considering UMean at the previous time period. I have achieved this with the following condition.
Code:
U { mean on; prime2Mean on; base time; } ); enabled true; log true; writeControl outputTime; restartOnRestart false; restartOnOutput false; periodicRestart true; restartPeriod 0.01; The only solution I can think of saving the data at 0.01s interval (which will be costly in my case) so that I can access UMean from the latest output data, though I am not sure how do I access UMean from last written data. Any help is appreciated! Last edited by absrocks; June 29, 2021 at 11:30. |
|
July 1, 2021, 21:06 |
|
#2 |
New Member
Abhishek Mukherjee
Join Date: Sep 2014
Posts: 6
Rep Power: 12 |
Hi any idea?
|
|
July 2, 2021, 10:36 |
|
#3 |
Member
Julian
Join Date: Sep 2019
Posts: 32
Rep Power: 7 |
I don't have a solution but some thoughts. You could create a custom field in your solver that writes the previous UMean field (e.g., UMean_old or similar) to disk and uses that for the UPrime calculation.
Perhaps there's a way to overwrite the purgeWrite option for this custom field so that the simulation only saves the most recent field and deletes the previous ones? |
|
July 7, 2021, 21:29 |
|
#4 |
New Member
Abhishek Mukherjee
Join Date: Sep 2014
Posts: 6
Rep Power: 12 |
Thanks, Julian for your suggestion, I finally managed to implement that in solver. I mainly looked at the fieldAverage.C and created two fields, one will store the old Umean and the other field will calculate the current Umean.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
bash script for pseudo-parallel usage of reconstructPar | kwardle | OpenFOAM Post-Processing | 42 | May 8, 2024 00:17 |
AMI speed performance | danny123 | OpenFOAM | 21 | October 24, 2020 05:13 |
High Courant Number @ icoFoam | Artex85 | OpenFOAM Running, Solving & CFD | 11 | February 16, 2017 14:40 |
How to write k and epsilon before the abnormal end | xiuying | OpenFOAM Running, Solving & CFD | 8 | August 27, 2013 16:33 |
calculation diverge after continue to run | zhajingjing | OpenFOAM | 0 | April 28, 2010 05:35 |