ANSYS Static Structural Export format to Paraview

Did you also try exporting your model from ANSYS workbench to Nastran and loading that file instead?

I have toyed with the idea of writing a FEMAP plugin for paraview. I’m not sure how many people would use it though.

2 Likes

Not sure if this problem has been solved perfectly, it seems that the whole process is still complicated. Can paraview directly read the cdb and rst files of ansys now?

I guess ParaView still can’t read ANSYS files directly. But this problem can be solved, when it is really necessary, using APDL programming (hyperlinks above in this discussion ANSYS Static Structural Export format to Paraview - #13 by Andrei). This solution requires debugging with respect to specific finite element types in your FEM model. But if you debug it, then it will work for FEM models of a certain type.

I transferred temperature data from ansys to paraview by this method; In ansys classic, prepare node coord arrays and temperature array in ansys by fill array menu. Then use *vwrite menu command for writing formatted x,y,z and temperature data into a text file. then in ansys workbench, export the mesh into a stl file. Stl model and text data are imported into paraview. data table is transferred into point data. Finally point data can be interpolated on the stl model. I hope this is usefull for you.

I also found these youtube videos they are very helpfull for data manipulation and interpolation in paraview. thank you.

1 Like

Dear all,

I I have followed the script provided here by DaveD

How to read Ansys data files in ParaView?

But I am unable to get a result that Paraview can import. I attach a few screenshots, because several warnings came out while the script was being run. I got a vtk as output (360 MB, so I guess it contains something…), but Paraview displays the following error:

ERROR: In C:\glr\builds\paraview\paraview-ci\source-paraview\VTK\IO\Legacy\vtkUnstructuredGridReader.cxx, line 320 vtkUnstructuredGridReader (000001CECD70BC00): Unrecognized keyword: 0.00000e+00

I have never used APDL, so I will be happy if the author of the script or someone experienced using it could tell me what I did wrong (I continued clicking “yes” through all the windows and I got the output.vtk as I mentioned)

Thanks a lot in advance. Any hint will be really appreciated

I did not see the script (could you share it?) . It gives the error probably due to a typing error in the script.
Other warnings are related with redimensioning and it is normal when you run the script second time. These arrays are already defined and script tries to redim them. You should click “Yes” multiple times.

Paraview seems to find unexpected keyword. VTK file may not be written properly due to APDL error.

Hi,

The link where I downloaded the script is:

Many thanks in advance for taking the time to check it!

Other link is not reachable. I found the script from this link.

Step 1:
There are terms need to be modified in Line 217 and/or 230.
For example; for temperature
Line 217 should be modified as follows
*GET,MY_NODE_RESULTS(J),NODE, N_J , TEMP,

line 230: example element result - element name
*GET_MY_ELEM_RESULT(I),ELEM,E_I,ATTR,ENAM

If you want to transfer more data you can add new arrays between lines 46-51

step 2:
check if your element types are mapped in the E_TYPES_ANSYS_TO_VTK array
if not you should add it (there are already many elements this step may not be necessary)

step 3:
modify line 297:
(21(A8," "))

step 4:
Add “!” in line 312

you can try getting results of a single node or element from get scalar value menu command.
APDL command will be shown in the List->Files->Log-file …
you will see how the node/element results are named and thus you can modify the relevant line according to log file command line.

Arrays are allocated according the maximum node and element numbers. try renumbering (compress numbers) if you model is too big. You need to resolve the model. And you should be careful.

I think there is problem with my computer or my access to pastebin.com is blocked from my isp.
So, I worked on the script that I found, it actually works. A simple cube meshed with 3D-tet elements, simple temperature data, and element number information is transferred to paraview with success.
The scripts should be very similar. But I did not get the error you have posted.

Could you please share the script? It would help a lot.

I have mechanical variables, also with 3D tet elements, so I guess it should work

this is the link for original script

I modified some of the lines as I have commented before.
ansys_to_vtk.inp (15.7 KB)

Hello Liam did you have a chance to try the script?
For Ansys inp file is a APDL batch file. Results files are not human readable. But data can be extracted by APDL commands. APDL commands run very fast. I looked at the script. It is prepared quite good. It extracts the data and writes to the vtk file.
Only problem that can happen is; when results are requested, if that result type is not available an error may occur. In the VTK file there will be no value or a zero value. This point critical.
regards

Hi Altug,

Still unable to make it work :frowning:

You can run a small analysis model file and I can check vtk file contents?
I assume paraview and ansys are both in the same computer and same operating system.
My company have ansys workbench license but I can not share data from work.

in the vtk file;
vtk file have header;
nodes (coordinates),
cells (node numbers constructing the cells)
cell types
node data
cell data etc.

Hi Altug,

Sorry for my late reply. I have no experience in APDL.

I can share my model with you and if you find the time, you can give it a try (and maybe suggest the changes I have to make…).

Thanks for being kind and willing to help.

Hello Liam,
it is ok, send your model

Could you please send me an email to riseagainst182@hotmail.com so I can share files with you?

Thanks