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

More
3 years 2 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
3 years 2 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
3 years 2 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
3 years 2 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
3 years 2 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.104 seconds