Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12
Hi Foamers,
It seems that "Automatically Rescale to Fit Data Range" does not work in compiled ParaView 3.12 for OpenFoam 2.1.1. This issue was always bugging me, especially when comes to saving "Animation". System: Ubuntu 12.04 32-bit, OF 2.1.1, paraview 3.12 PV settings: 1) Edit --> Settings: Rescale Data Range Mode -->Grow every timestep 2) Color scale editor: Automatically Rescale to Fit Data Range is on When playing saved results, the value of selected colour legend is rising while the max. exceeds the current max.. However, when the current max value drops, the max. value of the colour legend does not change! This causes saved animations has same colour of selected fields (pressure or velocity) especially a very high value of magnitude takes places in few timesteps. For example, if i wanna make a animation of propagation of water waves over slope, the max. velocity of wave during the overall simulation is c.a 12 m/s, while the estimated average velocity is 4~6 m/s, so the contour colour of most screen-shots looks the same and could not figure out the Velocity Fields. 1. Animation screenshot (It is difficult to find out the max velocity.) http://24.media.tumblr.com/c5416f7c2...saho1_1280.png 2. Manually press the "Rescale to Data Range" button (expected output) http://24.media.tumblr.com/f6927b4a1...saho2_1280.png Having searched through the forum but could not find the solution. Has some one faced this annoying issue and solved it? Best, David |
1 Attachment(s)
Greetings David,
Many thanks for the thorough explanation! Here's what I've managed to figure out:
Bruno |
Quote:
Since the feature is not provided, is there any other hacking way to the source code that the "Rescale to Data Range" button is automatically pressed each time step? |
Quote:
Quote:
Another possibility is to do the animation purely through python scripts... ParaView does have the "Python Trace" feature, so it's just a matter of hacking the resulting macro script. But again, ParaView must be built with Python support. Said Python support depends on how you built/installed ParaView in the first place. |
hi Bruno
If 4 is better can i install Paraview 4.0 on ubuntu 11.10 or can't?! @David Hi There is a button for automatic scale change in options,check mark it. |
1 Attachment(s)
Greetings to all!
Quote:
The problem comes when you actually need to use them, namely:
Quote:
Quote:
But back on the original topic - As I wrote in the past, one needs Python built into ParaView for making the following technique to work. I only managed to look into this today, because since yesterday I've been studying how to use some of of the missing ParaView features. So, to be able to get the animation to update the ranges on each iteration, one has to:
Bruno |
Hi dear Bruno
I did what you told except to using -builtin option and it didn't rescale data.should use -builttin necessarily? because I have reconstructed and deleted processor's folders.can't do anything? |
Quote:
Quote:
|
I used the code as this:
Code:
from paraview.simple import * is it incorrect to use .OpeFOAM extension? |
No, the ".OpenFOAM" file is not the problem.
We've exchanged so many emails and posts, and you still don't provide enough information... :rolleyes: What ParaView version are you using and is there any error message? |
paraView 3.12.0
and each time use start paraView should add the code again?it doesn't save for me. p increases and should decrease after a time but maximum doesn't decrease to real time maximum,no there isn't any error except that paraview is closed when reaches the last time folder but saves previous images to the path. is the field with a circle on left in a point representation not cell represent,right? |
Quote:
Quote:
Quote:
|
then I should use "save state" and "load state" after I start paraView?
Quote:
Quote:
|
Quote:
Quote:
|
I forgot to say this error occurs when playing or animating in paraView in all time snapshots not only first time step due to #'s in 0 folder:
Code:
ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/IO/vtkOpenFOAMReader.cxx, line 6481 |
For other readers, I've already explained this one:
Quote:
As for this error: Quote:
I'm currently trying to figure out if there a simple fix for this. Best regards, Bruno |
OK, as implied in the previous post, the bug is related to the missing "vtk*Python.so" library files. This post is meant to fix this problem.
In my DropBox account is the following file (130kB): https://www.dropbox.com/s/edbrvd6xps...so.tar.gz?dl=0 - it provides the aforementioned library binaries for x86_64, built on a virtual machine with OpenSUSE 12.1 x86_64 and Python 2.7.2, which where built for this post: http://www.cfd-online.com/Forums/ope...tml#post435470 post #5 WARNING: Given that these binaries are in my DropBox account and not signed as in Ubuntu, so there is always a risk of the binaries being contaminated with something :( Nonetheless, the SHA256 of this file is: Code:
0acb36947b1f85bf8f3e6d0d6b2958bd602527cee00a15953fd32de566a1fc4e ParaView-3.12.0-vtk_Python_so.tar.gz Code:
sha256sum ParaView-3.12.0-vtk_Python_so.tar.gz Code:
sudo tar -xf ParaView-3.12.0-vtk_Python_so.tar.gz -C/opt/paraviewopenfoam3120/lib/paraview-3.12 -------------------- At the request sent to me over private message, here is the 32bit version of the "vtk*Python.so" library files: https://www.dropbox.com/s/xeon94tor1...so-i686.tar.gz - it was built in Ubuntu 12.04 i686, which uses Python 2.7.3. The SHA256 of this file is: Code:
2874b682999075462dd131aa0aa81994fc10a273e4e7ea8253d53752089d9910 ParaView-3.12.0-vtk_Python_so-i686.tar.gz |
With the previous post, the bug is fixed. The post #6 has been updated with instructions on how to use the script in ParaView 3.12.0.
@Ehsan: As a result, the code you should be using is this: Code:
from paraview.simple import * |
this kind of errors is shown when play and the minimum and maximum are not correct,I have set poinData in the code:
Code:
File "<string>", line 27 |
It means that your code is broken. This is why I don't completely like Python :(
The reason is because for Python, this: Code:
def tick(self): Code:
def tick(self): Therefore, the correct complete code you want should be: Code:
from paraview.simple import * |
All times are GMT -4. The time now is 00:01. |