
[Sponsors] 
January 29, 2014, 17:46 
how to use foamLog?

#1 
New Member
Mehdi Famouri
Join Date: Jan 2011
Posts: 12
Rep Power: 7 
Hey guys, I'm a rookie and trying to figure out how to use foamLog.
1 Is these two lines all I'm supposed to do? for "cavity" as an example famouri@ubuntu:~/cavity$ foamJob icoFoam famouri@ubuntu:~/cavity$ foamLog log 2 Is there any way to have all those data in one file? Like a file with more than two columns. 3 How can I add something not listed there as default? Thank you in Advance Mehdi 

February 5, 2016, 05:59 

#2 
New Member
Lennart
Join Date: Feb 2016
Posts: 21
Rep Power: 2 
I'd be interested in this as well.


February 5, 2016, 10:56 

#3 
Senior Member
Join Date: Jun 2012
Posts: 103
Rep Power: 6 
1) Basically, yes.
Here is a bit more information: http://web.student.chalmers.se/group...ngLucchini.pdf 2) To my knowledge, no. You need to read each file separately. 3) Doesn't foamLog already take basically all information of the log file? What kind of information do you want? I think you would need to work in the code of the utility to change things. 

March 29, 2016, 05:08 
deltaT from foamLog

#4  
New Member
Malthe Eisum
Join Date: Nov 2015
Location: Copenhagen, Denmark
Posts: 5
Rep Power: 3 
Quote:
Below is an example of a log file (pimpleFoam, slightly modified) Code:
Courant Number mean: 0 max: 0 velocity magnitude: 0 deltaT = 0.00107403 Time = 0.00107403 dU0dt = dU0dt [0 1 2 0 0 0 0] (3.51258e06 0 0) DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 2.89979e10, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0 GAMG: Solving for p, Initial residual = 2.91879e09, Final residual = 2.91879e09, No Iterations 0 time step continuity errors : sum local = 1.47332e28, global = 4.77833e29, cumulative = 4.77833e29 GAMG: Solving for p, Initial residual = 3.51043e09, Final residual = 3.51043e09, No Iterations 0 time step continuity errors : sum local = 1.77196e28, global = 7.76479e29, cumulative = 1.25431e28 dU0dt = dU0dt [0 1 2 0 0 0 0] (3.51258e06 0 0) DILUPBiCG: Solving for Ux, Initial residual = 2.87496e09, Final residual = 2.87496e09, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 4.41294e11, Final residual = 4.41294e11, No Iterations 0 GAMG: Solving for p, Initial residual = 3.116e09, Final residual = 3.116e09, No Iterations 0 time step continuity errors : sum local = 1.57287e28, global = 5.77382e29, cumulative = 1.83169e28 GAMG: Solving for p, Initial residual = 3.54987e09, Final residual = 3.54987e09, No Iterations 0 time step continuity errors : sum local = 1.79187e28, global = 6.37111e29, cumulative = 2.46881e28 ExecutionTime = 0.05 s ClockTime = 0 s Courant Number mean: 1.56175e29 max: 8.27559e12 velocity magnitude: 4.59998e10 deltaT = 0.0012803 Time = 0.00235434 dU0dt = dU0dt [0 1 2 0 0 0 0] (3.52066e06 0 0) DILUPBiCG: Solving for Ux, Initial residual = 0.999568, Final residual = 3.42989e10, No Iterations 1 DILUPBiCG: Solving for Uy, Initial residual = 4.96118e11, Final residual = 4.96118e11, No Iterations 0 GAMG: Solving for p, Initial residual = 3.97586e08, Final residual = 3.97586e08, No Iterations 0 time step continuity errors : sum local = 2.39233e27, global = 2.16449e27, cumulative = 2.41137e27 GAMG: Solving for p, Initial residual = 3.47099e08, Final residual = 3.47099e08, No Iterations 0 time step continuity errors : sum local = 2.08854e27, global = 1.8607e27, cumulative = 4.27207e27 dU0dt = dU0dt [0 1 2 0 0 0 0] (3.52066e06 0 0) DILUPBiCG: Solving for Ux, Initial residual = 1.58338e09, Final residual = 1.58338e09, No Iterations 0 DILUPBiCG: Solving for Uy, Initial residual = 9.32757e11, Final residual = 9.32757e11, No Iterations 0 GAMG: Solving for p, Initial residual = 3.28166e08, Final residual = 3.28166e08, No Iterations 0 time step continuity errors : sum local = 1.97462e27, global = 1.74678e27, cumulative = 6.01885e27 GAMG: Solving for p, Initial residual = 2.58746e08, Final residual = 2.58746e08, No Iterations 0 time step continuity errors : sum local = 1.55691e27, global = 1.17718e27, cumulative = 7.19603e27 ExecutionTime = 0.05 s ClockTime = 0 s Code:
formLog
Is there a way I can get foamLog to output deltaT ? it is listed the same way as Time. Writing this post I realised I can use the xy file of Time and still get the initial time step. But post any way out of professional curiosity and I know how to modify the solver to log a line of text with a value and can see the combination of this and formLog as a good combination in future use
__________________
Malthe Eisum Master student Technical University of Denmark 

April 7, 2016, 17:46 

#5 
Member
Join Date: Sep 2013
Posts: 88
Rep Power: 5 
One thing to consider is that a new residuals function object was introduced in 2.4.0 to make this simpler.
You can add this to your controlDict. Should look something like this. Code:
functions { residuals { functionObjectLibs ("libutilityFunctionObjects.so"); type residuals; outputControl timeStep; outputInterval 1; fields ( U p ); } } More importantly you should learn about typical linux commands like sed awk cat and grep to make your life easier. Quick example: grep searches for a pattern and outputs the line containing it. This outputs every line with "delta T =" in it. You can add > myFile to output this command to a file. Code:
grep 'deltaT = ' log Code:
getSolvedVars() { fgrep ' Solving for ' $1  fgrep ','  sed e 's/.* Solving for \([^,]*\)[,:].*/\1/'  sort u } The  is a pipeline command. It gives the result of the first to the second query.... I think the fastest way to learn on how to extract only the value of deltaT or something more fancy is googling how to do it with grep, awk or sed since it is possible with all three of them. 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
foamLog problem  Rickard.Solsjo  OpenFOAM PostProcessing  11  November 19, 2014 21:57 
foamLog  fferroni  OpenFOAM PostProcessing  8  May 21, 2012 17:05 
foamLog not solving for Ux, Uy, Uz  aerospain  OpenFOAM PostProcessing  5  April 18, 2012 10:01 
Using foamLog  liamm  OpenFOAM Running, Solving & CFD  14  August 29, 2010 05:12 
FoamLog for my case  liugx212  OpenFOAM Running, Solving & CFD  9  June 18, 2008 13:12 