www.mooseframework.org
ADComputeRSphericalSmallStrain.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 
18 
19 template <ComputeStage compute_stage>
20 InputParameters
22 {
23  InputParameters params = ADComputeSmallStrain<compute_stage>::validParams();
24  params.addClassDescription("Compute a small strain 1D spherical symmetry case.");
25  return params;
26 }
27 
28 template <ComputeStage compute_stage>
30  const InputParameters & parameters)
31  : ADComputeSmallStrain<compute_stage>(parameters)
32 {
33 }
34 
35 template <ComputeStage compute_stage>
36 void
38 {
39  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
40  {
41  _total_strain[_qp](0, 0) = (*_grad_disp[0])[_qp](0);
42 
43  if (_q_point[_qp](0) != 0.0)
44  _total_strain[_qp](1, 1) = (*_disp[0])[_qp] / _q_point[_qp](0);
45 
46  else
47  _total_strain[_qp](1, 1) = 0.0;
48 
49  // \epsilon_{\theta \theta} = \epsilon{\phi \phi} in this 1D spherical system
50  _total_strain[_qp](2, 2) = _total_strain[_qp](1, 1);
51 
52  _mechanical_strain[_qp] = _total_strain[_qp];
53 
54  // Remove the eigenstrains
55  for (auto es : _eigenstrains)
56  _mechanical_strain[_qp] -= (*es)[_qp];
57  }
58 }
registerADMooseObject
registerADMooseObject("TensorMechanicsApp", ADComputeRSphericalSmallStrain)
ADComputeRSphericalSmallStrain::ADComputeRSphericalSmallStrain
ADComputeRSphericalSmallStrain(const InputParameters &parameters)
Definition: ADComputeRSphericalSmallStrain.C:29
ADComputeRSphericalSmallStrain::computeProperties
virtual void computeProperties() override
Definition: ADComputeRSphericalSmallStrain.C:37
defineADLegacyParams
defineADLegacyParams(ADComputeRSphericalSmallStrain)
ADComputeSmallStrain
ADComputeSmallStrain defines a strain tensor, assuming small strains.
Definition: ADComputeSmallStrain.h:17
ADComputeRSphericalSmallStrain::validParams
static InputParameters validParams()
Definition: ADComputeRSphericalSmallStrain.C:21
ADComputeSmallStrain::validParams
static InputParameters validParams()
Definition: ADComputeSmallStrain.C:19
ADComputeRSphericalSmallStrain
ADComputeRSphericalSmallStrain defines a strain tensor, assuming small strains, in a 1D simulation as...
Definition: ADComputeRSphericalSmallStrain.h:15
ADComputeRSphericalSmallStrain.h