CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing Software > ParaView

[OpenFOAM] Problems with CSV export in python scripting

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 18, 2013, 06:10
Default Problems with CSV export in python scripting
  #1
Senior Member
 
Robert Sawko
Join Date: Mar 2009
Posts: 117
Rep Power: 22
AlmostSurelyRob will become famous soon enough
Dear All,

I am trying to extract some data file into a csv file by using the following script:
Code:
from paraview.simple import *

foamCase = servermanager.sources.OpenFOAMReader(FileName='foam.case')

view = servermanager.CreateRenderView();
myPlot=servermanager.filters.PlotOverLine(Source="High Resolution Line Source")
myPlot.Source.Point1 = [0.025, 0, 0]
myPlot.Source.Point2 = [0.025, 0.05, 0]
myPlot.Input=foamCase
myPlot.UpdatePipeline()

writer = CreateWriter("./lineData.csv",myPlot)
writer.FieldAssociation = 'Points'  
writer.UpdatePipeline()
del writer
Unofurtunately this doesn't work. I end up with the error which looks like this:
Code:
ERROR: In /home/robert/download/paraview/src/ParaView-3.98.1-source/ParaViewCore/ServerManager/Core/vtkSMWriterFactory.cxx, line 377
vtkSMWriterFactory (0x1786ca0): No matching writer found for extension: csv

Traceback (most recent call last):
  File "plot.py", line 13, in <module>
    writer.FieldAssociation = 'Points'  
AttributeError: 'NoneType' object has no attribute 'FieldAssociation'
I have found a number of post on this but nothing seems conclusive.
http://www.paraview.org/pipermail/pa...ry/023772.html
This was filed as a bug report in 2012, but it looked to me as if it should be fixed.
http://www.mail-archive.com/paraview.../msg15411.html

Please let me know if you know anything more.

For this minimal example sample utility will do the same job, but I need to make this work for a more complex script in paraView which will have csv as some of its output. Please let me know if this is a bug or if I am missing something.
AlmostSurelyRob is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Salome] Salome -> OpenFoam ( Export as unv) Problems encountered tibo11 OpenFOAM Meshing & Mesh Conversion 13 May 1, 2019 07:21
[ICEM] Problems with export 2D mesh from ICEM to FLUENT newcomer ANSYS Meshing & Geometry 54 September 20, 2014 12:40
[OpenFOAM] Paraview3 python scripting tomislav_maric ParaView 1 October 6, 2008 16:47
Tecplot Export Problems Stephen FLUENT 2 March 29, 2004 10:00
Importing I-DEAS unv file hbetb FLUENT 1 August 10, 2001 13:22


All times are GMT -4. The time now is 21:26.