CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Writing additionnal output files during a run

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 23, 2007, 14:53
Default Hi everyone, I am running t
  #1
New Member
 
laurent glasson
Join Date: Mar 2009
Posts: 3
Rep Power: 17
laurentgla is on a distinguished road
Hi everyone,

I am running turbFOAM with a k-e turbulence model and wanted to see the evolutions of the Reynolds stresses during the calculation.
So I was looking for a way to write a R file for each step next to U, k, epsilon, etc... But I'm a bit lost and don't know where to start.
Where is the part of code stipulating which output has to be written down?

Thank you in advance

Laurent
laurentgla is offline   Reply With Quote

Old   May 23, 2007, 15:05
Default mkDir(runTime.path()/"xyz");
  #2
liu
Senior Member
 
Xiaofeng Liu
Join Date: Mar 2009
Location: State College, PA, USA
Posts: 118
Rep Power: 17
liu is on a distinguished road
mkDir(runTime.path()/"xyz");

OFstream logFile(runTime.path()/"xyz"/"myLog.dat");

logFile << bla bla bla << endl;
__________________
Xiaofeng Liu, Ph.D., P.E.,
Assistant Professor
Department of Civil and Environmental Engineering
Penn State University
223B Sackett Building
University Park, PA 16802


Web: http://water.engr.psu.edu/liu/
liu is offline   Reply With Quote

Old   May 23, 2007, 15:07
Default Reynolds stress never gets cal
  #3
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21
eugene is on a distinguished road
Reynolds stress never gets calculated, it there is no option to write it out.

The divergence or R does get calculated, but it is a temporary field and does not exist for most of the calculation.



If you want to write out R, you first have to create the R field in createFields after the turbulence model has been constructed:

volVectorField R
(
IOobject
(
"R",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
turbulence().R()()
);

Then you have to update it after each loop:
R = turbulence().R()();

calculate it using the turbulence().R()() function call.

It will write out automatically.
eugene is offline   Reply With Quote

Old   May 25, 2007, 11:35
Default thanks very much for your mess
  #4
New Member
 
laurent glasson
Join Date: Mar 2009
Posts: 3
Rep Power: 17
laurentgla is on a distinguished road
thanks very much for your messages. It now works after some minor tuning.
laurent
laurentgla is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing forces to text files christian OpenFOAM Running, Solving & CFD 1 March 20, 2011 00:20
Writing geometry files in STAR-CD Sachin Siemens 5 April 22, 2008 17:38
Error in browse additionnal output file student Siemens 2 August 9, 2006 06:18
Pb with writing the Case and Dat files Sam FLUENT 2 May 14, 2004 12:16
Writing grid and velocity data to files Mehul Kinariwala FLUENT 2 October 4, 2000 10:26


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