www.mooseframework.org
ComputeLinearElasticStress.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<ComputeStressBase>();
14  params.addClassDescription("Compute stress using elasticity for small strains");
15  return params;
16 }
17 
18 ComputeLinearElasticStress::ComputeLinearElasticStress(const InputParameters & parameters)
19  : ComputeStressBase(parameters),
20  _mechanical_strain(getMaterialPropertyByName<RankTwoTensor>(_base_name + "mechanical_strain"))
21 {
22 }
23 
24 void
26 {
27  if (hasBlockMaterialProperty<RankTwoTensor>(_base_name + "strain_increment"))
28  mooseError("This linear elastic stress calculation only works for small strains; use "
29  "ComputeFiniteStrainElasticStress for simulations using incremental and finite "
30  "strains.");
31 }
32 
33 void
35 {
36  // stress = C * e
38  addQpInitialStress(); // InitialStress Deprecation: remove this line
39 
40  // Assign value for elastic strain, which is equal to the mechanical strain
41  _elastic_strain[_qp] = _mechanical_strain[_qp];
42 
43  // Compute dstress_dstrain
45 }
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
ComputeStressBase is the base class for stress tensors.
MaterialProperty< RankTwoTensor > & _stress
const MaterialProperty< RankTwoTensor > & _mechanical_strain
ComputeLinearElasticStress(const InputParameters &parameters)
InputParameters validParams< ComputeLinearElasticStress >()
void addQpInitialStress()
InitialStress Deprecation: remove this method.
const std::string _base_name
InputParameters validParams< ComputeStressBase >()
const MaterialProperty< RankFourTensor > & _elasticity_tensor
MaterialProperty< RankTwoTensor > & _elastic_strain