c++ code to convert febio (.log) output into ascii formatted tecplot (.dat) file

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • gcoban
    Junior Member
    • Aug 2017
    • 1

    c++ code to convert febio (.log) output into ascii formatted tecplot (.dat) file

    Hi,

    We share a short code that can be used to convert febio "*.log" (hex8-hex20) output node/element data sequence into an ascii formatted tecplot360 (2016) "*.dat" file. The logfile entry inside .feb file should be described as,

    <logfile>
    <element_data name="element data" data="sx;sy;sz;sxy;syz;sxz;s1;s2;s3;Ex;Ey;Ez;Exy;E yz;Exz;E1;E2;E3;F xx;Fyy;Fzz;Fxy;Fyz;Fxz;Fyx;Fzy;Fzx;J" format='elementid %i %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g %g' > </element_data>
    <node_data name="node data" data="x;y;z;ux;uy;uz" format='nodeid %i %g %g %g %g %g %g'></node_data>
    </logfile>

    which may be modified for the required parameter length. The modifications for a different element scheme or different user defined plugin element data must be applied inside code (recompile). These are some highlights for the shared .zip file ingredients:

    - the procedure mktecplot-hex8.cpp uses "armadillo" (http://arma.sourceforge.net/) numerical library for loading and matrix manipulations
    - for progress bar it uses a code portion (MIT License) from a third party
    - the text search algorithms totally depend on sed (stream editor) tools under UNIX environment. Thus, it should be run under linux os.
    - since tecplot does not support quadratic elements, the code should be modified for hex20 manually, there are description lines inside the code.
    - the code does not include special data structures originally developed for tecplot format. It can be manually converted to support different file formats (such as GMSH "*.msh") easily.


    /mktecplot$ tree

    ├── compile.sh
    ├── febio-NH16000.feb (test case)
    ├── mktecplot-hex8.cpp (code)
    ├── progress_bar.cpp (progress bar functions)
    ├── progress_bar.hpp ...
    └── untitled.tiff (sample output image)


    gcoban (2017)
    Attached Files
    Last edited by gcoban; 12-25-2017, 01:06 AM. Reason: NA
Working...
X
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎