ANSYS Static Structural Export format to Paraview

Hi,
I would like to use Paraview to post process the results from ANSYS, but so far I can’t figure out a way to do that. I’d really appreciate your help :smile:

Thank you.

Hi, welcome to ParaView @HeidiYe!

ParaView has an ANSYS file reader, so I suggest trying to load whatever ANSYS results file you may have. If that doesn’t work, please report back and let us know.

Hi, thank you for getting back to me so quickly! Unfortunately it is not working for me. I have ANSYS results files in .rst format. But Paraview gave me errors when I tried to open it.

When opening the file, can you switch the “Files of type” popup menu to “ANSYS Files (*.inp)” in the file dialog window and see if that works?

It gave me errors again. :frowning:

Okay, so ParaView doesn’t support that type of file. Good to know.

This recent email forum describes how to export files from ANSYS to EnSight Gold format and how to import that into ParaView. https://www.cfd-online.com/Forums/paraview/212492-paraview-ansys.html

Does that work for you?

No. Because I am using Static structural module, but the procedures described in the email thread is for FLUENT module. :frowning: In my module I am not able to select Ensight as an output format.

Hey @HeidiYe
Did you find a way to convert ANSYS results to a format Paraview can read?

Best regards

Unfortunately no.

Hello, I am also a Ansys user, and in need to read Static Structural results from Ansys into Paraview. It its interesting that Paraview can read .inp files, because this is an “input” file format in Ansys APDL, but the “output” formats in Ansys are both .rst or optionally .cdb. A .cdb file is a format I didn’t try yet. I will test it and post it if I am successful. Regards,

Hello, I found out that the .inp file format, corresponds to:

Format: AVS UCD Format

This is an Example ASCII UCD File for a single hexahedral cell with 8 nodes. The first line header indicates 8 nodes, 1 element, 2 node attributes, 0 element attributes, 0 model attributes. In the section where attributes are defined, the first line indicates there are 2 attributes, both scalar. After the first attribute line is the list of attribute names along with their type.

8 1 2 0 0
1 0.000 0.000 1.000
2 1.000 0.000 1.000
3 1.000 1.000 1.000
4 0.000 1.000 1.000
5 0.000 0.000 0.000
6 1.000 0.000 0.000
7 1.000 1.000 0.000
8 0.000 1.000 0.000
1 1 hex 1 2 3 4 5 6 7 8
002 1 1
layer, integer
stress, real
1 1 4999.9999
2 1 18749.9999
3 1 37500.0000
4 1 56250.0000
5 0 74999.9999
6 0 93750.0001
7 0 107500.0003
8 0 5000.0001

In order to convert Ansys Mechanical APDL .res file into this format, I tried the following:
-Open the file in APDL
-Read the result
-Select all the elements in the model ALLSEL,ALL
-Write a .cdb file CDWRITE
-Write an ASCII results file with PRNSOL
-Merge both files manually in Notepad++
-Save the result with the format shown, with the .inp extension

Hope it helps!

1 Like

Hello, @jose0233 !
Did you really manage to export the model and results from Ansys MAPDL to Paraview? Perhaps you have some new experience on this topic? The idea is clear to rename the cdb file to inp. But what about the results? PRNSOL command produces regular page text, not APDL code. And what about solution times (steps)?

2 Likes

It seems that the function of importing data from ANSYS MAPDL/Workbench is inoperable, and this problem has been known for many years, as we see here: https://vtk.org/Bug/view.php?id=15160

It should be noted that the INP format is not a standard ANSYS format. Apparently, the import function works with a text file of the CDB format (renamed to INP), which contains the model building macro in the APDL language (but the file does not contain the calculation results). It is likely that @jose0233 managed to import some unusual model (perhaps it was created from legacy finite element types and created by an outdated version of ANSYS)

I suppose that today the most realistic way to transfer an ANSYS MAPDL/Workbench structural model to Paraview is to create text files of legacy VTK format from ANSYS using a macro in the APDL language. An example of such a macro is given:

1 Like

Hello @Andrei ,
Sorry for the delay in responding.
Yes, I managed to export an Ansys Mechanical model into Paraview, firstly by opening the model in Ansys MAPDL and, laboriusly, manually, exporting it from there and then converting all the data into AVS UCD file format. It is ONLY for LINEAR elements (This is, 4-node tetrahedra, 8-node hex, and so on). Again, this is very time consuming, not recommendable, but still possible.
From MAPDL:
-Export the Ansys mesh using CDWRITE command
-Export the Ansys results using the PRNSOL command
Then from any text editor:
-Process and assembly all the files into a single AVS UCD file
-Save this file with the .inp extension, and Paraview will read it with this format

I am very interested in the vtk file format, with the macro that you posted, I tried but still didnt make it work correctly, I am almost there…

On the other hand, in the video posted, it seems to me that they have a custom ACT (this is an App Customization Toolkit inside Ansys), but not all the Ansys users have access to this particular converter to VTK.

Regards

1 Like

Hello @jose0233 !
Thank you very much for the information!

Please clarify, this procedure for merging files (obtained as a result of the CDWRITE and PRNSOL commands) is only merging several files into one, or the files themselves need to be modified in some way. What description of the AVS UCD format did you use to understand this issue.

As for the APDL macro, which was mentioned above, this method generally works, but requires some adaptation in accordance with a specific problem. As for the ACT extension, I don’t know anything about it.

Hello,
I did this procedure manually, and it will be very complicated to put it in a list, because it requires the MAPDL expertise.
On the other hand, what is really intriguing is that somebody already programmed an ANSYS interface in Paraview. I tried to export ANSYS results in many different ways, but no luck . Please have a look at the attached image. Is there somebody that could clarify which ANSYS format it is already established?

Thank you

CapturaParaview

1 Like

I would suggest you look at the C++ source code for avtANSYSFileFormat

1 Like

The only native .inp reader of Paraview is AVS UCD, the other one you see are not from ParaVirew.

In any case, this Reader seems to work fine for me with sample inp file I have.

1 Like

Is it possible to share this *.inp sample file so that ANSYS users can identify what it is and how it was created. The difficulty is that * .inp files are not used in ANSYS to present the results, so users cannot understand how and in what format the results should be exported

Hello,
It finally worked! I just exported a sample MAPL mechanical model into Paraview by running the vtk.inp file from the link that @Andrei posted ! The VTK format works fine and did it for Ansys MAPDL models (and even if you have an Ansys Workbench Mechanical Model, you can always open it from MAPDL and export it).
I repeat the Link to download the converter:

1 Like