www.mooseframework.org
ADComputeAxisymmetricRZIncrementalStrain.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 
16 
19  params.addClassDescription(
20  "Compute a strain increment and rotation increment for finite strains "
21  "under axisymmetric assumptions."););
22 
23 template <ComputeStage compute_stage>
25  const InputParameters & parameters)
26  : ADCompute2DIncrementalStrain<compute_stage>(parameters),
27  _disp_old_0(coupledValueOld("displacements", 0))
28 {
29 }
30 
31 template <ComputeStage compute_stage>
32 void
34 {
36 
37  if (getBlockCoordSystem() != Moose::COORD_RZ)
38  mooseError("The coordinate system must be set to RZ for Axisymmetric geometries.");
39 
40  if (_out_of_plane_direction != 2)
41  paramError("out_of_plane_direction",
42  "The out-of-plane direction for axisymmetric systems is currently restricted to z");
43 }
44 
45 template <ComputeStage compute_stage>
46 ADReal
48 {
49  if (!MooseUtils::absoluteFuzzyEqual(_q_point[_qp](0), 0.0))
50  return (*_disp[0])[_qp] / _q_point[_qp](0);
51  else
52  return 0.0;
53 }
54 
55 template <ComputeStage compute_stage>
56 Real
58 {
59  if (!MooseUtils::absoluteFuzzyEqual(_q_point[_qp](0), 0.0))
60  return _disp_old_0[_qp] / _q_point[_qp](0);
61  else
62  return 0.0;
63 }
defineADValidParams(ADComputeAxisymmetricRZIncrementalStrain, ADCompute2DIncrementalStrain, params.addClassDescription("Compute a strain increment and rotation increment for finite strains " "under axisymmetric assumptions.");)
ADCompute2DIncrementalStrain defines a strain increment only for incremental strains in 2D geometries...
ADComputeAxisymmetricRZIncrementalStrain defines a strain increment only for incremental strains in a...
registerADMooseObject("TensorMechanicsApp", ADComputeAxisymmetricRZIncrementalStrain)
Real computeOutOfPlaneGradDispOld() override
Computes the old out-of-plane component of the displacement gradient; as a virtual function...
ADComputeAxisymmetricRZIncrementalStrain(const InputParameters &parameters)
ADReal computeOutOfPlaneGradDisp() override
Computes the current out-of-plane component of the displacement gradient; as a virtual function...