|
[Sponsors] |
August 5, 2013, 05:49 |
Normalizing data
|
#1 | |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,396
Rep Power: 46 |
This question is so basic that I almost dont dare to ask.
How can I produce "normalized" variables directly in ParaView? Say I have a scalar field "Velocity_X" on a Multi-block Dataset and I want to divide it by its maximum or average value. The intuitive way with a calculator expression Velocity_X/max(Velocity_X) does not work/results in an error. Quote:
Versions I tried are 3.14 and 3.98 Last edited by flotus1; August 5, 2013 at 18:09. |
||
August 6, 2013, 10:30 |
|
#2 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,396
Rep Power: 46 |
Any Ideas?
If this is a RTFM-question please tell me, then I can continue to search for the answer myself. Otherwise I would appreciate any hint that can guide me towards a solution. |
|
August 18, 2013, 20:55 |
|
#3 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Hi Alex,
What you're looking for is the filter "Python Calculator" and then you can use the expression: Code:
U/max(U) Best regards, Bruno
__________________
|
|
August 29, 2013, 04:28 |
|
#4 |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,396
Rep Power: 46 |
Thank you so much.
It took me a while to figure out how to access single components of vectors, but now it works like a charm. |
|
September 3, 2013, 11:23 |
|
#5 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
Hi Alex
how could you do that? @Bruno: what python code should add in paraview?
__________________
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 3, 2013, 16:08 |
|
#6 | |
Super Moderator
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,396
Rep Power: 46 |
The wiki covers this topic:
http://www.paraview.org/Wiki/ParaVie...hon_Calculator Quote:
|
||
September 3, 2013, 16:33 |
|
#7 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
what's its difference from ordinary calculator filter?is there anything on top of working with components of vectors?
and how can I have a field of area's of cells?
__________________
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 3, 2013, 16:59 |
|
#8 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26 |
I used this expression,but that error is shown.
Code:
area(inputs[2]) Code:
Traceback (most recent call last): File "<string>", line 19, in <module> File "<string>", line 146, in RequestData NameError: name 'Normals' is not defined Traceback (most recent call last): File "<string>", line 19, in <module> File "<string>", line 146, in RequestData NameError: name 'Normals' is not defined Traceback (most recent call last): File "<string>", line 19, in <module> File "<string>", line 146, in RequestData NameError: name 'Normals' is not defined Traceback (most recent call last): File "<string>", line 19, in <module> File "<string>", line 153, in RequestData TypeError: area() takes exactly 1 argument (0 given) Traceback (most recent call last): File "<string>", line 19, in <module> File "<string>", line 153, in RequestData TypeError: area() takes exactly 1 argument (0 given) ERROR: In /home/opencfd/OpenFOAM/ThirdParty-dev/ParaView-3.12.0/VTK/Filtering/vtkDataSet.cxx, line 405 vtkUnstructuredGrid (0x51fcb80): Point array result with 1 components, only has 37800 tuples but there are 77440 points Traceback (most recent call last): File "<string>", line 19, in <module> File "<string>", line 153, in RequestData IndexError: list index out of range
__________________
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 7, 2013, 12:51 |
|
#9 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
Quote:
Code:
area(inputs[0]) Bruno edit: Further discussion on this topic is being done here: http://www.cfd-online.com/Forums/par...alculator.html
__________________
Last edited by wyldckat; September 7, 2013 at 13:07. Reason: see |
||
August 6, 2018, 07:48 |
rescaling axes grid while displaying contours or vectors
|
#10 |
Senior Member
vidyadhar
Join Date: Jul 2016
Posts: 138
Rep Power: 9 |
Hi Bruno,
I want to show temperature contours in paraview. But, I want to display re-scaled or non-dimensionalized axes. I tried in using 'x axes custom labels' under 'Axes Grid'. But I am unsuccessful. I request you to help me how to do this. Thanks in advance! Last edited by vidyadhar; August 6, 2018 at 07:49. Reason: title was not included earlier |
|
August 17, 2018, 17:28 |
|
#11 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Quick answer: If I understood you correctly, the trick is fairly simple: apply the "Transform" filter to the "contours" entry in the "Pipeline Browser". The idea is that you need to physically apply the offset position to place the 3D object where you want it and then also apply scale factors to it. You may need to apply 2 "Transform" filters, one hanging to the other, so that you can first do one operation and then do the other one.
|
|
August 18, 2018, 06:35 |
|
#12 |
Senior Member
vidyadhar
Join Date: Jul 2016
Posts: 138
Rep Power: 9 |
Thank you Bruno,
I could re-scale my coordinates using Data Scale option under Data Transform in the Axes Grid available under View(Render View). Thanks for your reply too. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[OpenFOAM] Paraview doesn't seem to be picking up data generated by icofoam | MikeHersee | ParaView | 2 | January 6, 2015 09:27 |
Data Produced From Fine Marine Cant Match with The Experimental Data | PeiSan | Fidelity CFD | 4 | August 23, 2014 06:33 |
Problem running in parralel | Val | OpenFOAM Running, Solving & CFD | 1 | June 12, 2014 03:47 |
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem | Attesz | OpenFOAM Meshing & Mesh Conversion | 12 | May 2, 2013 11:52 |
How to update polyPatchbs localPoints | liu | OpenFOAM Running, Solving & CFD | 6 | December 30, 2005 18:27 |