www.mooseframework.org
ComputeRSphericalSmallStrain.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 #include "Assembly.h"
12 
13 #include "libmesh/quadrature.h"
14 
16 
19 {
21  params.addClassDescription("Compute a small strain 1D spherical symmetry case.");
22  return params;
23 }
24 
26  : ComputeSmallStrain(parameters)
27 {
28 }
29 
30 void
32 {
33  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
34  {
35  _total_strain[_qp](0, 0) = (*_grad_disp[0])[_qp](0);
36 
37  if (_q_point[_qp](0) != 0.0)
38  _total_strain[_qp](1, 1) = (*_disp[0])[_qp] / _q_point[_qp](0);
39 
40  else
41  _total_strain[_qp](1, 1) = 0.0;
42 
43  // \epsilon_{\theta \theta} = \epsilon{\phi \phi} in this 1D spherical system
44  _total_strain[_qp](2, 2) = _total_strain[_qp](1, 1);
45 
47 
48  // Remove the eigenstrains
49  for (auto es : _eigenstrains)
50  _mechanical_strain[_qp] -= (*es)[_qp];
51  }
52 }
const MooseArray< Point > & _q_point
std::vector< const VariableValue * > _disp
Displacement variables.
static InputParameters validParams()
MaterialProperty< RankTwoTensor > & _mechanical_strain
ComputeRSphericalSmallStrain(const InputParameters &parameters)
registerMooseObject("SolidMechanicsApp", ComputeRSphericalSmallStrain)
ComputeRSphericalSmallStrain defines a strain tensor, assuming small strains, in a 1D simulation assu...
void addClassDescription(const std::string &doc_string)
MaterialProperty< RankTwoTensor > & _total_strain
std::vector< const MaterialProperty< RankTwoTensor > * > _eigenstrains
ComputeSmallStrain defines a strain tensor, assuming small strains.
std::vector< const VariableGradient * > _grad_disp
Gradient of displacements.