www.mooseframework.org
ADComputeFiniteStrainElasticStress.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 
17  params.addClassDescription("Compute stress using elasticity for finite strains"););
18 
19 template <ComputeStage compute_stage>
21  const InputParameters & parameters)
22  : ADComputeStressBase<compute_stage>(parameters),
23  GuaranteeConsumer(this),
24  _elasticity_tensor_name(_base_name + "elasticity_tensor"),
25  _elasticity_tensor(adGetADMaterialProperty<RankFourTensor>(_elasticity_tensor_name)),
26  _strain_increment(
27  adGetADMaterialPropertyByName<RankTwoTensor>(_base_name + "strain_increment")),
28  _rotation_increment(
29  adGetADMaterialPropertyByName<RankTwoTensor>(_base_name + "rotation_increment")),
30  _stress_old(adGetMaterialPropertyOldByName<RankTwoTensor>(_base_name + "stress")),
31  _elastic_strain_old(
32  adGetMaterialPropertyOldByName<RankTwoTensor>(_base_name + "elastic_strain"))
33 {
34 }
35 
36 template <ComputeStage compute_stage>
37 void
39 {
40  if (!hasGuaranteedMaterialProperty(_elasticity_tensor_name, Guarantee::ISOTROPIC))
41  mooseError(
42  "ADComputeFiniteStrainElasticStress can only be used with elasticity tensor materials "
43  "that guarantee isotropic tensors.");
44 }
45 
46 template <ComputeStage compute_stage>
47 void
49 {
50  // Calculate the stress in the intermediate configuration
51  ADRankTwoTensor intermediate_stress;
52 
53  intermediate_stress =
54  _elasticity_tensor[_qp] * (_strain_increment[_qp] + _elastic_strain_old[_qp]);
55 
56  // Rotate the stress state to the current configuration
57  _stress[_qp] =
58  _rotation_increment[_qp] * intermediate_stress * _rotation_increment[_qp].transpose();
59 
60  // Assign value for elastic strain, which is equal to the mechanical strain
61  _elastic_strain[_qp] = _mechanical_strain[_qp];
62 }
ADComputeStressBase is the base class for stress tensors.
defineADValidParams(ADComputeFiniteStrainElasticStress, ADComputeStressBase, params.addClassDescription("Compute stress using elasticity for finite strains");)
ADComputeFiniteStrainElasticStress(const InputParameters &parameters)
Add-on class that provides the functionality to check if guarantees for material properties are provi...
registerADMooseObject("TensorMechanicsApp", ADComputeFiniteStrainElasticStress)
ADComputeFiniteStrainElasticStress computes the stress following elasticity theory for finite strains...