Hello community,

I'm writing a pvpython script to export the 3rd component of the velocity
vector on the z-axis of my domain. Here's a fragment of the script used.
Not very refined, but does the trick.

======START OF SCRIPT
#!/bin/pvpython

try: paraview.simple
except: from paraview.simple import *

Nstep   = 500
zEnd    = 25

def velZaxis(filename):
W = list(0 for i in range(0,Nstep))
z = list(0.0 for i in range(0,Nstep))

NS_quad_vtk = OpenDataFile(filename)
PlotOverLine1 = PlotOverLine( Source="High Resolution Line Source" )
PlotOverLine1.Source.Point1 = [0.0, 0.0, 0.0]
PlotOverLine1.Source.Point2 = [0.0, 0.0, zEnd]
PlotOverLine1.Source.Resolution = Nstep
for i in range (0,Nstep):
z[i] = i*(zEnd/float(Nstep))
W[i]=servermanager.Fetch(PlotOverLine1,0).GetPointData().GetArray("U+V+W").GetTuple3(i)[2]
return z, W
======END OF SCRIPT


Now, I was wondering if someone could give me some tips on how to set the
value of zEnd based on the actual maximum value in the geometry, instead of
using a fixed value. Is there any recommended way to obtain this
information?

Thanks


------------------------------------

*Félix Salazar**[email protected] <[email protected]>*
Étudiant au doctorat - PhD Student
*École Polytechnique de Montréal*
------------------------------------
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Search the list archives at: http://markmail.org/search/?q=ParaView

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/paraview

Reply via email to