Write field data at a few specific timesteps
Hi All,
Is it possible to control the writing of the filed data happens at some specific timesteps which are not necessarily a multiple of "writingInterval"? Let's say I want the data to be written only at timesteps = 10, 17, 43 and 71. Right now I have to write data out every timestep in order to obtain field at these timesteps. How can I write data only at the mentioned timesteps? Cheers, Kasra. |
Hi Kasra,
have you found any answer to this question? Of course one could write a shell-script which reads the OpenFOAM output and changes the controlDict at the appropriate time, but that isn't very elegant. Best regards, Kate |
Hi Kate,
I used a quick hack to do it. It is not the best way to do it but it does the job: Code:
if Cheers, Kasra. |
Hi Kasra,
thanks for your response. This works only for a fixed timestep, right? Kate |
That's right. You can write the results at specific timesteps, you can add more timesteps using "or" (||) operator. However, the clean and robust way of doing it is defining an IOdictionary and list the required timesteps in there and use those instead of hard coding the timesteps right into the code.
|
Hi! Do you happen to know how to use the IO dictionary to make your simulation write out user-specified times?
|
All times are GMT -4. The time now is 12:32. |