febiosoftware / FEBio

FEBio Suite Solver
https://febio.org/
MIT License
184 stars 68 forks source link

VTK output option #31

Closed ankushaggarwal closed 1 year ago

ankushaggarwal commented 3 years ago

Is it possible to create an option to create output files in vtk format?

steffenger commented 1 year ago

Is there any update on the situation? We would really appreciate a direct vtk outout option, since we need this file format for post processing.

best regards

steffen

matthiaskoenig commented 1 year ago

This would be an important feature, or alternatively a method to batch convert *.xplt results to vtk. We have many simulation runs and manually converting each of the results to VTK via FEBio Studio is very time consuming. I.e. either the possibility for storing VTK in addition to xplt simulation results or an option in FEBio Studio to convert a set of *.xplt to vtk in a single run would be great.

utsekaj42 commented 1 year ago

I have implemented a python interface to convert XPLT to VTK, so this may be of use to those interested in this topic. See example.py here. I won't guarantee it will work with all models, but it may not be too hard to improve it to cover additional model structures.

SteveMaas1978 commented 1 year ago

As of FEBio 4.4, FEBio can now export directly to VTK file format. To try it, set the type attribute of the plotfile tag to "vtk":

<plotfile type="vtk">
  <var type="displacement"/>
  <var type="stress"/>
</plotfile>

Note that currently the VTK legacy format is used, which does not support all the features and output options of the febio plotfile. However, most commonly used nodal and element plot variables should be supported.

I'm going to close this issue now. If you find any problems or like to see any enhancements to this feature, please open a new issue.