|August 6, 2014, 11:08||
How to move a slice following the particle coordinates (defined in a text file)?
Join Date: Aug 2014
Posts: 4Rep Power: 3
I would like to know how to define the origin property of a "slice filter" using a specific sphere's center (with its coordinates)?.
Until now, I am able to slice with the "slice filter" and I fix the values manually. But I would like a way to make it automatically. The goal is try to create an animation that only shows the intersection plane (that it moves with the choosen particle).
Some idea? Thanks in advance.
|March 29, 2015, 11:10||
Join Date: Aug 2012
Blog Entries: 1Rep Power: 5
Did you ever figure this our Bomcar? I'm trying to do the same thing.
You can do it with a programmable filter, but the details are a bit tricky. Here's some example code that does something similar:
I think the code above is supposed to create a slice through the center of an object independent of the object's location. So, if the object moves, the slice moves. We want to do the same thing, but the slice should be applied to the volume field data rather than the object itself.
Anyway, hope you were able to figure something out. I'll post back if I get results.
For my case, this script works. I am using Lagrangian particle cloud data to drive the position of a slice that cuts through the fluid domain. I apply the "Programmable Filter" to the Lagrangian data and run:
from paraview import simple input0=inputs x = input0.GetPoints()._Arrays y = input0.GetPoints()._Arrays z = input0.GetPoints()._Arrays print (x, y, z) slice1 = simple.FindSource('Slice1') slice1.SliceType.Origin = [x, y, z]
The only problem is the script fails to run in client-server mode, giving me the error:
Last edited by Nucleophobe; March 29, 2015 at 17:59. Reason: Found a (partial) solution
|animation, paraview, slice|
|Thread||Thread Starter||Forum||Replies||Last Post|
|"parabolicVelocity" in OpenFoam 2.1.0 ?||sawyer86||OpenFOAM Running, Solving & CFD||21||February 7, 2012 12:44|
|mesh airfoil NACA0012||anand_30||OpenFOAM Meshing & Mesh Conversion||12||December 12, 2011 05:16|
|ParaView Compilation||jakaranda||OpenFOAM Installation||3||October 27, 2008 12:46|
|DxFoam reader update||hjasak||OpenFOAM Post-Processing||69||April 24, 2008 01:24|
|error while compiling the USER Sub routine||CFD user||CFX||3||November 25, 2002 16:16|