www.mooseframework.org
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 
13 #include "libmesh/quadrature.h"
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
54  A(0, 0) = (*_grad_disp[0])[_qp](0);
55  Fbar(0, 0) = (*_grad_disp_old[0])[_qp](0);
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
69  _deformation_gradient[_qp] = A;
70  _deformation_gradient[_qp].addIa(1.0);
71 
72  // very nearly A = gradU - gradUold, adapted to cylindrical coords
73  A -= Fbar;
74 
75  // Fbar = ( I + gradUold)
76  Fbar.addIa(1.0);
77 
78  // Incremental deformation gradient _Fhat = I + A Fbar^-1
79  _Fhat[_qp] = A * Fbar.inverse();
80  _Fhat[_qp].addIa(1.0);
81 
83  }
84 }
MaterialProperty< RankTwoTensor > & _deformation_gradient
InputParameters validParams< ComputeFiniteStrain >()
std::vector< const VariableValue * > _disp
virtual void computeQpStrain()
ComputeRSphericalFiniteStrain(const InputParameters &parameters)
const VariableValue & _disp_old_0
the old value of the first component of the displacements vector
ComputeFiniteStrain defines a strain increment and rotation increment, for finite strains...
std::vector< const VariableGradient * > _grad_disp_old
std::vector< RankTwoTensor > _Fhat
virtual void computeProperties()
Computes the current and old deformation gradients with the assumptions for 1D spherical symmetry geo...
std::vector< const VariableGradient * > _grad_disp
InputParameters validParams< ComputeRSphericalFiniteStrain >()