# Visualization of Tensor Components

To visualize stresses, strains, and elasticity tensor components, the material objects must be outputted to auxiliary variables using auxiliary kernels available. RankTwoAux is used to output a RankTwoTensor component, and RankFourAux is used to output a RankFourTensor component.

## AuxVariable Creation

As an example, , and can be visualized by first declaring auxiliary variables for them in the input file.

Stress component:

[./s11_aux]
order = CONSTANT
family = MONOMIAL
[../]

(modules/combined/test/tests/eigenstrain/inclusion.i)

Strain component:

[./e22_aux]
order = CONSTANT
family = MONOMIAL
[../]

(modules/combined/test/tests/eigenstrain/variable.i)

Elasticity Tensor component:

[./C1133_aux]
order = CONSTANT
family = MONOMIAL
[../]

(modules/combined/test/tests/elasticitytensor/composite.i)

## AuxKernel Creation

Next, the appropriate auxiliary kernels are used. These elements require the name of the material property of which you wish to see the field value and the indices of the tensor value (either 0, 1, or 2) in addition to the name of the output AuxVariable. The corresponding AuxKernels blocks for each of the AuxVariables are given below.

Stress component:

[./matl_s11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = s11_aux
[../]

(modules/combined/test/tests/eigenstrain/inclusion.i)

Strain component:

[./matl_e22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = e22_aux
[../]

(modules/combined/test/tests/eigenstrain/variable.i)

Elasticity Tensor component:

[./matl_C1133]
type = RankFourAux
rank_four_tensor = elasticity_tensor
index_i = 0
index_j = 0
index_k = 2
index_l = 2
variable = C1133_aux
execute_on = initial
[../]

(modules/combined/test/tests/elasticitytensor/composite.i)

See the documentation for RankTwoAux and RankFourAux for more details about the available options for saving quantities from these tensor types.

## Postprocessor Usage

To save these values to a CSV file or to the console for further data analysis, the auxiliary variables can be output as postprocessors. A complete list of the Postprocessor System is available in the MOOSE documentation, but the most commonly used option is ElementAverageValue.