www.mooseframework.org
ADStressDivergenceRSphericalTensors.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 "ElasticityTensorTools.h"
12 #include "FEProblem.h"
13 #include "MooseMesh.h"
14 #include "Assembly.h"
15 
17 
20 {
22  params.addClassDescription(
23  "Calculate stress divergence for a spherically symmetric 1D problem in polar coordinates.");
24  params.set<unsigned int>("component") = 0;
25  return params;
26 }
27 
29  const InputParameters & parameters)
30  : ADStressDivergenceTensors(parameters)
31 {
32  if (_component != 0)
33  mooseError("Invalid component for this 1D RSpherical problem.");
34 }
35 
36 void
38 {
40  mooseError("The coordinate system in the Problem block must be set to RSPHERICAL for 1D "
41  "spherically symmetric geometries.");
42 }
43 
44 ADReal
46 {
47  return _grad_test[_i][_qp](0) * _stress[_qp](0, 0) + // stress_{rr} part 1
48  (_test[_i][_qp] / _ad_q_point[_qp](0)) * _stress[_qp](1, 1) + // stress_{\theta \theta}
49  (_test[_i][_qp] / _ad_q_point[_qp](0)) * _stress[_qp](2, 2); // stress_{\phi \phi}
50 }
const ADTemplateVariableTestGradient< T > & _grad_test
const unsigned int _component
An integer corresponding to the direction this kernel acts in.
Moose::CoordinateSystemType getBlockCoordSystem()
T & set(const std::string &name, bool quiet_mode=false)
registerMooseObject("SolidMechanicsApp", ADStressDivergenceRSphericalTensors)
const ADMaterialProperty< R2 > & _stress
The stress tensor that the divergence operator operates on.
COORD_RSPHERICAL
const ADTemplateVariableTestValue< T > & _test
ADStressDivergenceRSphericalTensors is the automatic differentiation version of StressDivergenceTenso...
ADStressDivergenceRSphericalTensors(const InputParameters &parameters)
const MooseArray< ADPoint > & _ad_q_point
unsigned int _i
DualReal ADReal
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
ADStressDivergenceTensors is the automatic differentiation version of StressDivergenceTensors.
unsigned int _qp