|
[Sponsors] |
[OpenFOAM] using the python shell in paraFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 4, 2013, 07:28 |
using the python shell in paraFoam
|
#1 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
Dear Foamers,
I encountered a problem which puzzles me now for already some days and I couldn't get a satisfying solution. Before I start with a description of my problem I give you some details about my system:
The goal:My goal is it to use the python shell of paraview and/or the trace function of paraview to generate unified output of openfoam results. The problem: with paraview the trace function works good and gives me a nice script. The python terminal starts up fine however prints an error message saying: Code:
Import Error: /usr/lib/paraview/libvtkPVVTKExtensionsPythonD.so: undefined symbol [some weird string] with paraFoam however the trace function returns me an empty editor and apparently hasn't done anything. And the python shell returns me the same error message. I read a lot in the forum the last days and my conclusion is that when paraview is installed with openfoam it doesn't have all features which are available, such as the python shell. Then I came across the blog posts of Bruno which describe in detail what to do and so on. However at some point I always got lost, whether the command Code:
rm -rf $ParaView_DIR or the command Code:
ls $ParaView_DIR that one. Or I do not find the directories where the bashrc files are stored nor the line which has to be replaced or whatever. I'm actually sure that I already stumbled over the solution at some point but couldn't identify it or didn't know how to apply it to my case. So my actual request is if somebody could point me to the right direction. If I'm wrong and this problem is new I'm glad if someone can point out the way to the solution. If you're missing some information let me know I will post it right away. so far thx for your trouble regards Colin |
|
September 7, 2013, 12:52 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Greetings Colin,
I only read a bit of your post, but I think I'm familiar with this problem. See the following links:
Bruno
__________________
|
|
September 10, 2013, 06:11 |
|
#3 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
Dear Bruno
thanks for your reply, after applying your "hack" the python shell starts up smoothly when using paraFoam. Still when using the trace tool with paraFoam I have troubles: paraFoam gets incredibly slow. I tried first to get the free surface ( I'm doing a ship hull analyses with LTSInterFoam) with the internal mesh (3.8 M cells) and it took ages both using the trace tool and not using it. The computer used approx. 2.8 GB of RAM and one core had 100% load. Then suspecting that the amount of data is too much. I only loaded the hull patch to get the phase fraction and without using the trace tool it worked fine, but still taking quite some time, however when using the trace tool again it takes ages (same symptoms as afore mentioned.) Hence my question is: is this slow down a logic consequence of using the new libraries or is this another feature of paraFoam. Again thanks for your trouble regards Colin |
|
September 10, 2013, 17:56 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Colin,
It's a bit complicated to figure this one out, without having a test case. Are you able to reproduce the same issue with one of OpenFOAM's tutorials? Perhaps after some minor modifications to one of the tutorials? Because if you are and if you can describe the steps at which the slow part occurs, I can better check this for myself and confirm if there is any solution for this. Beyond that, my guesses are:
Bruno
__________________
|
|
September 12, 2013, 10:07 |
|
#5 |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
Hi Bruno,
thanks again for your help. I'm still investigating and it will also take some more time for my vacation are upcoming, however I have some intermediate results which I want to share:
increasing the number of cells up to over 5M. Moreover I made it a 3D case with two symmetry planes instead of the empty patches, however paraFoam worked smoothly (and the trace function of paraFoam) The only difference between my mesh and the one from the tutorial is that I used sHM and the tutorial only blockMesh. So maybe the slow down is due to the unstructured mesh that I use. In my particular case the slow down occured after choosing to display the alpha1 values on the surface. To see whether I works or aborts I let it load over night and I could figure out it really loads, but as said before it takes ages. The script I could make with this long tracing process, is working fine and doing the process much faster (like the normal time you would expect). I hope I could clarify my problem a little bit again thanks for your efforts kind regards Colin |
|
September 14, 2013, 11:54 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Colin,
Well, without a test case I can't test this myself. The only suggestion left is to try with one of the latest ParaView versions from www.paraview.org and to use it instead of the default ParaView version that OpenFOAM uses. To use it:
Best regards, Bruno
__________________
Last edited by wyldckat; September 14, 2013 at 14:01. Reason: typo |
|
September 15, 2013, 04:47 |
|
#7 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Hi Bruno
I installed 4.0.1 version.its really better and is saving animations now, it makes a movie automatically if select .ogv concurrently with saving images in the folder. how can replace it to 3.12.0 and delete that so that there be more space on disc? thanks.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
September 15, 2013, 05:53 |
|
#8 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
This is an old blog post of mine, but it should still work just fine: Using the official pre-built ParaView 3.10.1 version with OpenFOAM - keep in mind that you can skip the "download" step (the one that uses wget). But honestly, I strongly suggest to not erase the current ParaVew 3.12.0 version you've got. This is because ParaView 4.0.1 also has it's own bugs, which ParaView 3.12.0 doesn't have. Instead, if you want an easy way to launch this new ParaView version, add and adapt the following file into your "~/.bashrc" file: Code:
alias paraFoam4='(. $WM_PROJECT_DIR/etc/config/unset.sh; touch case.foam && /full/path/to/your/new/ParaView/bin/paraview --data=case.foam)' Code:
paraFoam4 Bruno
__________________
|
|
September 15, 2013, 06:38 |
|
#9 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Bruno I want to use -builtin
this is the error displayed in terminal: Code:
ehsan@Ehsan-com:~$ paraFoam4 -builtin bash: syntax error near unexpected token `-builtin' ehsan@Ehsan-com:~$ paraFoam4 ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/XMLParser/vtkXMLParser.cxx, line 483 vtkPVXMLParser (0x1785a50): Error parsing XML in stream at line 74, column 6, byte index 3360: unclosed token ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 8464 vtkPOpenFOAMReader (0x305ec80): /home/ehsan/case.foam contains no timestep data. ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 754 vtkPVCompositeDataPipeline (0x3066de0): Algorithm vtkPOpenFOAMReader(0x305ec80) returned failure for request: vtkInformation (0x306fbd0) Debug: Off Modified Time: 111082 Reference Count: 1 Registered Events: (none) Request: REQUEST_INFORMATION FORWARD_DIRECTION: 0 ALGORITHM_AFTER_FORWARD: 1 Code:
ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 8464 vtkPOpenFOAMReader (0x305ec80): /home/ehsan/case.foam contains no timestep data. ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/Common/ExecutionModel/vtkExecutive.cxx, line 754 vtkPVCompositeDataPipeline (0x3066de0): Algorithm vtkPOpenFOAMReader(0x305ec80) returned failure for request: vtkInformation (0x306fbd0) Debug: Off Modified Time: 111082 Reference Count: 1 Registered Events: (none) Request: REQUEST_INFORMATION FORWARD_DIRECTION: 0 ALGORITHM_AFTER_FORWARD: 1
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
September 15, 2013, 06:54 |
|
#10 | |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Quote:
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
||
September 15, 2013, 07:12 |
|
#11 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Quote:
Code:
rm -rf $ParaView_DIR
__________________
|
||
September 15, 2013, 07:40 |
|
#12 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
OK,then I better to open paraview with paraFoam4 and open the case.foam and choose Decomposed Case,right?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
October 4, 2013, 06:36 |
|
#13 | |
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 19 |
Hi Bruno,
thanks for your new suggestions and your efforts you put into my questions. Quote:
confidential. So far I haven't tried one of your new suggestions yet, however I think I forgot to mention a crucial detail: I'm calculating on a virtual-machine. And I think that the troubles may come from the 3D acceleration which was not activated. Now I have activated it, but have troubles to install the guest-additions, but as soon as I have solved that, I will try again and see whether paraFoam works and will also try your suggestions, if not. thanks again for your efforts regards |
||
October 5, 2013, 02:40 |
|
#14 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,982
Blog Entries: 45
Rep Power: 128 |
Hi Colin,
Quote:
Quote:
You can use ParaView's internal ".foam" reader to process the data on your real machine. Simply:
Best regards, Bruno
__________________
|
|||
September 14, 2015, 10:04 |
|
#15 | |
Senior Member
|
Just pitching in :
Quote:
For me, this did not work on either the default OpenFOAM-2.4.x paraview nor on the 4.3.1 downloaded compiled version. What worked was to rebuilt paraview from the makeParaview4 script with the -mpi option, for which I was also able to build even for the 4.3.1 sources downloaded from the paraview website. Finally, different methods to run paraview in parallel are given on the following website: http://daac.hpc.mil/software/ParaVie...rocessors.html Regards, -Louis |
||
Tags |
parafoam, python, shell, trace |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Paraview from python shell : Glew initialization and VTKcommoncorepython error | pradyumnsingh | ParaView | 0 | September 18, 2018 14:40 |
[OpenFOAM] Integrate Variables using ParaView Python Shell | cfdsolver1 | ParaView | 0 | October 12, 2016 04:08 |
[General] Python Shell button is diabled | JPW | ParaView | 4 | November 8, 2015 15:51 |
How to get Python Shell into ParaView 3.8.1? | blaise | OpenFOAM Installation | 3 | July 24, 2012 05:58 |
python scripting in paraFoam | chegdan | OpenFOAM Post-Processing | 0 | March 31, 2010 20:06 |