|
[Sponsors] |
![]() |
![]() |
#261 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
Just to clarify: the purpose of the frequency-option is "only redo the plot every x seconds" the purpose of this is that otherwise for small runs with a lot of timesteps the plotting becomes more time-consuming than the actual calculation (because the plotting would occur several times a second) |
||
![]() |
![]() |
![]() |
![]() |
#262 | |
Senior Member
|
Quote:
__________________
Amir |
||
![]() |
![]() |
![]() |
![]() |
#263 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 15 ![]() |
Hi all!
I want to extend the pyFoamPlotWatcher so it also plots the phase fraction. I have an inlet in my computation so it would be nice to see that. As the structure is rather complex i wanted to ask for a hint, where it makes sense to add this function. I have my own (bash)script which gives me this plot, but as a post processing step, and not during runtime. So I think it cant be too difficult to integrate that. Thanks for any hints! |
|
![]() |
![]() |
![]() |
![]() |
#264 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
Adding application-specific patterns to PyFoam itself will decrease its overall performance as it will look for that pattern in every line even if the solver doesn't write such a line (and looking for these patterns is currently the bottleneck in the pyFoamWatcher anyway) Bernhard |
||
![]() |
![]() |
![]() |
![]() |
#265 |
Senior Member
Join Date: Nov 2010
Posts: 113
Rep Power: 15 ![]() |
Hi Bernhard,
reasonable.. nothing more to say ![]() Best wishes |
|
![]() |
![]() |
![]() |
![]() |
#266 |
Member
Aniko Rakai
Join Date: Oct 2009
Location: Geneva
Posts: 30
Rep Power: 16 ![]() |
Hi,
after some time of foaming I found some time to investigate pyFoam and I wish it have happened earlier, thank you for it. However I have a problem which seems to be some quotation mark issue or similar, using the templates from the advanced Gothenburg training: Code:
rakai@lab1:~/OpenFOAM/rakai-2.0.0/run/pyFoamAdvanced/pyFoamAdvanced.git/testSeparator$ pyFoamFromTemplate.py constant/polyMesh/blockMeshDict "{'preLen':0.2, 'cavitiyWidth':0.15, 'channelHeight':0.1, 'interLen':0.05, 'cavityDepth':0.02, 'dx':0.005}" Traceback (most recent call last): File "/home/rakai/my_python/bin/pyFoamFromTemplate.py", line 5, in <module> FromTemplate() File "/home/rakai/my_python/lib/python2.6/site-packages/PyFoam/Applications/FromTemplate.py", line 30, in __init__ interspersed=True) File "/home/rakai/my_python/lib/python2.6/site-packages/PyFoam/Applications/PyFoamApplication.py", line 213, in __init__ result=self.run() File "/home/rakai/my_python/lib/python2.6/site-packages/PyFoam/Applications/FromTemplate.py", line 60, in run t.writeToFile(fName,vals) File "/home/rakai/my_python/lib/python2.6/site-packages/PyFoam/Basics/TemplateFile.py", line 44, in writeToFile output=self.getString(vals) File "/home/rakai/my_python/lib/python2.6/site-packages/PyFoam/Basics/TemplateFile.py", line 54, in getString symbols=vals.copy() AttributeError: 'str' object has no attribute 'copy' Any hints? Thank you Aniko |
|
![]() |
![]() |
![]() |
![]() |
#267 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
Best fix I can offer is: go to FromTemplate.py and add the lines with the + (but without the +) after the other two lines: Code:
fName=self.parser.getArgs()[0] vals=eval(self.parser.getArgs()[1]) + if type(vals)==str: + # fix a problem with certain shells + vals=eval(vals) |
||
![]() |
![]() |
![]() |
![]() |
#268 |
Member
Aniko Rakai
Join Date: Oct 2009
Location: Geneva
Posts: 30
Rep Power: 16 ![]() |
Thank you, adding the + lines solved the problem.
The --values-string option I tried but does not work, I am using pyFoam-Version: 0.5.7. Code:
pyFoamFromTemplate.py: error: no such option: --values-string |
|
![]() |
![]() |
![]() |
![]() |
#269 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
OK. Then this is something to come with the next version (along with a new template engine that allows branches and loops)
|
|
![]() |
![]() |
![]() |
![]() |
#270 |
Senior Member
Daniel WEI (老魏)
Join Date: Mar 2009
Location: Beijing, China
Posts: 689
Blog Entries: 9
Rep Power: 21 ![]() |
Btw, can pyfoam be used via ssh if I am using a remote cluster? I installed it on the remote cluster and set the path and using ssh -Y option but there is still error.
![]()
__________________
~ Daniel WEI ------------- Boeing Research & Technology - China Beijing, China Last edited by lakeat; April 8, 2013 at 19:00. |
|
![]() |
![]() |
![]() |
![]() |
#271 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
If it is installed on the cluster: yes ("installed on the cluster": an installation in the users home directory is sufficient if PATH and PYTHONPATH are set correctly). After all it is mainly command-line utilities
__________________
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 |
|
![]() |
![]() |
![]() |
![]() |
#272 | |
Senior Member
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 13 ![]() |
hello Berrnad.
i get this error Quote:
Kind regards Izna |
||
![]() |
![]() |
![]() |
![]() |
#273 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
pyFoamVersion.py will show that you have no numpy installed. Install it via the package manager of your distribution (usually it is called python-numpy or so)
__________________
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 |
|
![]() |
![]() |
![]() |
![]() |
#274 |
Senior Member
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 13 ![]() |
hi Bernard.. Even on installing all these i get the error that nympypy does nto exist..
I have found a case on the net and i wish to run ./Allrun and view it but try as i might it is not working.. i am sending you the case. http://openfoamwiki.net/index.php/Fi...emplate.tar.gz Apparently this use the pyfoam library.. Kind regard izna |
|
![]() |
![]() |
![]() |
![]() |
#275 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 ![]() ![]() |
Quote:
To check that numpy is not installed try Code:
python -c "import numpy;print numpy.__version__"
__________________
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 |
||
![]() |
![]() |
![]() |
![]() |
#276 | ||
Senior Member
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 13 ![]() |
hi Bernard
NUmpy has been installed Quote:
Quote:
|
|||
![]() |
![]() |
![]() |
![]() |
#277 |
Senior Member
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 13 ![]() |
hi again bernard
By the way i am running this case which i found from the internet... |
|
![]() |
![]() |
![]() |
![]() |
#278 |
Senior Member
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 13 ![]() |
attached is the case..If you wish to check it out..
|
|
![]() |
![]() |
![]() |
![]() |
#279 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,978
Blog Entries: 45
Rep Power: 128 ![]() ![]() ![]() ![]() ![]() ![]() |
Greetings to all!
@Izna: Clearly the problem is that gnuplot is not installed: Quote:
Code:
sudo apt-get install gnuplot Bruno
__________________
|
||
![]() |
![]() |
![]() |
![]() |
#280 | |
Senior Member
izna O'connor
Join Date: Jun 2013
Posts: 143
Rep Power: 13 ![]() |
Hi Bruno...
After having installed the application i get errors still Quote:
|
||
![]() |
![]() |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Divergence detected in AMG solver: k when udf loaded | google9002 | Fluent UDF and Scheme Programming | 3 | November 7, 2019 23:34 |
udf problem | jane | Fluent UDF and Scheme Programming | 37 | February 20, 2018 04:17 |
Guide: Getting Started with the CFD Online Discussion Forums | pete | Site Help, Feedback & Discussions | 8 | July 29, 2016 05:00 |
Error messages | atg | enGrid | 7 | August 30, 2013 11:16 |
Phase locked average in run time | panara | OpenFOAM | 2 | February 20, 2008 14:37 |