View Issue Details

IDProjectCategoryView StatusLast Update
0002769OpenFOAMBugpublic2017-11-30 09:44
ReporterGiovanna Assigned Tohenry  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionno change required 
PlatformGNU/LinuxOSLinux UbuntuOS Version16.04
Summary0002769: FoamLog Error
DescriptionHey there,

I got the following error using foamLog:
Using:
  log : log
  database : /opt/openfoam5/bin/tools/foamLog.db
  awk file : ./logs/foamLog.awk
  files to : ./logs

Executing: awk -f ./logs/foamLog.awk log
awk: ./logs/foamLog.awk: line 51: syntax error at or near =
awk: ./logs/foamLog.awk: line 52: syntax error at or near =
awk: ./logs/foamLog.awk: line 53: syntax error at or near =

It's not writing any files into the logs folder.

First, I tried to change the limit (like it's suggested in an older issue https://bugs.openfoam.org/view.php?id=748), but it's already unlimited.

I also tried to add a close(file) command in the foamLog file to avoid that AWK is getting stuck because too many files are open.

varName=varNameVal[1] "Iters"
        file=varName "_" subIter[varName]++
        file="$outputDir/" file
        extract(\$0, "No Iterations ", val)
        print $timeName "\t" val[1] > file
        close(file)

It's also not working with smaller log-files (and also not in the SandiaD_LTS tutorial).

It may be connected with the time entries in the controlDict file. With an endTime of 1s, a deltaT of 1e-5 and a writeInterval of 0.025 it works. After I changed the entries, it didn't work anymore.
Additional Informationapplication reactingFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 6000;

deltaT 1;

writeControl runTime;

writeInterval 100;

purgeWrite 0;

writeFormat ascii;

writePrecision 10;

writeCompression no;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

adjustTimeStep no;

maxCo 0.3;
TagsfoamLog, reactingFoam

Activities

chris

2017-11-27 09:24

manager   ~0009071

@Giovanna

foamLog is a fairly clunky script whose functionality has been partly reproduced in other, better tools, e.g. the residuals function object, User Guide sec 6.3.4:
https://cfd.direct/openfoam/user-guide/graphs-monitoring/

It might be better to replace all the foamLog functionality with other tools. Please could you list the data you monitor with foamLog? (In the case of residuals, please state whether initial/final)

Giovanna

2017-11-30 07:22

reporter   ~0009110

These are the residuals I would like to monitor:
C
C2H
C2H2
C2H2FinalRes
C2H2Iters
C2H3
C2H3FinalRes
C2H3Iters
C2H4
C2H4FinalRes
C2H4Iters
C2H5
C2H5FinalRes
C2H5Iters
C2H6
C2H6FinalRes
C2H6Iters
C2HFinalRes
C2HIters
C3H7
C3H7FinalRes
C3H7Iters
C3H8
C3H8FinalRes
C3H8Iters
CFinalRes
CH
CH2
CH2CHO
CH2CHOFinalRes
CH2CHOIters
CH2CO
CH2COFinalRes
CH2COIters
CH2FinalRes
CH2Iters
CH2O
CH2OFinalRes
CH2OH
CH2OHFinalRes
CH2OHIters
CH2OIters
CH2(S)
CH2(S)FinalRes
CH2(S)Iters
CH3
CH3CHO
CH3CHOFinalRes
CH3CHOIters
CH3FinalRes
CH3Iters
CH3O
CH3OFinalRes
CH3OH
CH3OHFinalRes
CH3OHIters
CH3OIters
CH4
CH4FinalRes
CH4Iters
CHFinalRes
CHIters
CIters
clockTime
CO
CO2
CO2FinalRes
CO2Iters
COFinalRes
COIters
contCumulative
contGlobal
contLocal
epsilon
epsilonFinalRes
epsilonIters
executionTime
G
GFinalRes
GIters
h
H
H2
H2FinalRes
H2Iters
H2O
H2O2
H2O2FinalRes
H2O2Iters
H2OFinalRes
H2OIters
HCCO
HCCOFinalRes
HCCOH
HCCOHFinalRes
HCCOHIters
HCCOIters
HCO
HCOFinalRes
HCOIters
hFinalRes
HFinalRes
hIters
HIters
HO2
HO2FinalRes
HO2Iters
k
kFinalRes
kIters
O
O2
O2FinalRes
O2Iters
OFinalRes
OH
OHFinalRes
OHIters
OIters
p
pFinalRes
pIters
rho
rhoFinalRes
rhoIters
Separator
Time
Ux
UxFinalRes
UxIters
Uy
UyFinalRes
UyIters
Uz
UzFinalRes
UzIters

henry

2017-11-30 09:44

manager   ~0009111

Use the residuals function object, See User Guide sec 6.3.4:
https://cfd.direct/openfoam/user-guide/graphs-monitoring/

Issue History

Date Modified Username Field Change
2017-11-23 10:20 Giovanna New Issue
2017-11-23 10:20 Giovanna Tag Attached: reactingFoam
2017-11-23 10:20 Giovanna Tag Attached: foamLog
2017-11-23 10:31 henry Priority high => normal
2017-11-23 10:31 henry Severity major => minor
2017-11-27 09:24 chris Note Added: 0009071
2017-11-30 07:22 Giovanna Note Added: 0009110
2017-11-30 09:44 henry Assigned To => henry
2017-11-30 09:44 henry Status new => closed
2017-11-30 09:44 henry Resolution open => no change required
2017-11-30 09:44 henry Note Added: 0009111