CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[General] Normalizing data

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree8Likes
  • 1 Post By flotus1
  • 5 Post By wyldckat
  • 1 Post By flotus1
  • 1 Post By vidyadhar

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 5, 2013, 05:49
Unhappy Normalizing data
  #1
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,395
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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:
ERROR: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/Common/Misc/vtkFunctionParser.cxx, line 1484
vtkFunctionParser (0x4acef00): Syntax Error: two parameters separated by commas expected; see position 26

Warning: In /home/utkarsh/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/VTK/Filters/Core/vtkArrayCalculator.cxx, line 401
vtkPVArrayCalculator (0x4ecc410): An error occurred when parsing the calculator's function. See previous errors.
Edit:
Versions I tried are 3.14 and 3.98
aylalisa likes this.

Last edited by flotus1; August 5, 2013 at 18:09.
flotus1 is offline   Reply With Quote

Old   August 6, 2013, 10:30
Default
  #2
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,395
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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.
flotus1 is offline   Reply With Quote

Old   August 18, 2013, 20:55
Default
  #3
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Alex,

What you're looking for is the filter "Python Calculator" and then you can use the expression:
Code:
U/max(U)
Keep in mind that to use the "Python Calculator", you need a ParaView version built-in with Python.

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   August 29, 2013, 04:28
Default
  #4
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,395
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
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.
flotus1 is offline   Reply With Quote

Old   September 3, 2013, 11:23
Default
  #5
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   September 3, 2013, 16:08
Default
  #6
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,395
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
The wiki covers this topic:

http://www.paraview.org/Wiki/ParaVie...hon_Calculator

Quote:
A common use case in a calculator is to work on one component of an array. This can be accomplished with the following:

Normals[:, 0]
The zero here stands for the first component of the array
wyldckat likes this.
flotus1 is offline   Reply With Quote

Old   September 3, 2013, 16:33
Default
  #7
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   September 3, 2013, 16:59
Default
  #8
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 26
immortality is on a distinguished road
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.
immortality is offline   Reply With Quote

Old   September 7, 2013, 12:51
Default
  #9
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Ehsan,

Quote:
Originally Posted by immortality View Post
I used this expression,but that error is shown.
Code:
area(inputs[2])
If should be:
Code:
area(inputs[0])
Best regards,
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
wyldckat is offline   Reply With Quote

Old   August 6, 2018, 07:48
Default rescaling axes grid while displaying contours or vectors
  #10
Senior Member
 
vidyadhar
Join Date: Jul 2016
Posts: 138
Rep Power: 9
vidyadhar is on a distinguished road
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
vidyadhar is offline   Reply With Quote

Old   August 17, 2018, 17:28
Default
  #11
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quote:
Originally Posted by vidyadhar View Post
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.
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.
wyldckat is offline   Reply With Quote

Old   August 18, 2018, 06:35
Default
  #12
Senior Member
 
vidyadhar
Join Date: Jul 2016
Posts: 138
Rep Power: 9
vidyadhar is on a distinguished road
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.
wyldckat likes this.
vidyadhar is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 01:13.