ComputeRSphericalFiniteStrain.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 #include "FEProblem.h"
11 #include "MooseMesh.h"
12
14
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<ComputeFiniteStrain>();
20  params.addClassDescription("Compute a strain increment and rotation increment for finite strains "
21  "in 1D spherical symmetry problems.");
22  return params;
23 }
24
26  : ComputeFiniteStrain(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 {
42  // Method from Rashid, 1993
43  RankTwoTensor ave_Fhat;
44
45  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
46  {
47  // Deformation gradient calculation in cylindrical coordinates
48  RankTwoTensor A; // Deformation gradient
49  RankTwoTensor Fbar; // Old Deformation gradient
50
51  // Step through calculating the current and old deformation gradients
52  // Only diagonal components are nonzero because this is a 1D material
53  // Note: x_disp is the radial displacement
56
57  // The polar and azimuthal strains are functions of radial displacement
58  if (!MooseUtils::relativeFuzzyEqual(_q_point[_qp](0), 0.0))
59  {
60  A(1, 1) = (*_disp[0])[_qp] / _q_point[_qp](0);
61  Fbar(1, 1) = _disp_old_0[_qp] / _q_point[_qp](0);
62  }
63
64  // The polar and azimuthal strains are equalivalent in this 1D problem
65  A(2, 2) = A(1, 1);
66  Fbar(2, 2) = Fbar(1, 1);
67
68  // Gauss point deformation gradient
71
73  A -= Fbar;
74
75  // Fbar = ( I + gradUold)
77
78  // Incremental deformation gradient _Fhat = I + A Fbar^-1
79  _Fhat[_qp] = A * Fbar.inverse();
81
83  }
84 }