Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

VTK file for visualisation of stream line in paraview

More
3 years 1 week ago #3685 by Younghigh
Hi,

After running the following code:
Code:
V = VectorL2(mesh, order=2, dgjumps=True) Q = L2(mesh, order=1, dgjumps=True) X = FESpace([V,Q]) ... gfu = GridFunction(X) ... uh, ph = gfu.components vtk = VTKOutput(ma=mesh, coefs=[uh,uh[0],uh[1],ph,grad(uh)[0,0]+grad(uh)[1,1]],\ names=["velsol","usol","vsol","psol","divsol"], filename="plot_ex", subdivision=3) vtk.Do()
I cannot see the stream line graph of the velocity field but just a plane plot of Norm(uh). How can we recieve stream line graph, i.e., a vector graph with vector-valued (uh[0], uh[1]) in VTKOutput(...)?

Best,
Di Yang
More
3 years 1 week ago #3686 by schruste
Hi Di Yang,

This is not a problem of ngsolve or vtk, it's a Paraview thing (you can also find it in the forum several times). Paraview only treats 3D vector fields for streamlines and other filters. So, extend your 2D by a third component and you are fine. You can do this during export or on the Paraview side using the Calculator filter.

Best,
Christoph
The following user(s) said Thank You: Younghigh
Time to create page: 0.124 seconds