CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

how to write a variable into a file along run-time?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 12, 2014, 07:49
Default how to write a variable into a file along run-time?
  #1
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 13
huangxianbei is on a distinguished road
Hi,foamers:

Recently I'm doing a calculation using channelFoam. In this solver, gradP is identified and write to the log file during run-time. But I want to use it's data to calculate the u_tau, does anyone knows how to make it written into a file like p or U? Or can I extract the data from the log file ?

The log file looks like the following
Code:
time step continuity errors : sum local = 4.49932e-10, global = -1.2018e-19, cumulative = 1.33261e-18
Uncorrected Ubar = 0.1335    pressure gradient = 6.14588e-05
ExecutionTime = 1.51 s  ClockTime = 2 s
The pressure gradient is what I want to extract.
huangxianbei is offline   Reply With Quote

Old   March 12, 2014, 08:36
Default
  #2
Senior Member
 
Huang Xianbei
Join Date: Sep 2013
Location: Yangzhou,China
Posts: 302
Rep Power: 13
huangxianbei is on a distinguished road
OK, the problem is solved through the 'grep' command. You can just use grep to search the log file and output the pressure gradient.
huangxianbei is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
wmake compiling new solver mksca OpenFOAM Programming & Development 14 June 22, 2018 06:29
centOS 5.6 : paraFoam not working yossi OpenFOAM Installation 2 October 9, 2013 01:41
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
[blockMesh] Axisymmetrical mesh Rasmus Gjesing (Gjesing) OpenFOAM Meshing & Mesh Conversion 10 April 2, 2007 14:00


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