CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Accessing field at time=0 (https://www.cfd-online.com/Forums/openfoam-programming-development/128331-accessing-field-time-0-a.html)

Jakob1 January 9, 2014 05:33

Accessing field at time=0
 
Hey I am looking for a function that reads the field T at time=0. So far I am just keeping an extra field T0 that doesn't change throughout the run but that seems unelegant. Surely there must be a better option. Thanks!

Bernhard January 9, 2014 05:49

If you need the field continuously, it is better to read it from memory than from disk, in my opinion. But you can easily change the IOobject to read for t=0.

Jakob1 January 9, 2014 06:10

Yes I need it at every timestep to calculate the sensible heat. So you mean blocking some memory is still faster than reading it at every step? Guess that makes sense since the memory is never used to capacity unlike the CPU. Thanks!


All times are GMT -4. The time now is 01:05.