openfoam error - can't write to file

  • Wee-Beng TAY
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
10 years 11 months ago #4883 by Wee-Beng TAY
openfoam error - can't write to file was created by Wee-Beng TAY
Hi,

I have installed caelinux2010 and everything ran smoothly. However, when I tried to run openfoam, there's problems.

1st of all, "cd $FOAM_RUN/tutorials/incompressible/icoFoam/cavity" can't work.

I still managed to get into the directory.

I was told in the manual to enter the direcotconstant/polyMesh. The "blockMeshDict" file is there but when I run "blockMesh", I got the error:

caelinux@caelinux:~$ cd /opt/openfoam170/tutorials/incompressible/icoFoam/
cavity/ cavityClipped/ cavityGrade/ elbow/
caelinux@caelinux:~$ cd /opt/openfoam170/tutorials/incompressible/icoFoam/cavitycaelinux@caelinux:/opt/openfoam170/tutorials/incompressible/icoFoam/cavity$ cd constant/polyMesh/
caelinux@caelinux:/opt/openfoam170/tutorials/incompressible/icoFoam/cavity/constant/polyMesh$ blockMesh
/*
*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.7.0 |
| \ / A nd | Web: www.OpenFOAM.com |
| \/ M anipulation | |
\*
*/
Build : 1.7.0-113391ee57bd
Exec : blockMesh
Date : Nov 01 2010
Time : 11:32:19
Host : caelinux
PID : 4431
Case : /opt/openfoam170/tutorials/incompressible/icoFoam/cavity/constant/polyMesh
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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



--> FOAM FATAL IO ERROR:
cannot open file

file: /opt/openfoam170/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 61.

FOAM exiting

Do you know what's wrong?

Thank you!

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #4887 by Joël Cugnoni
Replied by Joël Cugnoni on topic Re:openfoam error - can't write to file
Hi actually the cause of the problem is very simple:
you are trying to run / modify the examples from /opt/openfoamxx/.. directly, and all the directories in /opt are write protected.

To run/modify the examples (as propose in OpenFoam manual), you shoult first copy the tutorials in a folder of your home directory:

[code:1]mkdir ~/OpenFOAM
cp -r /opt/openfoam170/tutorials/incompressible/icoFoam/ ~/OpenFOAM
[/code:1]
and then run the examples from your own copy of the files in ~/OpenFOAM

That should fix the problem.

Joël Cugnoni - a.k.a admin
www.caelinux.com

Please Log in or Create an account to join the conversation.

  • Wee-Beng TAY
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
10 years 11 months ago #4893 by Wee-Beng TAY
Replied by Wee-Beng TAY on topic Re:openfoam error - can't write to file
Hi I tried but it still can't work.

I haev check write access to the blockMeshDict file. However, the problem is:

Build : 1.7.0-113391ee57bd
Exec : blockMesh
Date : Nov 02 2010
Time : 11:40:40
Host : caelinux
PID : 6753
Case : /home/caelinux/OpenFOAM/openfoam170/tutorials/incompressible/icoFoam/cavity/constant/polyMesh
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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



--> FOAM FATAL IO ERROR:
cannot open file

file: /home/caelinux/OpenFOAM/openfoam170/tutorials/incompressible/icoFoam/cavity/constant/polyMesh/system/controlDict at line 0.

From function regIOobject::readStream()
in file db/regIOobject/regIOobjectRead.C at line 61.

FOAM exiting

The file which has problem is the controlDict file which is not found.

Please Log in or Create an account to join the conversation.

More
10 years 11 months ago #4895 by Joël Cugnoni
Replied by Joël Cugnoni on topic Re:openfoam error - can't write to file
OpenFOAM commands are supposed to be executed at the root of the case.

A typical case root contains the following folders: Constant=contains the constant fields/structures, for ex. the mesh,
System=input files used by the pre/post and solver command
0=contains the initial conditions and/or boundary conditions

To run blockmesh, you should first go to the case root directory:

[code:1]
cd ~/OpenFOAM/openfoam170/tutorials/incompressible/icoFoam/cavity

blockmesh

icoFoam
[/code:1]

If I remember well, this should work...

Joël Cugnoni - a.k.a admin
www.caelinux.com

Please Log in or Create an account to join the conversation.

  • Wee-Beng TAY
  • Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
More
10 years 11 months ago #4906 by Wee-Beng TAY
Replied by Wee-Beng TAY on topic Re:openfoam error - can't write to file
Yup it finally worked! thanks!

Please Log in or Create an account to join the conversation.

Moderators: catux
Time to create page: 0.114 seconds
Powered by Kunena Forum