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.

Can the NGSolve provide other file forms for output data expect ".vtk"?

More
2 years 8 months ago #3920 by Younghigh
Dear all,

I have obtained a set of data including discrete velocity and pressure from solving the Navier-Stokes equations. I know only how to output them by a vtk file, which cannot work on Tecplot. So, there are other file forms, like .dat, .plt., which can applied on Tecplot? If yes, what are their commands?
PS: the following is an example of outputing discrete data:
Code:
vel = gfu.components[0] vtk = VTKOutput(ma=mesh, coefs=[vel], names=["velocity"],\ filename="velocity", subdivision=2) vtk.Do()

Kind regards,

Di Yang
More
2 years 8 months ago #3921 by hvwahl
Hi Di Yang,

unless you initialise the VTKOutput with legacy=True, VTU files will now be written (if you have a relatively new version of NGSolve), which I believe tecplot can open.

Best wishes,
Henry
More
2 years 8 months ago #3922 by Younghigh
Hi Henry,

Thank you for your reply. I have no idea of initialising the VTKOutput with legacy=True. What is the command in detail? Because the following command
Code:
vtk = VTKOutput(legacy=True, ma=mesh, coefs=[v100], names=["v100"],\ filename="velocity", subdivision=2) vtk.Do()
is not correct.

Best,

Di Yang
More
2 years 7 months ago #3923 by hvwahl
Hi Di Yang,

in principle
Code:
vtk = VTKOutput(ma=mesh, coefs=[v100], names=["v100"], filename="velocity", subdivision=2) vtk.Do()
is correct. Adding the legacy=True argument will write vtk files (rather than vtu). However, the vtu output is very new! You need a nightly build of NGSolve or build from the current master branch, as this update to the VTKOutput was introduced after the release of v6.2.2004.

Best wishes,
Henry
The following user(s) said Thank You: Younghigh
More
2 years 7 months ago #3924 by Younghigh
Hi Henry,

In Paraview, vtk files can be tranformed into vtu files. Thank u.

Best,

Di
Time to create page: 0.108 seconds