CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [PyFoam] fatal error on line 464 of pyFoamApplication.py (https://www.cfd-online.com/Forums/openfoam-community-contributions/144517-fatal-error-line-464-pyfoamapplication-py.html)

martad November 15, 2014 22:09

fatal error on line 464 of pyFoamApplication.py
 
Hello, I'm trying to post-process my results using pyFoamSamplePlot. This is what I have:
Code:

pyFoamSamplePlot.py --dir=sets ./postProcessing/ --info

Times :  ['0', '0.5', '1', '1.5', '2', '2.5', '3', '3.5', '4', '4.5', '5', '5.5', '6', '6.5', '7', '7.5', '8', '8.5', '9', '9.5', '10', '10.5', '11']
Lines :  ['outletLine']
Fields:  ['U']

And when I try to plot:
Code:

pyFoamSamplePlot.py --dir=sets --field=U --time=1 ./postProcessing/
I get this error:
Code:

Error in /home/feba/OpenFOAM/PyFoam-0.6.3/bin/pyFoamSamplePlot.py : FatalError in PyFoam: 'PyFoam FATAL ERROR on line 464 of file /home/feba/OpenFOAM/PyFoam-0.6.3/lib/python2.7/site-packages/PyFoam/Applications/PyFoamApplication.py: No plots produced. Nothing done' in Application-class: SamplePlot
Any idea what this might be and how do deal with it?

The lines 460-464 of that PyFoamApplication.py file read as follows:
Code:

    def error(self,*args):
        """Raise a error exception. How it will be handled is a different story
        @param args: Arguments to the exception
        """
        raise PyFoamApplicationException(self,*args)

(I don't know Python much at all)
I'd appreciate your advice!

gschaider November 16, 2014 18:20

Quote:

Originally Posted by martad (Post 519360)
Hello, I'm trying to post-process my results using pyFoamSamplePlot. This is what I have:
Code:

pyFoamSamplePlot.py --dir=sets ./postProcessing/ --info

Times :  ['0', '0.5', '1', '1.5', '2', '2.5', '3', '3.5', '4', '4.5', '5', '5.5', '6', '6.5', '7', '7.5', '8', '8.5', '9', '9.5', '10', '10.5', '11']
Lines :  ['outletLine']
Fields:  ['U']

And when I try to plot:
Code:

pyFoamSamplePlot.py --dir=sets --field=U --time=1 ./postProcessing/
I get this error:
Code:

Error in /home/feba/OpenFOAM/PyFoam-0.6.3/bin/pyFoamSamplePlot.py : FatalError in PyFoam: 'PyFoam FATAL ERROR on line 464 of file /home/feba/OpenFOAM/PyFoam-0.6.3/lib/python2.7/site-packages/PyFoam/Applications/PyFoamApplication.py: No plots produced. Nothing done' in Application-class: SamplePlot
Any idea what this might be and how do deal with it?

The lines 460-464 of that PyFoamApplication.py file read as follows:
Code:

    def error(self,*args):
        """Raise a error exception. How it will be handled is a different story
        @param args: Arguments to the exception
        """
        raise PyFoamApplicationException(self,*args)

(I don't know Python much at all)
I'd appreciate your advice!

That routine is not the problem. It is only the messenger.

The problem seems to be that the utility can't find a line to plot that fits the specification. My first idea would be that the problem is that U is probably a vector. Then it would be a bug. Or the problem is that you specified the postProcessing-directory as the case (try --dir=postProcessing/sets instead).

martad November 17, 2014 01:06

Thank you for replying! I have realised that my .xy files are empty... I checked that they were created after running 'sample', but didn't open to see the content. Obviously, it can't see a line to plot, I'm sorry to have wasted your time on that.

However, the issue of 'sample' not sampling over the line persist. I have also tried appending a function in the controlDict file, and it's the same problem - it recognises the function and creates the .xy file, but no data inside (works just fine with point probes though). I've quadruple checked my coordinates, but is the coordinate system perhaps inconsistent with how we define the geometry in blockMeshDict? Any idea what might be causing this?

Thanks!

gschaider November 17, 2014 05:07

Quote:

Originally Posted by martad (Post 519489)
Thank you for replying! I have realised that my .xy files are empty... I checked that they were created after running 'sample', but didn't open to see the content. Obviously, it can't see a line to plot, I'm sorry to have wasted your time on that.

However, the issue of 'sample' not sampling over the line persist. I have also tried appending a function in the controlDict file, and it's the same problem - it recognises the function and creates the .xy file, but no data inside (works just fine with point probes though). I've quadruple checked my coordinates, but is the coordinate system perhaps inconsistent with how we define the geometry in blockMeshDict? Any idea what might be causing this?

Thanks!

You only wasted my time if the utility works if there IS data there. Have you checked that?

Anyway: have you checked the coordinates? Maybe the points you specified are outside. One way to check this is open your geometry in Paraview. Create from the "Sources"-menu a "Line". Enter the coordinates you specified and see if the line is where you expect it to be. In fact in the PyFoam-sources in the folder "examples/paraview3" there is a utility that does this for you. But it is unsupported and I haven't used it for some time so I'm not sure whether it works with current PV-versions


All times are GMT -4. The time now is 06:36.