[ParaView] Programmable Filter to repeat 2 degree segments
Hey all
I am simulating an axisymmetric problem with a 2 degree wedge representation. In postprocessing, using paraview, I want to repeat this 2 degree segment such that I get a full 3D Domain (primarily to retrieve the streamlines). I found that this should be achievable using the programmable filter in paraview but since I am not familiar with Python this is a bit difficult. I came up with the following code: (making sure that the input is a single data set and the output format is set to multiblock): Code:
from paraview import vtk Any help will be appreciated :) |
Anyone? :confused:
|
Greetings Laurensvd,
If you had posted on the sub-forum for ParaView (http://www.cfd-online.com/Forums/openfoam-paraview/), I would have picked up on this a lot sooner ;). You don't need to make a shallow copy of the initial object. Simply apply several transformation filters to the main object! "Tools->Start trace" can aid you with this as well, namely the stages of opening a file and then transforming. By using a "cone" object as a source and the Python tracing strategy, I've adapted the resulting macro and made this small script (save in a file with the extension ".py"): Code:
try: paraview.simple If you then need to do more post-processing on it, select them all and use the filter "Group Datasets". Best regards, Bruno |
Thank you very much :)
The source code above still had a few minor flaws but the start/stop trace helped me with that. For those who are interested the final code is: Code:
try: paraview.simple |
All times are GMT -4. The time now is 20:50. |