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

"...system/controlDict" at line 1???

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 5, 2019, 16:35
Default "...system/controlDict" at line 1???
  #1
Member
 
niewiemnic
Join Date: Jan 2018
Location: Niemcy
Posts: 80
Rep Power: 8
spalartallmaras is on a distinguished road
Hi

I simulated a case without problem in a computer, in which only Ubuntu 1804 was installed. But if I copy the case files to a windows 10 computer and simulate the same thing, there is always this error message... I installed the Ubuntu in Windows 10 in this way "https://www.openfoam.com/download/install-windows-10.php". How can I solve this problem?





/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : v1906 OPENFOAM=1906
Arch : "LSB;label=32;scalar=64"
Exec : pimpleFoam
Date : Aug 05 2019
Time : 20:57:38
Host :
PID : 6020
I/O : uncollated
Case : /mnt/c/Users/USER/Downloads/kanal
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

--> FOAM Warning :
From function bool Foam::IOobject::readHeader(Foam::Istream&)
in file db/IOobject/IOobjectReadHeader.C at line 114
Reading "/mnt/c/Users/USER/Downloads/kanal/system/controlDict" at line 1
First token could not be read or is not the keyword 'FoamFile'

Check header is of the form:

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
spalartallmaras is offline   Reply With Quote

Old   August 5, 2019, 16:38
Default
  #2
Senior Member
 
Join Date: Mar 2018
Posts: 115
Rep Power: 8
anon_q is on a distinguished road
Could you post your controlDict file?
anon_q is offline   Reply With Quote

Old   August 5, 2019, 16:43
Default controlDict
  #3
Member
 
niewiemnic
Join Date: Jan 2018
Location: Niemcy
Posts: 80
Rep Power: 8
spalartallmaras is on a distinguished road
Thank you for your answer, I post the controlDict.






/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application pimpleFoam;

startFrom startTime;

startTime 3.2;

stopAt endTime;

endTime 5.0;

deltaT 0.0025;

writeControl runTime;

writeInterval 0.2;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

functions
{
Q1
{
type Q;
libs ("libfieldFunctionObjects.so");
writeControl writeTime;
}
vorticity1
{
type vorticity;
libs ("libfieldFunctionObjects.so");
writeControl writeTime;
}
yPlus
{
type yPlus;
libs ("libfieldFunctionObjects.so");
writeControl writeTime;
}
Lambda2
{
type Lambda2;
libs ("libfieldFunctionObjects.so");
writeControl writeTime;
field U;
}
div1
{
type div;
libs ("libfieldFunctionObjects.so");
writeControl writeTime;
field Lambda2;
}
fieldAverage1
{
type fieldAverage;
libs ("libfieldFunctionObjects.so");
writeControl writeTime;
timeStart 0.3;

fields
(
U
{
mean on;
prime2Mean on;
base time;
}

p
{
mean on;
prime2Mean on;
base time;
}

Lambda2
{
mean on;
prime2Mean off;
base time;
}

div(Lambda2)
{
mean on;
prime2Mean off;
base time;
}
);
}
}




// ************************************************** *********************** //
spalartallmaras is offline   Reply With Quote

Old   August 5, 2019, 18:35
Default
  #4
Senior Member
 
Join Date: Mar 2018
Posts: 115
Rep Power: 8
anon_q is on a distinguished road
Your controlDict is OK. But I think the problem is somewhere else with other files.
  • * Which version of OpenFOAM you used on Ubuntu 18.04?
    * Did you check that all the files on your case have a header?
anon_q is offline   Reply With Quote

Old   August 6, 2019, 06:24
Default
  #5
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,174
Rep Power: 27
Yann will become famous soon enough
Hello,


Another idea: it might be related to linux/windows line endings issues.


Have you edited your controlDict in windows? And if yes, with which software?


You can use vi right from the terminal to check if your controlDict file is ok, or use an editor such as Notepad++ on windows. (Open your file in notepad++, then "edit/EOL Conversion". It should be set to "Unix")
Yann is offline   Reply With Quote

Old   August 6, 2019, 10:04
Default
  #6
Member
 
niewiemnic
Join Date: Jan 2018
Location: Niemcy
Posts: 80
Rep Power: 8
spalartallmaras is on a distinguished road
@Evren Linda: OpenFOAM version is v1906 and I checked that all the files have a header.

@Yann: Thank you for your idea, but with vi and notepad++ it doesnt work.
spalartallmaras is offline   Reply With Quote

Old   August 6, 2019, 10:20
Default
  #7
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,174
Rep Power: 27
Yann will become famous soon enough
What do you mean it doesn't work?
Yann is offline   Reply With Quote

Old   August 6, 2019, 10:22
Default
  #8
Member
 
niewiemnic
Join Date: Jan 2018
Location: Niemcy
Posts: 80
Rep Power: 8
spalartallmaras is on a distinguished road
I can still see the same error messages like what I posted yesterday.
spalartallmaras is offline   Reply With Quote

Old   August 7, 2019, 06:37
Default
  #9
Member
 
niewiemnic
Join Date: Jan 2018
Location: Niemcy
Posts: 80
Rep Power: 8
spalartallmaras is on a distinguished road
I just recognised that simpleFoam and icoFoam work well. Hymm, what can be the reason for this problem...? My solver is pimpleFoam.
spalartallmaras is offline   Reply With Quote

Old   August 7, 2019, 08:29
Default
  #10
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,174
Rep Power: 27
Yann will become famous soon enough
I'm pretty sure I faced this error before but I can't remember what it was.


Could you elaborate about what you tried?


Have you tried to run icoFoam and simpleFoam on your case or on another case/tutorial?
Have you tried to run pimpleFoam on a tutorial?
When you run your case on your windows system, do you run it from scratch or restart the case from a previously saved time step?
Yann is offline   Reply With Quote

Old   August 7, 2019, 08:37
Default
  #11
Member
 
niewiemnic
Join Date: Jan 2018
Location: Niemcy
Posts: 80
Rep Power: 8
spalartallmaras is on a distinguished road
@Yann

Thank you for your answer once more.

1.Have you tried to run icoFoam and simpleFoam on your case or on another case/tutorial? - I just started two tutorials with icoFoam and simpleFoam, not my case.

2. Have you tried to run pimpleFoam on a tutorial? - After that I read your answer, I started a simulation of tutorial channel395. The simulation for channel 395 works well with pimpleFoam!

3. When you run your case on your windows system, do you run it from scratch or restart the case from a previously saved time step? - I installed my ubuntu 18.04 LTS from

https://www.microsoft.com/de-de/p/ub...ot:overviewtab

... and I restarted the case from a previously saved time step (t=3.2 s) as I posted two days ago.
spalartallmaras is offline   Reply With Quote

Old   August 7, 2019, 09:02
Default
  #12
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,174
Rep Power: 27
Yann will become famous soon enough
Then the error is most probably related to your case.



I suggest to narrow down the potential issues by restarting your case (or a copy) from scratch, as you did the first time on your other computer.

If you still get the error, try to simplify your case, for instance by deleting the functionObjects, until it works or until you can identify where does the error come from.
Yann is offline   Reply With Quote

Old   August 7, 2019, 09:18
Default
  #13
Member
 
niewiemnic
Join Date: Jan 2018
Location: Niemcy
Posts: 80
Rep Power: 8
spalartallmaras is on a distinguished road
@Yann

The problem is solved! I installed "make",

sudo apt-get install make

and it works well!
spalartallmaras is offline   Reply With Quote

Old   August 7, 2019, 09:33
Default Merci beaucoup!
  #14
Member
 
niewiemnic
Join Date: Jan 2018
Location: Niemcy
Posts: 80
Rep Power: 8
spalartallmaras is on a distinguished road
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1906 |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
Build : v1906 OPENFOAM=1906
Arch : "LSB;label=32;scalar=64"
Exec : pimpleFoam
Date : Aug 07 2019
Time : 15:46:31
Host : USER
PID : 0000
I/O : uncollated
Case : /mnt/c/Users/USER/OpenFOAM/USER-v1906/run/kanal/re_tau_180_wale
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 10)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 3.2


PIMPLE: max iterations = 20
field p : relTol 0, tolerance 1e-05
field U : relTol 0, tolerance 1e-05

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type LES
Selecting LES turbulence model WALE
Selecting LES delta type cubeRootVol
LES
{
LESModel WALE;
turbulence on;
printCoeffs on;
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
PrandtlCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
maxDeltaRatio 1.1;
}
Cdelta 0.158;
}
vanDriestCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
maxDeltaRatio 1.1;
}
Aplus 26;
Cdelta 0.158;
}
smoothCoeffs
{
delta cubeRootVol;
cubeRootVolCoeffs
{
deltaCoeff 1;
}
maxDeltaRatio 1.1;
}
Ce 1.048;
Ck 0.094;
Cw 0.325;
}

No MRF models present

Creating finite volume options from "constant/fvOptions"

Selecting finite volume options type meanVelocityForce
Source: momentumSource
- selecting all cells
- selected 1081344 cell(s) with volume 40.96
Reading pressure gradient from file
Initial pressure gradient = 0.26874

Courant Number mean: 0.720607 max: 0.799872

Starting time loop

fieldAverage fieldAverage1:
Restarting averaging for fields:
U: starting averaging at time 3.2
p: starting averaging at time 3.2
Lambda2: starting averaging at time 3.2
div(Lambda2): starting averaging at time 3.2

Courant Number mean: 0.720607 max: 0.799872
Time = 3.2025

PIMPLE: iteration 1
smoothSolver: Solving for Ux, Initial residual = 7.35683e-05, Final residual = 2.15586e-06, No Iterations 1
smoothSolver: Solving for Uy, Initial residual = 0.0610085, Final residual = 1.04745e-05, No Iterations 3
smoothSolver: Solving for Uz, Initial residual = 0.0491027, Final residual = 5.66325e-06, No Iterations 3
Pressure gradient source: uncorrected Ubar = 14.4122, pressure gradient = 0.246269
GAMG: Solving for p, Initial residual = 1, Final residual = 0.000369392, No Iterations 4
time step continuity errors : sum local = 1.34648e-11, global = -1.44398e-20, cumulative = -1.44398e-20
Pressure gradient source: uncorrected Ubar = 14.4122, pressure gradient = 0.25346
spalartallmaras is offline   Reply With Quote

Old   July 4, 2020, 04:24
Default
  #15
New Member
 
Snigdha Ghosh
Join Date: Nov 2019
Posts: 6
Rep Power: 6
Snigdha is on a distinguished road
Hi,
I am using interFoam. However, I am using cray supercomputer to run my simulations. On spercomputer I have openfoam v 1712. On the other hand, I have openfoam 7 on my PC which uses Linux OS. After checking my code runs well on my PC I transferred my working directories to supercomputer. When I ran the simulations I got the same error:

Reading "/home/metprocmodlgrp/144110018/two_sphere_3/system/controlDict" at line 1
First token could not be read or is not the keyword 'FoamFile'
P.S. I replaced the version of all the file header from 7 to v1712. Still the same error is appearing. Can anyone help me on this?
Snigdha is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Unknown function type pressureTools Dorian1504 OpenFOAM Post-Processing 23 May 25, 2021 09:24
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 07:15
[mesh manipulation] refineMesh Error mohsen.boojari OpenFOAM Meshing & Mesh Conversion 3 March 1, 2018 22:07
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 keepfit ParaView 60 September 18, 2013 03:23
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 05:42


All times are GMT -4. The time now is 17:59.