|
[Sponsors] |
April 18, 2008, 07:16 |
Hi, I just want to know if the
|
#1 |
New Member
Samuel Pang
Join Date: Mar 2009
Posts: 15
Rep Power: 17 |
Hi, I just want to know if there's a way of capturing the log data into spreadsheets like Open Office. I would like to take the information printed on the log file and chart it out you see.
Thanks! Samuel |
|
April 18, 2008, 07:56 |
Hi Samuel!
You'll have to e
|
#2 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Hi Samuel!
You'll have to extract the info into CSV-files (or something similar). This is for instance done by the foamLog-Skript described in section 7.6 of the UserGuide or (beware: advertising) by some of the pyFoam-Utilities Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
April 20, 2008, 20:42 |
Thank you so much Bernhard!I u
|
#3 |
New Member
Samuel Pang
Join Date: Mar 2009
Posts: 15
Rep Power: 17 |
Thank you so much Bernhard!I understand how to do it now!
|
|
April 20, 2008, 21:27 |
Sorry, but I may sound really
|
#4 |
New Member
Samuel Pang
Join Date: Mar 2009
Posts: 15
Rep Power: 17 |
Sorry, but I may sound really stupid at this point in time..
I tried following the UserGuide section 7.6, but I encountered a problem. I can't seem to execute the foamLog script within OpenFOAM. It says on the UserGuide that I have to type in foamLog <root> <case> <logfile>, but I'm not sure which logFile I'm referring to because I can't find the subdirectory called logs anywhere in OpenFOAM-1.4.1. Please guide me along. Thank you, Samuel |
|
April 21, 2008, 01:47 |
Hello,
A log file is create
|
#5 |
Member
vof_user
Join Date: Mar 2009
Posts: 67
Rep Power: 17 |
Hello,
A log file is created in the case directory when you execute: foamJob <solver> <root> <case> Then you need to execute: foamLog <root> <case> <logfile> |
|
April 21, 2008, 01:55 |
Oh ok! I get it now! I thought
|
#6 |
New Member
Samuel Pang
Join Date: Mar 2009
Posts: 15
Rep Power: 17 |
Oh ok! I get it now! I thought the logFile was there all along and when I tried to execute it, I thought the system hung right there! Thank you!
|
|
April 21, 2008, 01:56 |
Hello,
I get the following
|
#7 |
Member
vof_user
Join Date: Mar 2009
Posts: 67
Rep Power: 17 |
Hello,
I get the following log for each time step: Courant Number mean: 0.0201787 max: 0.264922 deltaT = 0.00473396 Time = 0.0263302 MULES: Solving for gamma Liquid phase volume fraction = 0.130194 Min(gamma) = -7.81823e-47 Max(gamma) = 1 MULES: Solving for gamma Liquid phase volume fraction = 0.130194 Min(gamma) = -7.444e-47 Max(gamma) = 1 DICPCG: Solving for pd, Initial residual = 0.0305024, Final residual = 0.000290093, No Iterations 1 DICPCG: Solving for pd, Initial residual = 0.000299968, Final residual = 1.33247e-05, No Iterations 10 DICPCG: Solving for pd, Initial residual = 2.02136e-05, Final residual = 9.3558e-08, No Iterations 36 time step continuity errors : sum local = 5.60007e-07, global = 4.57038e-08, cumulative = 1.23805e-07 Mass of Fluid 1 = 0.646099 kg ExecutionTime = 0.53 s ClockTime = 1 s I wish to extract the information for "Liquid phase volume fraction = 0.130194" for each time step from the log file. I tried to use the foamLog script, but this information is particularly missing in the subdirectory log. Kindly help me. Regards, A A Saha. |
|
April 21, 2008, 02:32 |
Hi Saha, and good morning to e
|
#8 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,900
Rep Power: 37 |
Hi Saha, and good morning to everyone
If your log file is called runLog, I would do the following from the command line: grep -A3 -E "^Time" runLog | grep -v "MULES" Then you at least have the data written to screen / can redirect it to a file. If you need the data to be plotted using some script, you probably want the data in a tab-separated file, this could be done like this: grep -A3 -E "^Time" runLog | grep -v "MULES" | sed -e 's/\//'| awk 'BEGIN {RS="T"} {print $3,$9}' > myLiquidFraction The part sed -e 's/\//' might be omitted, but I got some weird formating, which I removed by that command. Have fun - Niels
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
April 22, 2008, 12:37 |
Alternately locate the file kn
|
#9 |
Senior Member
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21 |
Alternately locate the file known as foamLog.db and add an entry for 'Liquid phase...whatever' in it. Now, foamLog can extract that info for you!
|
|
April 22, 2008, 14:37 |
Hello Srinath,
Thanks for y
|
#10 |
Member
vof_user
Join Date: Mar 2009
Posts: 67
Rep Power: 17 |
Hello Srinath,
Thanks for your post. I added the entry in the foamLog.db and the Liquid phase is now available in foamLog. Thanks, A A Saha |
|
April 22, 2008, 14:51 |
Hello Niels,
Thanks for you
|
#11 |
Member
vof_user
Join Date: Mar 2009
Posts: 67
Rep Power: 17 |
Hello Niels,
Thanks for your post. The command line option works great and serves exactly what I was looking for. I got the following error: sed: -e expression #1, char 5: unterminated `s' command Omitting sed -e 's/\//' it workes fine. Thanks again. Regards, A A Saha |
|
|
|