www.mooseframework.org
Compute1DSmallStrain.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 /****************************************************************/
7 
8 #include "Compute1DSmallStrain.h"
9 
10 #include "libmesh/quadrature.h"
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<ComputeSmallStrain>();
17  params.addClassDescription("Compute a small strain in 1D problem");
18  return params;
19 }
20 
21 Compute1DSmallStrain::Compute1DSmallStrain(const InputParameters & parameters)
22  : ComputeSmallStrain(parameters)
23 {
24 }
25 
26 void
28 {
29  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
30  {
31  _total_strain[_qp](0, 0) = (*_grad_disp[0])[_qp](0);
32  _total_strain[_qp](1, 1) = computeStrainYY();
33  _total_strain[_qp](2, 2) = computeStrainZZ();
34 
36 
37  // Remove the eigenstrain
38  for (auto es : _eigenstrains)
39  _mechanical_strain[_qp] -= (*es)[_qp];
40  }
41 }
void computeProperties() override
InputParameters validParams< ComputeSmallStrain >()
virtual Real computeStrainYY()=0
Computes the strain_yy; as a virtual function, this function is overwritten for the specific geometri...
virtual Real computeStrainZZ()=0
Computes the strain_zz; as a virtual function, this function is overwritten for the specific geometri...
InputParameters validParams< Compute1DSmallStrain >()
MaterialProperty< RankTwoTensor > & _mechanical_strain
Compute1DSmallStrain(const InputParameters &parameters)
MaterialProperty< RankTwoTensor > & _total_strain
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains
ComputeSmallStrain defines a strain tensor, assuming small strains.
std::vector< const VariableGradient * > _grad_disp