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] DecomposePar arbitrary Timestep (https://www.cfd-online.com/Forums/openfoam-community-contributions/98461-decomposepar-arbitrary-timestep.html)

elys March 12, 2012 04:02

DecomposePar arbitrary Timestep
 
Dear forum,

I was looking into pyFoam and like it a lot. However, I have difficulties with pyFoamDecompose.py if I want to decompose a case at a certain timestep and not the last one. I couldnt find an option to do so within the wiki or --help. Does anybody has a suggestion to solve this problem? And a second question: Beside that parallel runs are automatically reconstructed, is there also a script to do so in pyFoam (with certain time steps)??

Thanks in advance,

Ben

gschaider March 12, 2012 18:47

Quote:

Originally Posted by elys (Post 348880)
Dear forum,

I was looking into pyFoam and like it a lot. However, I have difficulties with pyFoamDecompose.py if I want to decompose a case at a certain timestep and not the last one. I couldnt find an option to do so within the wiki or --help. Does anybody has a suggestion to solve this problem? And a second question: Beside that parallel runs are automatically reconstructed, is there also a script to do so in pyFoam (with certain time steps)??

Thanks in advance,

Ben

Selecting the timestep is currently not supported by this utility (but can be if a feature request shows up on the openfoam-extend-Mantis). As a workaround you can use it with the --no-decompose-option to just generate decomposeParDict and then call decomposePar with the appropriate time-options

elys March 13, 2012 02:27

Thanks Bernhard for the explanation! The workaround will do.

Best,

Ben

SD@TUB March 13, 2012 09:10

Decomposing GGI case
 
Hello,

Sorry, that i chime in with my problem of decomposing a case for GGI with, e.g.
Code:

pyFoamDecompose.py --globalFaceZones='( insideZone outsideZone )' . 4
followed with error:
Quote:

Traceback (most recent call last):
File "/usr/local/bin/pyFoamDecompose.py", line 5, in <module>
Decomposer()
File "/usr/local/lib/python2.6/dist-packages/PyFoam/Applications/Decomposer.py", line 40, in __init__
nr=2)
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/Decomposer.py", line 162, in run
fZones=eval(self.opts.globalFaceZones)
File "<string>", line 1
( insideZone outsideZone )
^
SyntaxError: invalid syntax
What is the problem? Help message stats:
--globalFaceZones=GLOBALFACEZONES
Global face zones. A python string. Used for the GGI interface. Ex: '(GGI_Z1 GGI_Z2)'


I tried different expressions. I am using pyFoam 0.5.6 on Debian Squeeze with Python 2.6.6.
Thank you very much in advance!


/Stefan

gschaider March 13, 2012 18:20

Quote:

Originally Posted by SD@TUB (Post 349175)
Hello,

Sorry, that i chime in with my problem of decomposing a case for GGI with, e.g.
Code:

pyFoamDecompose.py --globalFaceZones='( insideZone outsideZone )' . 4
followed with error:


What is the problem? Help message stats:
--globalFaceZones=GLOBALFACEZONES
Global face zones. A python string. Used for the GGI interface. Ex: '(GGI_Z1 GGI_Z2)'


I tried different expressions. I am using pyFoam 0.5.6 on Debian Squeeze with Python 2.6.6.
Thank you very much in advance!


/Stefan

I think the description is inconsistent with what is actually needed. Try

'["GGI_Z1","GG1_Z2"]'

SD@TUB March 14, 2012 03:37

Thanks a bunch! It is working.

/Stefan

gschaider March 14, 2012 05:07

Quote:

Originally Posted by SD@TUB (Post 349339)
Thanks a bunch! It is working.

/Stefan

OK. I'll adapt the help-message accordingly (for this time without a bug-report ;) )


All times are GMT -4. The time now is 23:15.