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 
13 
16 {
18  params.addClassDescription("Compute stress using elasticity for small strains");
19  return params;
20 }
21 
23  : ComputeStressBase(parameters),
24  _elasticity_tensor_name(_base_name + "elasticity_tensor"),
25  _elasticity_tensor(getMaterialPropertyByName<RankFourTensor>(_elasticity_tensor_name))
26 {
27 }
28 
29 void
31 {
32  // _base_name + "unstabilized_deformation_gradient" is only declared if we're
33  // using the Lagrangian kernels. It's okay to invoke this small strain
34  // material if you are using that kernel system and the
35  // ComputeLagrangianWrappedStress wrapper
36  if (hasBlockMaterialProperty<RankTwoTensor>(_base_name + "strain_increment") &&
37  !hasBlockMaterialProperty<RankTwoTensor>(_base_name + "unstabilized_deformation_gradient"))
38  mooseError("This linear elastic stress calculation only works for small strains; use "
39  "ComputeFiniteStrainElasticStress for simulations using incremental and finite "
40  "strains.");
41 }
42 
43 void
45 {
46  // stress = C * e
48 
49  // Assign value for elastic strain, which is equal to the mechanical strain
51 
52  // Compute dstress_dstrain
54 }
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
ComputeStressBase is the base class for stress tensors computed from MOOSE&#39;s strain calculators...
const MaterialProperty< RankTwoTensor > & _mechanical_strain
Mechanical strain material property.
static InputParameters validParams()
registerMooseObject("SolidMechanicsApp", ComputeLinearElasticStress)
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...
const std::string _base_name
Base name prepended to all material property names to allow for multi-material systems.
static InputParameters validParams()
MaterialProperty< RankTwoTensor > & _elastic_strain
Elastic strain material property.
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
MaterialProperty< RankTwoTensor > & _stress
Stress material property.
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Elasticity tensor material property.
ComputeLinearElasticStress computes the stress following linear elasticity theory (small strains) ...