# ANSYS Static Structural Export format to Paraview

**URL:** <https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492>\
**Category:** ParaView Support\
**Created:** [March 19, 2019, 3:31pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492 "2019-03-19T15:31:41Z")\
**Posts on this page:** 18\
**Page:** 2

<div class="post-metadata">

**Author:** ![todoooo](https://discourse.paraview.org/user_avatar/discourse.paraview.org/todoooo/32/2819_2.png) [@todoooo](https://discourse.paraview.org/u/todoooo)\
**Post date:** [April 22, 2021, 11:40pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/21 "2021-04-22T23:40:31Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![peak\_liao](https://discourse.paraview.org/user_avatar/discourse.paraview.org/peak_liao/32/9093_2.png) [@peak\_liao](https://discourse.paraview.org/u/peak_liao)\
**Post date:** [April 25, 2022, 3:48pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/22 "2022-04-25T15:48:43Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Andrei](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/9fc29f/32.png) [@Andrei](https://discourse.paraview.org/u/Andrei)\
**Post date:** [April 26, 2022, 7:43am UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/23 "2022-04-26T07:43:38Z")

</div>

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](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/13)). 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.

---

<div class="post-metadata">

**Author:** ![Altug](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/e47c2d/32.png) [@Altug](https://discourse.paraview.org/u/Altug)\
**Post date:** [June 9, 2022, 6:16pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/24 "2022-06-09T18:16:28Z")

</div>

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.

[![](https://discourse.paraview.org/uploads/default/original/2X/3/3baf7823e84ea25bee7e7209905f65d75e9275fa.jpeg "ParaView map, resample, and combine different datasets [On Demand 3]") ](https://www.youtube.com/watch?v=OggPGUEgl3c)

[![](https://discourse.paraview.org/uploads/default/original/2X/0/069ad840b1222d4e408194e80a8a7dd1016f2eba.jpeg "Workflows with Programmable Filter & Source in ParaView") ](https://www.youtube.com/watch?v=MBXP7hmYatc)

---

<div class="post-metadata">

**Author:** ![RC7](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/839c29/32.png) [@RC7](https://discourse.paraview.org/u/RC7)\
**Post date:** [June 25, 2022, 3:29pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/25 "2022-06-25T15:29:40Z")

</div>

Dear all,

I I have followed the script provided here by DaveD

[How to read Ansys data files in ParaView?](https://stackoverflow.com/questions/41722822/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

 ![ggg](https://discourse.paraview.org/uploads/default/original/2X/c/c8d107149cb52fd9b747ecd02fd89322e86787d3.png)

---

<div class="post-metadata">

**Author:** ![Altug](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/e47c2d/32.png) [@Altug](https://discourse.paraview.org/u/Altug)\
**Post date:** [June 25, 2022, 9:38pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/26 "2022-06-25T21:38:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![RC7](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/839c29/32.png) [@RC7](https://discourse.paraview.org/u/RC7)\
**Post date:** [June 27, 2022, 4:57pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/27 "2022-06-27T16:57:37Z")

</div>

Hi,

The link where I downloaded the script is:

> **[vtk.inp - Pastebin.com](https://pastebin.com/gyJHKTeJ)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

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

---

<div class="post-metadata">

**Author:** ![Altug](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/e47c2d/32.png) [@Altug](https://discourse.paraview.org/u/Altug)\
**Post date:** [June 27, 2022, 7:19pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/28 "2022-06-27T19:19:34Z")

</div>

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

> **[GitHub - c-schubert/ansys-apdl-to-vtk: ANSYS APDL to VTK](https://github.com/c-schubert/ansys-apdl-to-vtk)**
>
> ANSYS APDL to VTK. Contribute to c-schubert/ansys-apdl-to-vtk development by creating an account on GitHub.

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.

---

<div class="post-metadata">

**Author:** ![Altug](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/e47c2d/32.png) [@Altug](https://discourse.paraview.org/u/Altug)\
**Post date:** [June 29, 2022, 7:37pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/29 "2022-06-29T19:37:56Z")

</div>

I think there is problem with my computer or my access to [pastebin.com](http://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.

---

<div class="post-metadata">

**Author:** ![RC7](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/839c29/32.png) [@RC7](https://discourse.paraview.org/u/RC7)\
**Post date:** [July 14, 2022, 9:32am UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/30 "2022-07-14T09:32:41Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Altug](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/e47c2d/32.png) [@Altug](https://discourse.paraview.org/u/Altug)\
**Post date:** [July 14, 2022, 9:42am UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/31 "2022-07-14T09:42:08Z")

</div>

this is the link for original script

> <https://github.com/c-schubert/ansys-apdl-to-vtk/blob/master/ansys_to_vtk.inp>

I modified some of the lines as I have commented before.  
[ansys\_to\_vtk.inp](https://discourse.paraview.org/uploads/short-url/26p3V22QKwYDyOiOmknz8qN3HkU.inp) (15.7 KB)

---

<div class="post-metadata">

**Author:** ![Altug](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/e47c2d/32.png) [@Altug](https://discourse.paraview.org/u/Altug)\
**Post date:** [July 27, 2022, 12:17pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/32 "2022-07-27T12:17:36Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![RC7](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/839c29/32.png) [@RC7](https://discourse.paraview.org/u/RC7)\
**Post date:** [August 8, 2022, 5:03pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/33 "2022-08-08T17:03:29Z")

</div>

Hi Altug,

Still unable to make it work ☹

---

<div class="post-metadata">

**Author:** ![Altug](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/e47c2d/32.png) [@Altug](https://discourse.paraview.org/u/Altug)\
**Post date:** [August 8, 2022, 6:54pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/34 "2022-08-08T18:54:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![RC7](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/839c29/32.png) [@RC7](https://discourse.paraview.org/u/RC7)\
**Post date:** [August 25, 2022, 4:25pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/35 "2022-08-25T16:25:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Altug](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/e47c2d/32.png) [@Altug](https://discourse.paraview.org/u/Altug)\
**Post date:** [August 25, 2022, 6:29pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/36 "2022-08-25T18:29:10Z")

</div>

Hello Liam,  
it is ok, send your model

---

<div class="post-metadata">

**Author:** ![RC7](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/r/839c29/32.png) [@RC7](https://discourse.paraview.org/u/RC7)\
**Post date:** [August 26, 2022, 1:45pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/37 "2022-08-26T13:45:16Z")

</div>

Could you please send me an email to [riseagainst182@hotmail.com](mailto:riseagainst182@hotmail.com) so I can share files with you?

Thanks

---

<div class="post-metadata">

**Author:** ![Ata](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/5fc32e/32.png) [@Ata](https://discourse.paraview.org/u/Ata)\
**Post date:** [November 4, 2024, 3:55pm UTC](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492/38 "2024-11-04T15:55:50Z")

</div>

Has paraview made the process of reading ansys \*.res file simpler rather than users running multiple scripts.

[Previous page](https://discourse.paraview.org/t/ansys-static-structural-export-format-to-paraview/1492.md?page=1)
