[Paraview] How to save time series data using EnSightWriter?

Van Mierlo K. kvm at soton.ac.uk
Fri Dec 7 07:54:26 EST 2012


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()


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20121207/1f6020b5/attachment.htm>


More information about the ParaView mailing list