https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ADDynamicStressDivergenceTensors.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
12
14
17{
20 "Residual due to stress related Rayleigh damping and HHT time integration terms");
21 params.addParam<MaterialPropertyName>("zeta",
22 0.0,
23 "Name of material property or a constant real "
24 "number defining the zeta parameter for the "
25 "Rayleigh damping.");
26 params.addParam<Real>("alpha", 0, "alpha parameter for HHT time integration");
27 params.addParam<bool>("static_initialization",
28 false,
29 "Set to true to get the system to "
30 "equilibrium under gravity by running a "
31 "quasi-static analysis (by solving Ku = F) "
32 "in the first time step");
33 return params;
34}
35
37 const InputParameters & parameters)
38 : ADStressDivergenceTensors(parameters),
39 _stress_older(getMaterialPropertyOlder<RankTwoTensor>(_base_name + "stress")),
40 _stress_old(getMaterialPropertyOld<RankTwoTensor>(_base_name + "stress")),
41 _zeta(getMaterialProperty<Real>("zeta")),
42 _alpha(getParam<Real>("alpha")),
43 _static_initialization(getParam<bool>("static_initialization"))
44{
45}
46
49{
64 ADReal residual;
66 {
67 // If static initialization is true, then in the first step residual is only Ku which is
68 // stress.grad(test).
69 residual = _stress[_qp].row(_component) * _grad_test[_i][_qp];
70
72 residual +=
73 _stress[_qp].trace() / 3.0 * (_avg_grad_test[_i] - _grad_test[_i][_qp](_component));
74 }
75 else if (_dt > 0)
76 {
77 residual =
79 (1.0 + _alpha + (1.0 + _alpha) * _zeta[_qp] / _dt) -
80 (_alpha + (1.0 + 2.0 * _alpha) * _zeta[_qp] / _dt) * _stress_old[_qp].row(_component) *
81 _grad_test[_i][_qp] +
83
85 residual += (_stress[_qp].trace() * (1.0 + _alpha + (1.0 + _alpha) * _zeta[_qp] / _dt) -
86 (_alpha + (1.0 + 2.0 * _alpha) * _zeta[_qp] / _dt) * _stress_old[_qp].trace() +
87 (_alpha * _zeta[_qp] / _dt) * _stress_older[_qp].trace()) /
89 }
90 else
91 residual = 0.0;
92
93 return residual;
94}
registerMooseObject("SolidMechanicsApp", ADDynamicStressDivergenceTensors)
DualNumber< Real, DNDerivativeType, true > ADReal
ADDynamicStressDivergenceTensors is the automatic differentiation version of DynamicStressDivergenceT...
const MaterialProperty< RankTwoTensor > & _stress_old
const MaterialProperty< RankTwoTensor > & _stress_older
The old and older states of the stress tensor that the divergence operator operates on.
ADDynamicStressDivergenceTensors(const InputParameters &parameters)
const ADTemplateVariableTestGradient< T > & _grad_test
ADStressDivergenceTensors is the automatic differentiation version of StressDivergenceTensors.
const unsigned int _component
An integer corresponding to the direction this kernel acts in.
std::vector< ADReal > _avg_grad_test
Gradient of test function averaged over the element. Used in volumetric locking correction calculatio...
const bool _volumetric_locking_correction
Flag for volumetric locking correction.
const ADMaterialProperty< R2 > & _stress
The stress tensor that the divergence operator operates on.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
unsigned int _i