|
[Sponsors] |
[General] Get the velocity values of a streamline |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 12, 2016, 07:59 |
Get the velocity values of a streamline
|
#1 |
New Member
Pierre Bobillier
Join Date: May 2012
Posts: 1
Rep Power: 0 |
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] What did I missed ?! |
|
|
|
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 |