vedo
vedo copied to clipboard
Using vedo to plot a slice of the 3D velocity field (dolfin simulation)
Dear all,
Is it possible to use the slicePlane utility to get a (2D) slice of a 3D velocity field computed in dolfin simulations? If so, how can I do this successfully?
Thank you in advance, kind regards,
Hi, at the moment it is not implemented for vector fields, but maybe this can useful #133
Thank you very much! Your suggestion is very useful indeed, for a 3D velocity solution I now have:
assign(uv.sub(0), u_[0])
assign(uv.sub(1), u_[1])
assign(uv.sub(2), u_[2])
plt = plot(uv,interactive=False)
vmesh = plt.actors[0].lineWidth(0)
vmesh.cutWithPlane(origin=(0,0.0125,0), normal=(0,1,0))
plot(vmesh,viewup='z', interactive=False)
show(camera={'pos':(0.04,-0.3,0.05),'focalPoint':(0.04,0.0125,0.05)})
This works flawlessly according to my needs. The rendering takes approx 20 because the mesh is consisting of many points, so I will see if I can find a way to plot a smaller amount of data points.