CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   pyFoamPotentialRunner issue! (http://www.cfd-online.com/Forums/openfoam/90176-pyfoampotentialrunner-issue.html)

Amir July 3, 2011 12:09

pyFoamPotentialRunner issue!
 
Hi experts,
I have a problem with pyFoamPotentialRunner.py.
I use it in pitzDaily tutorials but after it sets case for potential solver it crashes!
here is the error:
Code:

Setting system-directory for potentialFoam
Traceback (most recent call last):
  File "/usr/local/bin/pyFoamPotentialRunner.py", line 5, in <module>
    PotentialRunner()
  File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PotentialRunner.py", line 42, in __init__
    nr=1)
  File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PyFoamApplication.py", line 155, in __init__
    result=self.run()
  File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PotentialRunner.py", line 128, in run
    pRefValue=self.opts.pRefValue)
  File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PotentialRunner.py", line 148, in __init__
    pot=SolutionDirectory(path.join(pre,"potentialFoam","cylinder"),archive=None,paraviewLink=False)
  File "/usr/local/lib/python2.6/dist-packages/PyFoam/RunDictionary/SolutionDirectory.py", line 53, in __init__
    self.reread()
  File "/usr/local/lib/python2.6/dist-packages/PyFoam/RunDictionary/SolutionDirectory.py", line 321, in reread
    if not force and stat(self.name)[ST_CTIME]<=self.lastReread:
OSError: [Errno 2] No such file or directory: '/usr/lib/OpenFOAM-1.6-ext/tutorials/basic/potentialFoam/cylinder'

Any suggestion?

gschaider July 4, 2011 14:52

Quote:

Originally Posted by Amir (Post 314528)
Hi experts,
I have a problem with pyFoamPotentialRunner.py.
I use it in pitzDaily tutorials but after it sets case for potential solver it crashes!
here is the error:
Code:

Setting system-directory for potentialFoam
Traceback (most recent call last):
  File "/usr/local/bin/pyFoamPotentialRunner.py", line 5, in <module>
    PotentialRunner()
  File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PotentialRunner.py", line 42, in __init__
    nr=1)
  File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PyFoamApplication.py", line 155, in __init__
    result=self.run()
  File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PotentialRunner.py", line 128, in run
    pRefValue=self.opts.pRefValue)
  File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PotentialRunner.py", line 148, in __init__
    pot=SolutionDirectory(path.join(pre,"potentialFoam","cylinder"),archive=None,paraviewLink=False)
  File "/usr/local/lib/python2.6/dist-packages/PyFoam/RunDictionary/SolutionDirectory.py", line 53, in __init__
    self.reread()
  File "/usr/local/lib/python2.6/dist-packages/PyFoam/RunDictionary/SolutionDirectory.py", line 321, in reread
    if not force and stat(self.name)[ST_CTIME]<=self.lastReread:
OSError: [Errno 2] No such file or directory: '/usr/lib/OpenFOAM-1.6-ext/tutorials/basic/potentialFoam/cylinder'

Any suggestion?

OK. What happens here is that the utility tries to copy fvSolution and fvSchemes (as these are different from the one that simpleFoam needs) from the case $FOAM_TUTORIALS/basic/potentialFoam/cylinder. There was a hickup that the debian packages of 1.6-ext copy the tutorials to the debin-conforming location (/usr/share/doc/something I think) but the $FOAM_TUTORIALS variable still points to the "old" location. Either set the $FOAM_TUTORIALS-variable to the "real" location or set a symbolic link from the location where the stuff is now to the location where OF expects it

Bernhard

Amir July 4, 2011 16:06

Quote:

Originally Posted by gschaider (Post 314670)
OK. What happens here is that the utility tries to copy fvSolution and fvSchemes (as these are different from the one that simpleFoam needs) from the case $FOAM_TUTORIALS/basic/potentialFoam/cylinder. There was a hickup that the debian packages of 1.6-ext copy the tutorials to the debin-conforming location (/usr/share/doc/something I think) but the $FOAM_TUTORIALS variable still points to the "old" location. Either set the $FOAM_TUTORIALS-variable to the "real" location or set a symbolic link from the location where the stuff is now to the location where OF expects it

Bernhard

Thanks a lot Bernard,
You are right about different tutorials location; I fixed that and I got some results but after that I faced 2 warnings, maybe these are not very important but could you please have a look:
Code:

Setting system-directory for potentialFoam
/*---------------------------------------------------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM Extend Project: Open source CFD        |
|  \\    /  O peration    | Version:  1.6-ext                              |
|  \\  /    A nd          | Web:      www.extend-project.de                |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
Build  : 1.6-ext
Exec  : potentialFoam -case . -writep
Date  : Jul 05 2011
Time  : 00:26:48
Host  : amir
PID    : 5198
Case  : /home/amir/OpenFOAM/amir-1.6-ext/run/myRun/simpleFoam/pitzDaily
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

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

Create mesh for time = 0

// using new solver syntax:
p
{
solver          PCG;
preconditioner  DIC;
tolerance      1e-06;
relTol          0.01;
}

// using new solver syntax:
U
{
solver          PBiCG;
preconditioner  DILU;
tolerance      1e-05;
relTol          0.1;
}

// using new solver syntax:
k
{
solver          PBiCG;
preconditioner  DILU;
tolerance      1e-05;
relTol          0.1;
}

// using new solver syntax:
epsilon
{
solver          PBiCG;
preconditioner  DILU;
tolerance      1e-05;
relTol          0.1;
}

// using new solver syntax:
R
{
solver          PBiCG;
preconditioner  DILU;
tolerance      1e-05;
relTol          0.1;
}

// using new solver syntax:
nuTilda
{
solver          PBiCG;
preconditioner  DILU;
tolerance      1e-05;
relTol          0.1;
}

Reading field p

Reading field U


Calculating potential flow
DICPCG:  Solving for p, Initial residual = 1, Final residual = 0.00951731, No Iterations 172
continuity error = 0.166533
Interpolated U error = 0.000116283
mag(U): max: 27.0928 min: 0.125791
ExecutionTime = 0.23 s  ClockTime = 0 s

End

 PyFoam WARNING on line 196 of file /usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PotentialRunner.py : Trigger called: Resetting fvSchemes and fvSolution
Killing PID 5197
 PyFoam WARNING on line 232 of file /usr/local/lib/python2.6/dist-packages/PyFoam/Execution/FoamThread.py : Process 5197 was already dead
Getting LinuxMem: [Errno 2] No such file or directory: '/proc/5197/status'


gschaider July 4, 2011 18:26

Quote:

Originally Posted by Amir (Post 314675)
Thanks a lot Bernard,
You are right about different tutorials location; I fixed that and I got some results but after that I faced 2 warnings, maybe these are not very important but could you please have a look:
Code:

PyFoam WARNING on line 196 of file /usr/local/lib/python2.6/dist-packages/PyFoam/Applications/PotentialRunner.py : Trigger called: Resetting fvSchemes and fvSolution
Killing PID 5197
 PyFoam WARNING on line 232 of file /usr/local/lib/python2.6/dist-packages/PyFoam/Execution/FoamThread.py : Process 5197 was already dead
Getting LinuxMem: [Errno 2] No such file or directory: '/proc/5197/status'


That's alright. The first warning means that everything was working as planned (the case now has the original fvS*-files). But you already guessed that.

The second warning means "your computer is too fast". Once the process that should supervise the solver had started up the solver itself was already finished. No problem here. Solution: get a slower machine

wyldckat July 4, 2011 20:00

Quote:

Originally Posted by gschaider (Post 314687)
Solution: get a slower machine

Solution #2: Increase mesh resolution by 10x or 100x :D

Amir July 5, 2011 02:29

Quote:

Originally Posted by gschaider (Post 314687)
That's alright. The first warning means that everything was working as planned (the case now has the original fvS*-files). But you already guessed that.

The second warning means "your computer is too fast". Once the process that should supervise the solver had started up the solver itself was already finished. No problem here. Solution: get a slower machine

Quote:

Originally Posted by wyldckat (Post 314695)
Solution #2: Increase mesh resolution by 10x or 100x :D

Dear Bernhard and Bruno,
Thank you very much for your helps


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