www.mooseframework.org
ComputeLinearElasticStress.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
12 registerMooseObject("TensorMechanicsApp", ComputeLinearElasticStress);
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<ComputeStressBase>();
19  params.addClassDescription("Compute stress using elasticity for small strains");
20  return params;
21 }
22 
23 ComputeLinearElasticStress::ComputeLinearElasticStress(const InputParameters & parameters)
24  : ComputeStressBase(parameters),
25  _elasticity_tensor_name(_base_name + "elasticity_tensor"),
26  _elasticity_tensor(getMaterialPropertyByName<RankFourTensor>(_elasticity_tensor_name))
27 {
28 }
29 
30 void
32 {
33  if (hasBlockMaterialProperty<RankTwoTensor>(_base_name + "strain_increment"))
34  mooseError("This linear elastic stress calculation only works for small strains; use "
35  "ComputeFiniteStrainElasticStress for simulations using incremental and finite "
36  "strains.");
37 }
38 
39 void
41 {
42  // stress = C * e
44 
45  // Assign value for elastic strain, which is equal to the mechanical strain
47 
48  // Compute dstress_dstrain
50 }
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
ComputeStressBase is the base class for stress tensors.
MaterialProperty< RankTwoTensor > & _stress
Stress material property.
virtual void initialSetup() override
ComputeLinearElasticStress(const InputParameters &parameters)
virtual void computeQpStress() override
Compute the stress and store it in the _stress material property for the current quadrature point...
InputParameters validParams< ComputeLinearElasticStress >()
const MaterialProperty< RankTwoTensor > & _mechanical_strain
Mechanical strain material property.
const std::string _base_name
Base name prepended to all material property names to allow for multi-material systems.
registerMooseObject("TensorMechanicsApp", ComputeLinearElasticStress)
MaterialProperty< RankTwoTensor > & _elastic_strain
Elastic strain material property.
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Elasticity tensor material property.
InputParameters validParams< ComputeStressBase >()
ComputeLinearElasticStress computes the stress following linear elasticity theory (small strains) ...