www.mooseframework.org
ComputeRSphericalSmallStrain.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 
9 #include "Assembly.h"
10 
11 #include "libmesh/quadrature.h"
12 
13 template <>
14 InputParameters
16 {
17  InputParameters params = validParams<ComputeSmallStrain>();
18  params.addClassDescription("Compute a small strain 1D spherical symmetry case.");
19  return params;
20 }
21 
23  : ComputeSmallStrain(parameters)
24 {
25 }
26 
27 void
29 {
30  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
31  {
32  _total_strain[_qp](0, 0) = (*_grad_disp[0])[_qp](0);
33 
34  if (_q_point[_qp](0) != 0.0)
35  _total_strain[_qp](1, 1) = (*_disp[0])[_qp] / _q_point[_qp](0);
36 
37  else
38  _total_strain[_qp](1, 1) = 0.0;
39 
40  // \epsilon_{\theta \theta} = \epsilon{\phi \phi} in this 1D spherical system
41  _total_strain[_qp](2, 2) = _total_strain[_qp](1, 1);
42 
43  _mechanical_strain[_qp] = _total_strain[_qp];
44 
45  // Remove the eigenstrains
46  for (auto es : _eigenstrains)
47  _mechanical_strain[_qp] -= (*es)[_qp];
48  }
49 }
InputParameters validParams< ComputeSmallStrain >()
std::vector< const VariableValue * > _disp
InputParameters validParams< ComputeRSphericalSmallStrain >()
MaterialProperty< RankTwoTensor > & _mechanical_strain
ComputeRSphericalSmallStrain(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