using the python shell in paraFoam
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:
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 |
Greetings Colin,
I only read a bit of your post, but I think I'm familiar with this problem. See the following links:
Bruno |
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 |
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 |
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 |
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 |
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.:eek: :D how can replace it to 3.12.0 and delete that so that there be more space on disc? thanks. |
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 |
Bruno I want to use -builtin
this is the error displayed in terminal: Code:
ehsan@Ehsan-com:~$ paraFoam4 -builtin Code:
ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/IO/Geometry/vtkOpenFOAMReader.cxx, line 8464 |
Quote:
|
Quote:
Code:
rm -rf $ParaView_DIR |
OK,then I better to open paraview with paraFoam4 and open the case.foam and choose Decomposed Case,right?
|
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 |
Hi Colin,
Quote:
Quote:
You can use ParaView's internal ".foam" reader to process the data on your real machine. Simply:
Best regards, Bruno |
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 |
All times are GMT -4. The time now is 14:57. |