https://github.com/cwsmith/pvloadvsdisplacement
https://github.com/cwsmith/pvloadvsdisplacement
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/cwsmith/pvloadvsdisplacement
- Owner: cwsmith
- License: mit
- Created: 2015-08-05T12:16:24.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-06T05:00:08.000Z (almost 11 years ago)
- Last Synced: 2025-03-01T00:39:13.732Z (over 1 year ago)
- Language: Python
- Size: 1.54 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pvloadvsdisplacement
Python code for a Paraview programmable filter that
supports plotting the maximum load vs the maximum displacement over time for a
set of user selected elements. The values being computed are specific to a
solid mechanics analysis run in [Albany](https://github.com/gahansen/Albany), but the process and code can be
extended to support other inputs.
Tested in Paraview 4.3.1 on GNU/Linux.

# Load the plugin (first use only)
* Tools->Manage Plugins
* Click 'Load New ...'
* Select 'loadVsDisp.xml'
# Create a load vs displacement plot
* Open a pvd file
* select some elements via 'select elements through'
* Filters->Alphabetical->Extract Selection
* Click apply
* Filters->Alphabetical->Load Vs Displacement
* Set 'displacementFieldName' to the name of the VTU field containing the displacement field - typically 'Solution' or 'disp'
* Set 'numStressFields' equal to the number of VTU stress fields
* Set 'stressFieldName' to the base name of the VTU stress field - typically 'Cauchy_Stress_' or 'Stress_'
* Set 'Field Association' to 'Row Data'
* Click apply
* Click the row in the spreadsheet window - it should become shaded
* Filters->Alphabetical->Plot Selection Over Time
* Click apply
* Under 'X Axis Parameters' set 'X Array Name' to 'max_disp'
* Under 'Series Parameters' select only the 'max_stress' box
* The plot title and axis labels can be set as needed via the other filter properties
# Helpful documentation
[VTK C++](http://www.vtk.org/doc/nightly/html/classvtkTable.html)
[Python and C++ Examples](http://www.vtk.org/doc/nightly/html/c2_vtk_e_8.html)
[Easy Customization of the ParaView Python Programmable Filter Property Panel](http://www.kitware.com/blog/home/post/534)
(the python_filter_generator.py script is from this blog post)