CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Programming & Development (
-   -   Accessing field at time=0 (

Jakob1 January 9, 2014 06: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 06: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 07: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 20:17.