Author Topic: NURBFEAP Paraview output user-macro (NPVI)  (Read 15226 times)

resammc

  • Full Member
  • ***
  • Posts: 95
NURBFEAP Paraview output user-macro (NPVI)
« on: April 07, 2017, 07:04:58 AM »
Dear FEAP Users,

We have developed a user macro to create Paraview output for nurbfeap results, and we would like to share it with you.

Some features of the routine are:
  • quadratic interpolation of the geometry and the solution field (using quadratic FE elements)
  • linear interpolation of the geometry and the solution fields (using linear FE elements) (nurbfeap plot defaults)
  • uniform and non-uniform subdivisions of the NURBS elements
  • Standard FEAP output of the IGA mesh (in form of Serendipity and Lagrangian finite elements)
  • NEW post-processing of NURBS meshes using the so-called Bézier elements in Paraview (only for FEAP 8.5 and FEAP 8.6)
  • NEW compress VTU files on-demand (currently by executing an external Python script)
A user manual is also provided which explains how to use the user macro.

We have tried to use and alter nurbfeap standard routines whenever it was possible. However, it should be noted that the user macro works independently and does not interfere with nurbfeap plot functions.

Feel free to download and adapt it to suit your needs.

Hope you find it of help!

Resam

update 07.04.2017: an error in addressing npvi.h in subroutines was fixed.
update 03.07.2017: fixed a problem in defining the xl array (see replies #3 and#4 below) (for v.8.4 only. v8.5 users use the files at Reply #7 below)
update 27.10.2017: fixed an error when using different types of elements in a single problem (download: rev.1.2)
update 03.03.2018: major update - download: rev.1.3
update 14.07.2020: Version 1.4

« Last Edit: July 15, 2020, 12:36:21 AM by resammc »

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #1 on: April 07, 2017, 10:29:30 AM »
Resam,  Thanks for sharing this with everyone.

leeyongjae89

  • Jr. Member
  • **
  • Posts: 24
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #2 on: April 10, 2017, 09:24:48 AM »
Thank you so much for the sharing!

Axuni

  • Jr. Member
  • **
  • Posts: 18
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #3 on: July 03, 2017, 04:41:55 AM »
Hi Resam,

thanks a lot for the contribution. I started testing it and it looks great. But it seems that there was a small bug in the definition of the array "xl8" in the subroutine "pmsh_quad_nusd". Originally defined as "xl8(3,8)" I think it should be "xl8(3,20)", as it should be defined for a quadratic element. I tried the latter with good results.

Axuni

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2647
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #4 on: July 03, 2017, 07:30:14 AM »
A similar problem exists in the pmsh_quad_lgrn_nusd.f -- should be xl8(3,27) there.

USERS of ver8.5 NOTE:  It is necessary to modify uparaview_nurb.f to add the argument for the array ip(0:numnp), add 'strnum.h' and delete argument istv.  Also dimension the stress and history arrays to numnm not numnp -- see routine p_paraview.f for details on modifications.

FEAP_Admin

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 993
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #5 on: July 03, 2017, 08:14:22 AM »
The currently available version of ver 8.5 (rev 8.5.2d) has the necessary edits for the paraview output to work with igafeap.

resammc

  • Full Member
  • ***
  • Posts: 95
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #6 on: July 03, 2017, 08:56:52 AM »
Dear Axuni, Professor Taylor, FEAP Admin,

Thank you very much for checking the routine. I modified the files in the first post based on your suggestions.

Many thanks and kind regards,

Resam

Prof. R.L. Taylor

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 2647
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #7 on: July 03, 2017, 09:36:19 AM »
Atrtached are updated NPVI files for ver 8.5 (latest release only)

resammc

  • Full Member
  • ***
  • Posts: 95
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #8 on: July 03, 2017, 09:58:55 AM »
Thank you very much Professor Taylor for the v8.5 updated files. I also added a note in the first post, for v8.5 users, referring to your post.

resammc

  • Full Member
  • ***
  • Posts: 95
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #9 on: October 27, 2017, 12:32:06 AM »
There was a problem with the element types (when more than one type of element is used in the problem, e.g. in the 'joint' example in ifeap) which is now fixed.

Attached are the files for FEAP84 and FEAP85.

RM

resammc

  • Full Member
  • ***
  • Posts: 95
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #10 on: March 03, 2018, 12:46:58 AM »
Rev. 1.3:

FEAP85 - major update:
- there was a problem with stress/strain projection rotuines (igafeap) which is fixed now
- most of the routines are re-written (*_new.f files) based on igafeap plot routines. The performance (and stability) has increased significantly.
- more bug fixes

FEAP84 - minor update:
- an error in ix_quad array dimension (pstr_quad_nusd.f) is fixed now

Best,

Resam

Edit (05.03.2018): the files are re-uploaded.
« Last Edit: March 05, 2018, 01:45:56 AM by resammc »

Axuni

  • Jr. Member
  • **
  • Posts: 18
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #11 on: March 06, 2018, 12:12:50 AM »
Thanks for the update Resam!

resammc

  • Full Member
  • ***
  • Posts: 95
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #12 on: July 14, 2020, 11:37:20 AM »
Rev. 1.4 (14 July 2020)

FEAP 8.4
- added `npvi,comp` to generate a Python script to compress the created VTU files
- bug fixes

FEAP 8.5
- post-processing of NURBS meshes using the so-called Bézier elements in Paraview ( `npvi,[ ],4` )
- added `npvi,comp` to generate a Python script to compress the created VTU files
- bug fixes

FEAP 8.6
The same as FEAP 8.5 (+ added support for FEAP 8.6)

Download link
Starting from this version, we have decided to use Zenodo and Github to maintain the code:
Zenodo: https://zenodo.org/record/3945131
Github: https://github.com/resammc/NPVI_ADDON
DOI: 10.5281/zenodo.3945132
The current archive file is attached to this post as well.

Acknowledgment
We would like to thank users Axuni and alina.i for reporting bugs and suggesting the fixes, as well as testing the new features. Their help is greatly appreciated.

Instructions
  • VTK 9.0 now supports the so-called Bezier elements, meaning that a Lagrangian-based approximation is not anymore needed. This feature has been added to Paraview since, but currently only available in the development (nightly) versions. You can download the latest nightly version from Paraview's download page, but for some of the operating systems, it is likely that the nightly version is not available at the moment you are checking. In this case, it usually helps to visit the Dashboard page of Paraview:
    https://open.cdash.org/index.php?project=ParaView
    and download the 'superbuild'. At the moment of writing this post, the current version for Linux OS can be downloaded from:
    https://open.cdash.org/viewFiles.php?buildid=6648280
    More information regarding the implementation of Rational Bézier Cells into VTK here:
    https://blog.kitware.com/implementation-of-rational-bezier-cells-into-vtk/

  • The new option 'npvi,comp' helps with reducing the final size of the generated .VTU files. A Python script is created which goes through all the non-compressed VTU files and compresses them. This usually reduces the final file-size by around 80%. The generated Python script (npvi_vtkcomp.py) can be executed using 'pvpython' or 'pvbatch' included in the Paraview installation in the 'bin' folder. You may want to add this folder to your operating system's path to be able to directly issue 'pvbatch npvi_vtkcomp.py'. Moreover, by default the compressed files have a Prefix 'Comp_'. This can be changed by modifying the 'npvi_python.f90' file. Using no prefix means that the non-compressed file will be replaced by the compressed one.

  • A new identifier 'm' has been added to the tool which prevents the Bézier control points of adjacent elements to be merged. This is beneficial when using multipatches which are very close to each other.

  • Note the file-extension of 'npvi_python.f90' which is different from the other Fortran files included in the package.

Best,
Resam
« Last Edit: July 14, 2020, 11:44:27 AM by resammc »

Prof. S. Govindjee

  • Administrator
  • FEAP Guru
  • *****
  • Posts: 1160
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #13 on: July 14, 2020, 01:53:50 PM »
Thanks for the update to v8.6!

Axuni

  • Jr. Member
  • **
  • Posts: 18
Re: NURBFEAP Paraview output user-macro (NPVI)
« Reply #14 on: July 17, 2020, 07:34:43 AM »
Nice job Resam!
Thanks!