www.mooseframework.org
ADComputeRSphericalFiniteStrain.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 
21  params.addClassDescription(
22  "Compute a strain increment and rotation increment for finite strains "
23  "in 1D spherical symmetry problems."););
24 
25 template <ComputeStage compute_stage>
27  const InputParameters & parameters)
28  : ADComputeFiniteStrain<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 {
49  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
50  {
51  // Deformation gradient calculation in cylindrical coordinates
52  ADRankTwoTensor A; // Deformation gradient
53  RankTwoTensor Fbar; // Old Deformation gradient
54 
55  // Step through calculating the current and old deformation gradients
56  // Only diagonal components are nonzero because this is a 1D material
57  // Note: x_disp is the radial displacement
58  A(0, 0) = (*_grad_disp[0])[_qp](0);
59  Fbar(0, 0) = (*_grad_disp_old[0])[_qp](0);
60 
61  // The polar and azimuthal strains are functions of radial displacement
62  if (!MooseUtils::relativeFuzzyEqual(_q_point[_qp](0), 0.0))
63  {
64  A(1, 1) = (*_disp[0])[_qp] / _q_point[_qp](0);
65  Fbar(1, 1) = _disp_old_0[_qp] / _q_point[_qp](0);
66  }
67 
68  // The polar and azimuthal strains are equivalent in this 1D problem
69  A(2, 2) = A(1, 1);
70  Fbar(2, 2) = Fbar(1, 1);
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 
82  computeQpStrain();
83  }
84 }
registerADMooseObject("TensorMechanicsApp", ADComputeRSphericalFiniteStrain)
defineADValidParams(ADComputeRSphericalFiniteStrain, ADComputeFiniteStrain, params.addClassDescription("Compute a strain increment and rotation increment for finite strains " "in 1D spherical symmetry problems.");)
ADComputeRSphericalFiniteStrain(const InputParameters &parameters)
ADComputeFiniteStrain defines a strain increment and rotation increment, for finite strains...
virtual void computeProperties()
Computes the current and old deformation gradients with the assumptions for 1D spherical symmetry geo...
ADComputeRSphericalFiniteStrain defines a strain increment and a rotation increment for finite strain...