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/)
-   -   Using foamLog (http://www.cfd-online.com/Forums/openfoam-solving/58872-using-foamlog.html)

liamm April 4, 2007 18:46

I started running a simulation
 
I started running a simulation using the foamJob command, with the correct solver, root and case, and a log file was created in the case folder. Now I am trying to run foamLog so that I can plot the residuals however every time I execute foamLog, with the correct root, case and log file, I get the message

foamLog: cannot read log log

where the first log is the name of the log file. does anyone have a solution to this problem?
Thanks in advance
Liam

msrinath80 April 4, 2007 19:24

Just type foamLog without any
 
Just type foamLog without any arguments and it will print out what it needs. You are probably missing the path to the log file.

liamm April 4, 2007 19:57

Thanks for the reply. my case
 
Thanks for the reply.
my case is called "flow", it is saved in my home folder "/home/liam" and the log file is called "log". I am executing

foamLog /home/liam flow log

do i need an extension on my log file like .txt or something like that?
Liam

msrinath80 April 4, 2007 21:31

Try foamLog /home/liam flow fl
 
Try foamLog /home/liam flow flow/log

liamm April 5, 2007 20:41

It's working now Thanks for
 
It's working now

Thanks for the help

Liam

onurdundar March 20, 2008 14:24

Hi everybody I have a probl
 
Hi everybody

I have a problem with foamLog. I think I miss some thing but i could'nt find it. I created file rasInterFoam.log in the backStepRSTML1 folder. I run the foamLog commad just in seen below.
It reads rasInterFoam.log file and creates a .awk file and executes it. But i does'nt writes any thing in the logs folder.
Thanks
Onur

[dundar@localhost rasInterFoam]$ foamLog . backStepRSTML1 backStepRSTML1/rasInterFoam.log
Using:
root : .
case : backStepRSTML1
log : backStepRSTML1/rasInterFoam.log
database : /home/dundar/OpenFOAM/OpenFOAM-1.4.1/bin/foamLog.db
awk file : ./backStepRSTML1/logs/foamLog.awk
files to : ./backStepRSTML1/logs

Executing: awk -f ./backStepRSTML1/logs/foamLog.awk backStepRSTML1/rasInterFoam.log

Generated XY files for:
[dundar@localhost rasInterFoam]$

gemaforce May 20, 2008 22:18

Hi everyone, I experienced
 
Hi everyone,

I experienced a problem with foamLog. I've been using liftDrag to print the lift and drag coefficients into the log file and I do see them printed there according to the time steps. But when I run foamLog, it extracts everything else but not the drag and lift coefficients. How do I get it to extract the relevant data?

Thanks
Samuel

gemaforce May 21, 2008 01:31

Ok, I realized that Srinath ha
 
Ok, I realized that Srinath has posted before how to get foamLog to extract the lift and drag coefficients in another thread. Thanks once again

blacy November 30, 2009 05:19

Hi guys

I have a similar problem with foamLog in OF 1.4. My simulation finished and no i want to plot residuals. Every time I try to execute foamLog nothing happens.

Here is what I tried:

[caelinux@localhost BLENDE]$ foamLog . home/caelinux/OpenFOAM/caelinux-1.4.1/run/BLENDE BLENDE BLENDE/simpleFoam
foamLog - extracts xy files from Foam logs.
Usage: foamLog [-n][-s] <root> <case> <log>
extracts xy files from log
foamLog -l <log>
lists but does not extract
foamLog -h
for a help message

Thanks
blacy

gschaider November 30, 2009 11:35

Quote:

Originally Posted by blacy (Post 238141)
Hi guys

I have a similar problem with foamLog in OF 1.4. My simulation finished and no i want to plot residuals. Every time I try to execute foamLog nothing happens.

Here is what I tried:

[caelinux@localhost BLENDE]$ foamLog . home/caelinux/OpenFOAM/caelinux-1.4.1/run/BLENDE BLENDE BLENDE/simpleFoam
foamLog - extracts xy files from Foam logs.
Usage: foamLog [-n][-s] <root> <case> <log>
extracts xy files from log
foamLog -l <log>
lists but does not extract
foamLog -h
for a help message

Thanks
blacy

I don't use foamLog (so I can only guess), but the fact that it asks for three arguments (root, case and log) while you only give it two is a strong hint (I think the error message is pretty clear) Bernhard

blacy December 1, 2009 10:27

Quote:

Originally Posted by gschaider (Post 238199)
I don't use foamLog (so I can only guess), but the fact that it asks for three arguments (root, case and log) while you only give it two is a strong hint (I think the error message is pretty clear) Bernhard

Hi

THX for reply. I thought that I gave it three arguments :confused:
root: home/caelinux/OpenFOAM/caelinux-1.4.1/run/BLENDE
case: BLENDE
log: BLENDE/simpleFoam

I`ll give pyfoam a try cause of some other interesting tools...

gschaider December 1, 2009 11:00

Quote:

Originally Posted by blacy (Post 238328)
Hi

THX for reply. I thought that I gave it three arguments :confused:
root: home/caelinux/OpenFOAM/caelinux-1.4.1/run/BLENDE
case: BLENDE
log: BLENDE/simpleFoam

Now I can't count. Sorry. No idea. One possibility would be to add in the if that checks the number of arguments ("$# -eq 3" I think) a "echo $#" so that the script tells you how many arguments it THINKS it got.

Quote:

Originally Posted by blacy (Post 238328)
I`ll give pyfoam a try cause of some other interesting tools...

Let me know if you experience any problems. PyFoam should be backward-compatible to 1.4.1 but I only did some basic tests

Bernhard

blacy December 1, 2009 12:20

I`ll try but it will take a few weeks. If there are any problems I let you know...

Rickard.Solsjo August 29, 2010 05:11

I have a problem with foamLog

Rickard.Solsjo August 29, 2010 05:12

I have a problem with foamLog.
I just enter the folder where my log is and type foamLog. Then there is an error

Executing: awk -f ./logs/foamLog.awk log
awk: ./logs/foamLog.awk:32: N-DODECANECnt=0
awk: ./logs/foamLog.awk:32: ^ syntax error
awk: ./logs/foamLog.awk:33: N-DODECANEFinalResCnt=0
awk: ./logs/foamLog.awk:33: ^ syntax error
awk: ./logs/foamLog.awk:34: N-DODECANEItersCnt=0
awk: ./logs/foamLog.awk:34: ^ syntax error

and my created logs folder just contains, foam.awk.
whats the problem?
Thx


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