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:
[AuxVariables<<<{"href": "../../syntax/AuxVariables/index.html"}>>>]
[s11_aux]
order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = CONSTANT
family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = MONOMIAL
[]
[](moose/modules/combined/test/tests/eigenstrain/inclusion.i)Strain component:
[AuxVariables<<<{"href": "../../syntax/AuxVariables/index.html"}>>>]
[e22_aux]
order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = CONSTANT
family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = MONOMIAL
[]
[](moose/modules/combined/test/tests/eigenstrain/variable.i)Elasticity Tensor component:
[AuxVariables<<<{"href": "../../syntax/AuxVariables/index.html"}>>>]
[C1133_aux]
order<<<{"description": "Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)"}>>> = CONSTANT
family<<<{"description": "Specifies the family of FE shape functions to use for this variable"}>>> = MONOMIAL
[]
[](moose/modules/solid_mechanics/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:
[AuxKernels<<<{"href": "../../syntax/AuxKernels/index.html"}>>>]
[matl_s11]
type = RankTwoAux<<<{"description": "Access a component of a RankTwoTensor", "href": "../../source/auxkernels/RankTwoAux.html"}>>>
rank_two_tensor<<<{"description": "The rank two material tensor name"}>>> = stress
index_i<<<{"description": "The index i of ij for the tensor to output (0, 1, 2)"}>>> = 0
index_j<<<{"description": "The index j of ij for the tensor to output (0, 1, 2)"}>>> = 0
variable<<<{"description": "The name of the variable that this object applies to"}>>> = s11_aux
[]
[](moose/modules/combined/test/tests/eigenstrain/inclusion.i)Strain component:
[AuxKernels<<<{"href": "../../syntax/AuxKernels/index.html"}>>>]
[matl_e22]
type = RankTwoAux<<<{"description": "Access a component of a RankTwoTensor", "href": "../../source/auxkernels/RankTwoAux.html"}>>>
rank_two_tensor<<<{"description": "The rank two material tensor name"}>>> = stress
index_i<<<{"description": "The index i of ij for the tensor to output (0, 1, 2)"}>>> = 1
index_j<<<{"description": "The index j of ij for the tensor to output (0, 1, 2)"}>>> = 1
variable<<<{"description": "The name of the variable that this object applies to"}>>> = e22_aux
[]
[](moose/modules/combined/test/tests/eigenstrain/variable.i)Elasticity Tensor component:
[AuxKernels<<<{"href": "../../syntax/AuxKernels/index.html"}>>>]
[matl_C1133]
type = RankFourAux<<<{"description": "Access a component of a RankFourTensor", "href": "../../source/auxkernels/RankFourAux.html"}>>>
rank_four_tensor<<<{"description": "The rank four material tensor name"}>>> = elasticity_tensor
index_i<<<{"description": "The index i of ijkl for the tensor to output (0, 1, 2)"}>>> = 0
index_j<<<{"description": "The index j of ijkl for the tensor to output (0, 1, 2)"}>>> = 0
index_k<<<{"description": "The index k of ijkl for the tensor to output (0, 1, 2)"}>>> = 2
index_l<<<{"description": "The index l of ijkl for the tensor to output (0, 1, 2)"}>>> = 2
variable<<<{"description": "The name of the variable that this object applies to"}>>> = C1133_aux
execute_on<<<{"description": "The list of flag(s) indicating when this object should be executed. For a description of each flag, see https://mooseframework.inl.gov/source/interfaces/SetupInterface.html."}>>> = initial
[]
[](moose/modules/solid_mechanics/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.