CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Just one teeny tiny question (http://www.cfd-online.com/Forums/openfoam-solving/59529-just-one-teeny-tiny-question.html)

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.path()/("gradP.dat")
);
gradP
<< runTime.timeName() << gradP.value() << "\n
<< endl;

Thanks in advance
Hadi

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
cheers


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