CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Just one teeny tiny question (

hadi August 2, 2007 07:24

Hi to all, I added this file
Hi to all,
I added this file in channelOodles to save the variation of gradP through time, but after each iteration the value of gradP replace the preceding one, so i only get the latest value.
How can i write in this file all the values without removing the preceding one's for each iteration?

# include "OFstream.H"
OFstream gradP
<< runTime.timeName() << gradP.value() << "\n
<< endl;

Thanks in advance

hadi August 2, 2007 07:52

Sorry guys, I just noticed
Sorry guys,

I just noticed that i should open the file before the time Loop.

Thanks anyways

All times are GMT -4. The time now is 22:12.