Hello,

I am trying to extract the surface pressure data from a large CFD dataset using 
pvbatch. I have been using the following script but it only outputs a single 
file. The filename looks like this: test.0.00000_n.Cp so it seems the writer is 
capable to output multiple timesteps. Does anyone have an idea how to change 
the script to output the full time series ?

Thanks,

Koen

try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()

DES_case = EnSightReader( CaseFileName='/temp/kvm/DES.case' )
DES_case.CellArrays = ['p']

tsteps = DES_case.TimestepValues
numpts = len(tsteps)
RenderView1 = GetRenderView()
RenderView1.ViewTime = tsteps[0]

CellDatatoPointData1 = CellDatatoPointData()
ExtractBlock1 = ExtractBlock()
ExtractBlock1.BlockIndices = [5, 6, 7, 9, 10, 11, 14, 15, 16, 20, 21, 24, 25, 
26, 27]
Tetrahedralize1 = Tetrahedralize()
MergeBlocks1 = MergeBlocks()

Calculator1 = Calculator()
Calculator1.AttributeMode = 'point_data'
Calculator1.Function = 'p/3200'
Calculator1.ResultArrayName = 'Cp'

writer1 = EnSightWriter()
writer1.GhostLevel = 0
writer1.Input = Calculator1
writer1.FileName = '/temp/kvm/test'

for i in range(numpts):
                RenderView1.ViewTime = tsteps[i]
                Render()
#             name1 = '/temp/kvm/test.' + str(i)
#             writer1.FileName = name1
                writer1.UpdatePipeline()


_______________________________________________
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

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to