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

pyFoamPotentialRunner error

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 2, 2013, 13:39
Question pyFoamPotentialRunner error
  #1
Member
 
James
Join Date: May 2013
Posts: 82
Rep Power: 4
Tensian is on a distinguished road
Hi Foamers,

I am trying to initialize my solution with potentialFoam to use it as input to simpleFoam. For that purpose, I use pyFoamPotentialRunner.py. I get this error:


Create time

Create mesh for time = 0

Reading field p

Reading field U


Calculating potential flow
Using dynamicCode for functionObject difference at line 47 in "/home/cfd2/OpenFOAM/Isma-2.1.0/Pruebaconvelocidadpyfoampotentialrunner/system/controlDict::functions::difference"
Creating new library in "dynamicCode/error/platforms/linux64GccDPOpt/lib/liberror_e92448da6ae10bc777e0869670f72a48fd0673f1. so"
Invoking "wmake -s libso /home/cfd2/OpenFOAM/Isma-2.1.0/Pruebaconvelocidadpyfoampotentialrunner/dynamicCode/error"
wmakeLnInclude: linking include files to ./lnInclude
Making dependency list for source file functionObjectTemplate.C
Making dependency list for source file FilterFunctionObjectTemplate.C
'/home/cfd2/OpenFOAM/Isma-2.1.0/Pruebaconvelocidadpyfoampotentialrunner/dynamicCode/error/../platforms/linux64GccDPOpt/lib/liberror_e92448da6ae10bc777e0869670f72a48fd0673f1. so' is up to date.
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.000398875, No Iterations 1001
DICPCG: Solving for p, Initial residual = 0.330204, Final residual = 9.96235e-07, No Iterations 889
DICPCG: Solving for p, Initial residual = 0.0439428, Final residual = 9.91653e-07, No Iterations 859
DICPCG: Solving for p, Initial residual = 0.01177, Final residual = 9.80963e-07, No Iterations 764
DICPCG: Solving for p, Initial residual = 0.00360687, Final residual = 9.96712e-07, No Iterations 552
DICPCG: Solving for p, Initial residual = 0.00127418, Final residual = 9.77746e-07, No Iterations 470
DICPCG: Solving for p, Initial residual = 0.000491449, Final residual = 9.96479e-07, No Iterations 569
DICPCG: Solving for p, Initial residual = 0.000205181, Final residual = 9.37787e-07, No Iterations 50
DICPCG: Solving for p, Initial residual = 9.0933e-05, Final residual = 9.92036e-07, No Iterations 18
DICPCG: Solving for p, Initial residual = 4.31694e-05, Final residual = 9.47567e-07, No Iterations 8
DICPCG: Solving for p, Initial residual = 2.18469e-05, Final residual = 9.85357e-07, No Iterations 8
continuity error = 0.00402446
Interpolated U error = 1.21676e-09
Looking up field U

Reading inlet velocity uInfX

#0 Foam::error:rintStack(Foam::Ostream&) in "/home/cfd2/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/home/cfd2/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::errorFunctionObject::write() at system/controlDict::functions::difference:62
#4 Foam::OutputFilterFunctionObject<Foam::errorFuncti onObject>::end() at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/OutputFilterFunctionObject.C:191
#5 Foam::functionObjectList::end() in "/home/cfd2/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6
in "/home/cfd2/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/bin/potentialFoam"
#7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8
in "/home/cfd2/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/bin/potentialFoam"
Segmentation fault (core dumped)
PyFoam WARNING on line 213 of file /usr/local/lib/python2.7/dist-packages/PyFoam/Applications/PotentialRunner.py : Trigger called: Resetting fvSchemes and fvSolution
Killing PID 3288
PyFoam WARNING on line 247 of file /usr/local/lib/python2.7/dist-packages/PyFoam/Execution/FoamThread.py : Process 3288 was already dead
Getting LinuxMem: [Errno 2] No such file or directory: '/proc/3288/status'

Anyone knows what's happening? How can I correct it?
And in the case that pyFoamPotentialRunner doesn give an error, should I run simpleFoam later or pyFoam just do it automatically? I have never seen a simulation like this, so I have no idea in how to proceed.

All kind of help (ideas, tutorials, links...) will be really much apreciated. The beginnings are always hard...
Tensian is offline   Reply With Quote

Old   July 2, 2013, 15:05
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,912
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Tensian View Post
Hi Foamers,

I am trying to initialize my solution with potentialFoam to use it as input to simpleFoam. For that purpose, I use pyFoamPotentialRunner.py. I get this error:


Reading inlet velocity uInfX

#0 Foam::error:rintStack(Foam::Ostream&) in "/home/cfd2/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigSegv::sigHandler(int) in "/home/cfd2/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 in "/lib/x86_64-linux-gnu/libc.so.6"
#3 Foam::errorFunctionObject::write() at system/controlDict::functions::difference:62
#4 Foam::OutputFilterFunctionObject<Foam::errorFuncti onObject>::end() at ~/OpenFOAM/OpenFOAM-2.1.x/src/OpenFOAM/lnInclude/OutputFilterFunctionObject.C:191
#5 Foam::functionObjectList::end() in "/home/cfd2/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#6
in "/home/cfd2/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/bin/potentialFoam"
#7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#8
in "/home/cfd2/OpenFOAM/OpenFOAM-2.1.x/platforms/linux64GccDPOpt/bin/potentialFoam"
Segmentation fault (core dumped)
PyFoam WARNING on line 213 of file /usr/local/lib/python2.7/dist-packages/PyFoam/Applications/PotentialRunner.py : Trigger called: Resetting fvSchemes and fvSolution
Killing PID 3288
PyFoam WARNING on line 247 of file /usr/local/lib/python2.7/dist-packages/PyFoam/Execution/FoamThread.py : Process 3288 was already dead
Getting LinuxMem: [Errno 2] No such file or directory: '/proc/3288/status'

Anyone knows what's happening? How can I correct it?
The problem is with one of the function-objects in your controlDict. Somehow it doesn't work inside of potentialFoam. So the best thing would be to disable the functionObjects as long as you run potentialFoam (for instance by renaming the functions-entry in the controlDict) and afterwards reinstate it

Quote:
Originally Posted by Tensian View Post
And in the case that pyFoamPotentialRunner doesn give an error, should I run simpleFoam later or pyFoam just do it automatically? I have never seen a simulation like this, so I have no idea in how to proceed.
pyFoamPotentialRunner.py only runs potentialFoam. The actual solver has to be run separately (pyFoam has no way of telling which is the "real" solver).

Quote:
Originally Posted by Tensian View Post
All kind of help (ideas, tutorials, links...) will be really much apreciated. The beginnings are always hard...
For a tutorial on PyFoam see the first part of the training presentation at this years workshop (it is linked from the PyFoam-page on the Wiki). Mind: there is no example on pyFoamPotentialRunner.py in that
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 3, 2013, 10:31
Question
  #3
Member
 
James
Join Date: May 2013
Posts: 82
Rep Power: 4
Tensian is on a distinguished road
Hi Bernhard,

First of all, thanks for your fast reply. I am not sure if I am understanding. I post my controlDIct file:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.5 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application simpleFoam;

startFrom startTime;
startTime 0;
stopAt endTime;
endTime 1000;
deltaT 1;
writeControl timeStep;
writeInterval 5;
purgeWrite 0;
writeFormat binary;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;

// ************************************************** *********************** //

I can't see any function-entry in the file. Do you refer at the controlDict of my case or in the generic source code of controlDict?What's the path to this file?
And other question, how can I tell OF to take the potentialFoam solution as initial solution for simpleFoam?

Thanks in advance for suggestions!
Tensian is offline   Reply With Quote

Old   July 3, 2013, 12:33
Default
  #4
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,912
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Tensian View Post
Hi Bernhard,

First of all, thanks for your fast reply. I am not sure if I am understanding. I post my controlDIct file:

I can't see any function-entry in the file. Do you refer at the controlDict of my case or in the generic source code of controlDict?What's the path to this file?
And other question, how can I tell OF to take the potentialFoam solution as initial solution for simpleFoam?

Thanks in advance for suggestions!
After I wrote the posting I checked it (because I got an idea for a feature to add). The problem is that the utility uses stuff from the potentialFoam-tutorial as a "template" and temporarily copies it into the case. Since 2.0 that tutorial has a functionObject and THAT functionObject is causing the problem.

Strange as it may seem: do exactly the opposite of what I said before. Add an empty list of functionObjects to the controlDict. Something like
Code:
functions 
{
}
That should replace the tutorial FOs
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 3, 2013, 12:35
Default
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,912
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by Tensian View Post
And other question, how can I tell OF to take the potentialFoam solution as initial solution for simpleFoam?
simpleFoam is extremely simple-minded (like all OF-solvers). Whatever U it finds in the 0-directory it uses as the initial condition. So if 0/U was generated by potentialFoam it uses that. You don'T have to tell it anything
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 3, 2013, 12:58
Question
  #6
Member
 
James
Join Date: May 2013
Posts: 82
Rep Power: 4
Tensian is on a distinguished road
Thanks Bernhard, now it Works!
But I think this is not a good initial solution for my simpleFoam simulation. Do you know why pressure driven flows explodes when specifying a fixedValue both on inlet and outlet?

Anyway thank you so much, I have learned how to use pyFoamPotentialRunner, so this is great!

Congratulations for your knowledge and thanks for share it!
Tensian is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GroovyBC the dynamic cousin of funkySetFields that lives on the suburb of the mesh gschaider OpenFOAM 300 October 29, 2014 19:00
c++ libraries and solver compiling vaina74 OpenFOAM Installation 13 February 3, 2012 18:43
Saving ParaFoam views and case sail OpenFOAM Paraview & paraFoam 9 November 25, 2011 16:46
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51
user defined function cfduser CFX 0 April 29, 2006 10:58


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