CFD Online Logo CFD Online URL
Home > Forums > ParaView

Exporting slice as csv from state

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   July 31, 2014, 00:02
Default Exporting slice as csv from state
Join Date: Jul 2011
Posts: 48
Rep Power: 8
lingdeer is on a distinguished road

I have cfd results in time and would like to obtain average velocity through a number of planes across my domains. I am writing a paraview script so that I can get all those planes in time automatically, and planning to export it as different .csv files

First I saved a state which contains:
- original volume of domain
- slice I defined at different locations at domain
- integrate variables at each slice to get average velocity

Here is a sample of my python script:
from paraview.simple import *
servermanager.LoadState("C:\\Deskktop\\State.pvsm" )

view = GetActiveView()
reader = GetActiveSource()

writer = CreateWriter("C:\\Desktop\\foo.csv", reader)
writer.FieldAssociation = "Points"
del writer

In my state file ".pvsm", I already have the integrated slice I want to export in spreadsheet view as activeview when I save the state.

When I run the script as python macro, it loads the state as spreadsheet view, but it does not export the .csv file. And it did not show any error message.

What could have possibly gone wrong?

lingdeer is offline   Reply With Quote


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
Exporting time series to CSV mpeti ParaView 2 October 7, 2013 05:05
error message cuteapathy CFX 14 March 20, 2012 07:45
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56
mass flow in is not equal to mass flow out saii CFX 2 September 18, 2009 08:07

All times are GMT -4. The time now is 04:06.