Hello,<br><br>I wrote a python script to integrate a quantity defined in a calculator. I&#39;d like to perform the computation for all time steps, <br>but I  just have zero values for all time steps after the first one.  Someone would know it?<br>
This is my try:<br><br>#!/cluster/apps/paraview/bin/pvpython<br>try: paraview.simple<br>except: from paraview.simple import *<br><br>casefile = &#39;/home/piccinini/work/sygma_head/v02/movel/paraview/SYG2.CASE&#39;<br><br>
CASE = EnSightReader( CaseFileName=casefile )   #Read ENSI case<br>CASE.CellArrays = [&#39;SVEL&#39;, &#39;P&#39;, &#39;PTER&#39;, &#39;TE&#39;, &#39;ED&#39;, &#39;T&#39;]<br>tsteps = CASE.TimestepValues                    #Get timesteps<br>
print len(tsteps)<br>Show()<br><br>PointData = CellDatatoPointData(PassCellData=1)                #Convert to cell data<br><br>valveCurtain = Slice( SliceType=&quot;Plane&quot; )<br>valveCurtain.SliceType.Origin = [0, 0, 0.015]<br>
valveCurtain.SliceType.Normal = [0.0, 0.0, 1.0]<br><br>LzF = Calculator()<br>LzF.AttributeMode = &#39;point_data&#39;<br>LzF.Function = &#39;(coordsX*SVEL_Y-coordsY*SVEL_X)*SVEL_Z&#39;<br>LzF.ResultArrayName = &#39;LzF&#39;<br>
<br>for t in tsteps:<br>    print &#39;Time (s) = &#39;,t<br>    RV1 = GetRenderView()<br>    RV1.ViewTime = t<br>    <br>    RV1.CameraViewUp = [0.0, 0.0, 1.0]<br>    RV1.CameraPosition = [-0.080070000141859055, -1.1188103732684673, 0.027209000661969185]<br>
    RV1.CameraFocalPoint = [-0.080070000141859055, -0.078404996544122696, 0.027209000661969185]<br>    RV1.CameraClippingRange = [0.74661537378502163, 1.4127359813330285]<br><br>    <br>    Render()<br>    Show()<br>    <br>
    valveCurtainIntegral = IntegrateVariables()<br>    data = servermanager.Fetch(valveCurtainIntegral,0)<br>    scalarData = data.GetPointData()<br>    avgVar = scalarData.GetArray(0).GetTuple1(0)<br>    <br>    print &#39;Integral value = &#39;, avgVar<br>
<br><br>--<br>Rodrigo<br>