|
[Sponsors] |
[OpenFOAM] Problem with the cylindrical coordinates on Paraview |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
Maxime Lecomte
Join Date: Jul 2020
Posts: 2
Rep Power: 0 ![]() |
Hello everyone,
I am a trainee in hydraulics and new to OpenFOAM and Paraview. In my projects I have to visualize my results in Paraview using cylindrical components of the velocity. I found on the internet this macro that permits to convert into cylindrical coordinates : import vtk input = self.GetInput() output = self.GetOutput() transform = vtk.vtkCylindricalTransform() transformFilter = vtk.vtkTransformFilter() transformFilter.SetInputData(input) transformFilter.SetTransform(transform.GetInverse( )) transformFilter.Update() output.ShallowCopy(transformFilter.GetOutput()) When I run the macro I have this error : File '<string>', line 3, in <module> NameError: name 'self' is not defined I am not an expert in Python and I don't understand the error and how to resolve it. Anyone have a solution ? Thank you very much and have a good day. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Mikko
Join Date: Jul 2014
Location: The Hague, The Netherlands
Posts: 243
Rep Power: 13 ![]() |
Hi Maxime,
The script should be used in Programmable Filter. Best, Mikko |
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
Maxime Lecomte
Join Date: Jul 2020
Posts: 2
Rep Power: 0 ![]() |
Hello Mikko and thank you for your reply
Is the code the same as a programmable filter ? It seems that paraview don't like the shallow copy function Thanks Maxime |
|
![]() |
![]() |
![]() |
Tags |
cylindrical coordinates, paraview 5.0.1, python script |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] Openfoam for windows 16.02 [CFD support] -problem with paraview | ditmeyer | OpenFOAM Installation | 3 | May 15, 2017 12:04 |
[OpenFOAM] Problem switching from terminal to paraView | Maxime Thomas | ParaView | 10 | October 4, 2014 10:59 |
[OpenFOAM] Paraview display problem | jiejie | ParaView | 4 | October 13, 2013 21:29 |
Yet another Paraview problem | gascortado | OpenFOAM | 5 | February 21, 2010 06:39 |
cylindrical coordinates at thita=0 | George | Main CFD Forum | 6 | May 4, 2006 08:40 |