www.mooseframework.org
ComputeRSphericalIncrementalStrain.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 /****************************************************************/
8 #include "Assembly.h"
9 #include "FEProblem.h"
10 #include "MooseMesh.h"
11 
12 #include "libmesh/quadrature.h"
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<ComputeIncrementalSmallStrain>();
19  params.addClassDescription(
20  "Compute a strain increment for incremental strains in 1D spherical symmetry problems.");
21  return params;
22 }
23 
25  const InputParameters & parameters)
26  : ComputeIncrementalSmallStrain(parameters), _disp_old_0(coupledValueOld("displacements", 0))
27 {
28 }
29 
30 void
32 {
33  const auto & subdomainIDs = _mesh.meshSubdomains();
34  for (auto subdomainID : subdomainIDs)
35  if (_fe_problem.getCoordSystem(subdomainID) != Moose::COORD_RSPHERICAL)
36  mooseError("The coordinate system must be set to RSPHERICAL for 1D R spherical simulations.");
37 }
38 
39 void
41  RankTwoTensor & total_strain_increment)
42 {
43  // Deformation gradient calculation in cylindrical coordinates
44  RankTwoTensor A; // Deformation gradient
45  RankTwoTensor Fbar; // Old Deformation gradient
46 
47  // Step through calculating the current and old deformation gradients
48  // Only diagonal components are nonzero because this is a 1D material
49  // Note: x_disp is the radial displacement
50  A(0, 0) = (*_grad_disp[0])[_qp](0);
51  Fbar(0, 0) = (*_grad_disp_old[0])[_qp](0);
52 
53  // The polar and azimuthal strains are functions of radial displacement
54  if (!MooseUtils::relativeFuzzyEqual(_q_point[_qp](0), 0.0))
55  {
56  A(1, 1) = (*_disp[0])[_qp] / _q_point[_qp](0);
57  Fbar(1, 1) = _disp_old_0[_qp] / _q_point[_qp](0);
58  }
59 
60  // The polar and azimuthal strains are equalivalent in this 1D problem
61  A(2, 2) = A(1, 1);
62  Fbar(2, 2) = Fbar(1, 1);
63 
64  // Gauss point deformation gradient
65  _deformation_gradient[_qp] = A;
66  _deformation_gradient[_qp].addIa(1.0);
67 
68  // very nearly A = gradU - gradUold, adapted to cylindrical coords
69  A -= Fbar;
70 
71  total_strain_increment = 0.5 * (A + A.transpose());
72 }
MaterialProperty< RankTwoTensor > & _deformation_gradient
std::vector< const VariableValue * > _disp
ComputeRSphericalIncrementalStrain(const InputParameters &parameters)
ComputeIncrementalSmallStrain defines a strain increment and rotation increment (=1), for small strains.
InputParameters validParams< ComputeRSphericalIncrementalStrain >()
virtual void computeTotalStrainIncrement(RankTwoTensor &total_strain_increment) override
Computes the current and old deformation gradients with the assumptions for 1D spherical symmetry geo...
std::vector< const VariableGradient * > _grad_disp_old
InputParameters validParams< ComputeIncrementalSmallStrain >()
const VariableValue & _disp_old_0
the old value of the first component of the displacements vector
std::vector< const VariableGradient * > _grad_disp