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

[General] Get the velocity values of a streamline

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 12, 2016, 07:59
Default Get the velocity values of a streamline
  #1
New Member
 
Pierre Bobillier
Join Date: May 2012
Posts: 1
Rep Power: 0
lybhur is on a distinguished road
Hi all,

Here is a piece of code for a programmable filter. The idea is to get the all velocity values of each streamlines.

If you look at the streamtracer output in a spreadsheet view, and in particular the integration time column, you will notice that each streamline begin with a zero.
So to isolate each streamline, I check all the zeros of the integration time column.

Then I want to use the "j" variable to slice the velocity array


Code:
 
from vtk.numpy_interface import dataset_adapter as dsa
from vtk.numpy_interface import algorithms as algs

input0 = inputs[0]
IntegrationTime = input0.PointData["IntegrationTime"]
Velocity = input0.PointData["Velocity"]

index = algs.where(IntegrationTime==0)

j=index[0][1]

print'j value : ', j
print'j type : ', type(j)
print j[0]
I thought that the variable "j" would be an integer but I think there is a bug because here is the result I have got in the output window (picture enclosed)

What did I missed ?!
Attached Images
File Type: png output_window.png (37.6 KB, 13 views)
lybhur is offline   Reply With Quote

Reply


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
UDF comilation error. urgent help please m zubair Fluent UDF and Scheme Programming 4 February 10, 2019 11:19
[General] PDF of velocity values from a VTK file with some constraints cfdaddicted ParaView 0 October 21, 2017 05:51
[CFD-Post] velocity values from user surface iltis CFX 1 January 11, 2017 13:16
Velocity values are normal but pressure values are too big rv82 OpenFOAM Running, Solving & CFD 4 April 13, 2015 03:59
Problem with negative velocity values Andris CFX 23 September 20, 2012 08:52


All times are GMT -4. The time now is 06:31.