https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeLinearElasticStress.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
29void
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
43void
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}
registerMooseObject("SolidMechanicsApp", ComputeLinearElasticStress)
void mooseError(Args &&... args)
const MaterialProperty< RankTwoTensor > & _mechanical_strain
Mechanical strain material property.
MaterialProperty< RankFourTensor > & _Jacobian_mult
derivative of stress w.r.t. strain (_dstress_dstrain)
MaterialProperty< RankTwoTensor > & _elastic_strain
Elastic strain material property.
const std::string _base_name
Base name prepended to all material property names to allow for multi-material systems.
MaterialProperty< RankTwoTensor > & _stress
Stress material property.
ComputeLinearElasticStress computes the stress following linear elasticity theory (small strains)
static InputParameters validParams()
const MaterialProperty< RankFourTensor > & _elasticity_tensor
Elasticity tensor material property.
virtual void computeQpStress() override
Compute the stress and store it in the _stress material property for the current quadrature point.
ComputeLinearElasticStress(const InputParameters &parameters)
ComputeStressBase is the base class for stress tensors computed from MOOSE's strain calculators.
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)