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

Using foamLog

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 4, 2007, 19:46
Default I started running a simulation
  #1
liamm
Guest
 
Posts: n/a
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
  Reply With Quote

Old   April 4, 2007, 20:24
Default Just type foamLog without any
  #2
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Just type foamLog without any arguments and it will print out what it needs. You are probably missing the path to the log file.
msrinath80 is offline   Reply With Quote

Old   April 4, 2007, 20:57
Default Thanks for the reply. my case
  #3
liamm
Guest
 
Posts: n/a
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
  Reply With Quote

Old   April 4, 2007, 22:31
Default Try foamLog /home/liam flow fl
  #4
Senior Member
 
Srinath Madhavan (a.k.a pUl|)
Join Date: Mar 2009
Location: Edmonton, AB, Canada
Posts: 703
Rep Power: 21
msrinath80 is on a distinguished road
Try foamLog /home/liam flow flow/log
msrinath80 is offline   Reply With Quote

Old   April 5, 2007, 21:41
Default It's working now Thanks for
  #5
liamm
Guest
 
Posts: n/a
It's working now

Thanks for the help

Liam
  Reply With Quote

Old   March 20, 2008, 14:24
Default Hi everybody I have a probl
  #6
New Member
 
Onur Dundar
Join Date: Mar 2009
Location: Davis, CA, US
Posts: 7
Rep Power: 17
onurdundar is on a distinguished road
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]$
onurdundar is offline   Reply With Quote

Old   May 20, 2008, 23:18
Default Hi everyone, I experienced
  #7
New Member
 
Samuel Pang
Join Date: Mar 2009
Posts: 15
Rep Power: 17
gemaforce is on a distinguished road
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 is offline   Reply With Quote

Old   May 21, 2008, 02:31
Default Ok, I realized that Srinath ha
  #8
New Member
 
Samuel Pang
Join Date: Mar 2009
Posts: 15
Rep Power: 17
gemaforce is on a distinguished road
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
gemaforce is offline   Reply With Quote

Old   November 30, 2009, 05:19
Default
  #9
New Member
 
Michael Schwarz
Join Date: Nov 2009
Posts: 5
Rep Power: 16
blacy is on a distinguished road
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
blacy is offline   Reply With Quote

Old   November 30, 2009, 11:35
Default
  #10
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by blacy View Post
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
gschaider is offline   Reply With Quote

Old   December 1, 2009, 10:27
Default
  #11
New Member
 
Michael Schwarz
Join Date: Nov 2009
Posts: 5
Rep Power: 16
blacy is on a distinguished road
Quote:
Originally Posted by gschaider View Post
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
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...
blacy is offline   Reply With Quote

Old   December 1, 2009, 11:00
Default
  #12
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by blacy View Post
Hi

THX for reply. I thought that I gave it three arguments
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 View Post
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
gschaider is offline   Reply With Quote

Old   December 1, 2009, 12:20
Default
  #13
New Member
 
Michael Schwarz
Join Date: Nov 2009
Posts: 5
Rep Power: 16
blacy is on a distinguished road
I`ll try but it will take a few weeks. If there are any problems I let you know...
blacy is offline   Reply With Quote

Old   August 29, 2010, 06:11
Default
  #14
Senior Member
 
Rickard
Join Date: May 2010
Location: Lund, Skåne, Sweden
Posts: 143
Rep Power: 16
Rickard.Solsjo is on a distinguished road
I have a problem with foamLog
Rickard.Solsjo is offline   Reply With Quote

Old   August 29, 2010, 06:12
Default
  #15
Senior Member
 
Rickard
Join Date: May 2010
Location: Lund, Skåne, Sweden
Posts: 143
Rep Power: 16
Rickard.Solsjo is on a distinguished road
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
Rickard.Solsjo is offline   Reply With Quote

Old   April 5, 2020, 18:39
Default missing some variables in the "logs" directory
  #16
New Member
 
Join Date: Mar 2020
Posts: 2
Rep Power: 0
Plassf is on a distinguished road
Hello,


I have a different problem with the "foamLog" command. In the "log" file, the solver has indeed calculated (among others) the variables "Liquid penetration 95% mass (m)" and "Vapor penetration (m)" that I need to plot as a function of time, BUT, after typing the command: "foamLog log" I realize that the "logs" folder does not contain these two variables.

How can I solve this problem please?

Plassf.log file.png
Plassf is offline   Reply With Quote

Old   September 10, 2020, 04:56
Default
  #17
New Member
 
Nicky Bella
Join Date: Sep 2020
Posts: 2
Rep Power: 0
Nickybelliya is on a distinguished road
Quote:
Originally Posted by onurdundar View Post
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/auto clicker/foamLog.db
awk file : ./backStepRSTML1/logs/foamLog.awk
files to : ./backStepRSTML1/logs

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

Generated XY files for:
[dundar@localhost rasInterFoam]$
Usage: blockMesh [OPTIONS]
options:
-blockTopology write block edges and centres as .obj files
-case <dir> specify alternate case directory, default is the cwd
-dict <file> specify alternative dictionary for the blockMesh description
-fileHandler <handler>
override the file handler type
-noClean keep the existing files in the polyMesh
-noFunctionObjects
do not execute function objects
-region <name> specify alternative mesh region
-sets write cellZones as cellSets too (for processing purposes)
-doc display application documentation in browser
-doc-source display source code in browser
-help print usage information and exit
-help-full print full usage information and exit

Block description

For a given block, the correspondence between the ordering of
vertex labels and face labels is shown below.
For vertex numbering in the sequence 0 to 7 (block, centre):
faces 0 (f0) and 1 are left and right, respectively;
faces 2 and 3 are bottom and top;
and faces 4 and 5 are front the back.

Last edited by Nickybelliya; September 16, 2020 at 01:28. Reason: spelling
Nickybelliya is offline   Reply With Quote

Old   September 10, 2020, 05:00
Default
  #18
New Member
 
Nicky Bella
Join Date: Sep 2020
Posts: 2
Rep Power: 0
Nickybelliya is on a distinguished road
Quote:
Originally Posted by blacy View Post
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 auto clicker>
extracts xy files from log
foamLog -l <log>
lists but does not extract
foamLog -h
for a help message

Thanks
blacy
The arguments in square brackets, [ ], are optional flags. If the application is executed from within a case directory, it will operate on that case. Alternatively, the -case <caseDir> option allows the case to be specified directly so that the application can be executed from anywhere in the filing system.
The -help-full offers additional application options. For example the simpleFoam solver offers following extra options:


-listFunctionObjects
List functionObjects
-listFvOptions List fvOptions
-listRegisteredSwitches
List switches registered for run-time modification
-listScalarBCs List scalar field boundary conditions (fvPatchField<scalar>)
-listSwitches List switches declared in libraries but not set in
etc/controlDict
-listTurbulenceModels
List turbulenceModels
-listUnsetSwitches
List switches declared in libraries but not set in
etc/controlDict
-listVectorBCs List vector field boundary conditions (fvPatchField<vector>)
Nickybelliya 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
FoamLog for my case liugx212 OpenFOAM Running, Solving & CFD 9 June 18, 2008 14:12
Problems with foamLog and interFoam OF 14 sinusmontis OpenFOAM Bugs 2 June 1, 2007 09:57


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