Permalink
Browse files

Tweak the paraview README.

  • Loading branch information...
gahansen committed May 17, 2018
1 parent 2283b11 commit d1b96963db341306f4f76f21d345a5eb0787775e
Showing with 25 additions and 16 deletions.
  1. +3 −1 tools/paraview/MaxStressProgrammableFilter.py
  2. +22 −15 tools/paraview/README.md
@@ -1,7 +1,9 @@
import numpy as np

cauchy_stress = []
for i in range(1,45):
cauchy_stress.append(inputs[0].CellData['Cauchy_Stress_%02d' % (i,)])
dataArray = max(cauchy_stress)
dataArray = np.squeeze(np.asarray(np.matrix(cauchy_stress).max(axis=0)))
output.CellData.append(dataArray, 'Cauchy_Stress_Max')

displacement = inputs[0].PointData["solution_"]
@@ -1,29 +1,36 @@
# This directory contains various tools for reading and visualizing data in Paraview.

* Note 1: Albany normally names the solution output field "solution\_" Paraview will apply displacements if this output field is called "displacement\_" To rename the field in Albany, please add the line to the Exodus block in the input yaml file: Exodus Solution Name: displacement
## Topic 1: Albany normally names the solution output field "solution\_" Paraview will apply displacements if this output field is called "displacement\_" To rename the field in Albany, please add the line to the Exodus block in the input yaml file:

Exodus Solution Name: displacement

Also note that the tractions are called "residual\_" You can also rename these:

Exodus Residual Name: tractions

Note that you can manually apply displacements by using "Warp Vector" operating on the "solution\_" field.

* Note 2: Visualize Maximum Cauchy Stress in LCM problems:
## Topic 2: Visualize Maximum Cauchy Stress in LCM problems:

1. Load up LCM dataset as usual.
2. Apply any filters as usual (warp vector for displacements, etc.)
3. Load the Filters->Alphabetical->MergeBlocks filter
3. Go to Filters->Alphabetical->Programmable Filters
4. Copy the contents of the file - MaxStressProgrammableFilter.py - into the "Script" window in the ProgrammableFilter window.
5. Hit Apply.
6. Select "Cauchy\_Stress\_Max" in view menu.

## Topic 3: Note that you can change this from an element field to a node field by applying the:

Filters->Alphabetical->CellDataToPointData

1. Load up LCM dataset as usual.
2. Apply any filters as usual (warp vector for displacements, etc.)
3. Go to Filters->Alphabetical->Programmable Filters
4. Copy the contents of the file - MaxStressProgrammableFilter.py - to the "Script" window in the ProgrammableFilter window.
5. Hit Apply.
6. Select "Cauchy_Stress_Max" in view menu.
filter.

* Note 3: Note that you can change this from an element field to a node field by applying the:
CellDataToPointData
filter.
## Topic 4: View nodesets:

* Note 4: View nodesets:
1. Please see file Nodesets.txt

1. Please see file Nodesets.txt
## Topic 5: Plot load vs. displacement

* Note 5: Plot load vs. displacement
Cameron Smith developed a nice [Paraview python utility](https://github.com/cwsmith/pvloadvsdisplacement) to plot load vs. displacement curves on LCM problems.
Cameron Smith developed a nice [Paraview python utility](https://github.com/cwsmith/pvloadvsdisplacement) to plot
load vs. displacement curves on LCM problems.

0 comments on commit d1b9696

Please sign in to comment.