www.mooseframework.org
ADComputeRSphericalIncrementalStrain.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 #include "FEProblem.h"
13 #include "MooseMesh.h"
14 
15 #include "libmesh/quadrature.h"
16 
18 
22  params.addClassDescription(
23  "Compute a strain increment for incremental strains in 1D spherical symmetry problems."););
24 
25 template <ComputeStage compute_stage>
27  const InputParameters & parameters)
28  : ADComputeIncrementalSmallStrain<compute_stage>(parameters),
29  _disp_old_0(coupledValueOld("displacements", 0))
30 {
31 }
32 
33 template <ComputeStage compute_stage>
34 void
36 {
38 
39  const auto & subdomainIDs = _mesh.meshSubdomains();
40  for (auto subdomainID : subdomainIDs)
41  if (_fe_problem.getCoordSystem(subdomainID) != Moose::COORD_RSPHERICAL)
42  mooseError("The coordinate system must be set to RSPHERICAL for 1D R spherical simulations.");
43 }
44 
45 template <ComputeStage compute_stage>
46 void
48  ADRankTwoTensor & total_strain_increment)
49 {
50  // Deformation gradient calculation in cylindrical coordinates
51  ADRankTwoTensor A; // Deformation gradient
52  RankTwoTensor Fbar; // Old Deformation gradient
53 
54  // Step through calculating the current and old deformation gradients
55  // Only diagonal components are nonzero because this is a 1D material
56  // Note: x_disp is the radial displacement
57  A(0, 0) = (*_grad_disp[0])[_qp](0);
58  Fbar(0, 0) = (*_grad_disp_old[0])[_qp](0);
59 
60  // The polar and azimuthal strains are functions of radial displacement
61  if (!MooseUtils::relativeFuzzyEqual(_q_point[_qp](0), 0.0))
62  {
63  A(1, 1) = (*_disp[0])[_qp] / _q_point[_qp](0);
64  Fbar(1, 1) = _disp_old_0[_qp] / _q_point[_qp](0);
65  }
66 
67  // The polar and azimuthal strains are equivalent in this 1D problem
68  A(2, 2) = A(1, 1);
69  Fbar(2, 2) = Fbar(1, 1);
70 
71  // very nearly A = gradU - gradUold, adapted to cylindrical coords
72  A -= Fbar;
73 
74  total_strain_increment = 0.5 * (A + A.transpose());
75 }
registerADMooseObject("TensorMechanicsApp", ADComputeRSphericalIncrementalStrain)
ADComputeRSphericalIncrementalStrain(const InputParameters &parameters)
ADComputeIncrementalSmallStrain defines a strain increment and rotation increment (=1)...
virtual void computeTotalStrainIncrement(ADRankTwoTensor &total_strain_increment) override
Computes the current and old deformation gradients with the assumptions for 1D spherical symmetry geo...
ADComputeRSphericalIncrementalStrain defines a strain increment only for small strains in 1D spherica...
defineADValidParams(ADComputeRSphericalIncrementalStrain, ADComputeIncrementalSmallStrain, params.addClassDescription("Compute a strain increment for incremental strains in 1D spherical symmetry problems.");)