https://mooseframework.inl.gov
Loading...
Searching...
No Matches
DynamicStressDivergenceTensors.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 : StressDivergenceTensors(parameters),
38 _stress_older(getMaterialPropertyOlderByName<RankTwoTensor>(_base_name + "stress")),
39 _stress_old(getMaterialPropertyOldByName<RankTwoTensor>(_base_name + "stress")),
40 _zeta(getMaterialProperty<Real>("zeta")),
41 _alpha(getParam<Real>("alpha")),
42 _static_initialization(getParam<bool>("static_initialization"))
43{
44}
45
46Real
48{
63 Real residual = 0.0;
64 if (_static_initialization && _t == _dt)
65 {
66 // If static initialization is true, then in the first step residual is only Ku which is
67 // stress.grad(test).
68 residual += _stress[_qp].row(_component) * _grad_test[_i][_qp];
69
71 residual += _stress[_qp].trace() / 3.0 *
72 (_avg_grad_test[_i][_component] - _grad_test[_i][_qp](_component));
73 }
74 else if (_dt > 0)
75 {
76 residual +=
77 _stress[_qp].row(_component) * _grad_test[_i][_qp] *
78 (1.0 + _alpha + (1.0 + _alpha) * _zeta[_qp] / _dt) -
79 (_alpha + (1.0 + 2.0 * _alpha) * _zeta[_qp] / _dt) * _stress_old[_qp].row(_component) *
80 _grad_test[_i][_qp] +
81 (_alpha * _zeta[_qp] / _dt) * _stress_older[_qp].row(_component) * _grad_test[_i][_qp];
82
84 residual += (_stress[_qp].trace() * (1.0 + _alpha + (1.0 + _alpha) * _zeta[_qp] / _dt) -
85 (_alpha + (1.0 + 2.0 * _alpha) * _zeta[_qp] / _dt) * _stress_old[_qp].trace() +
86 (_alpha * _zeta[_qp] / _dt) * _stress_older[_qp].trace()) /
87 3.0 * (_avg_grad_test[_i][_component] - _grad_test[_i][_qp](_component));
88 }
89
90 return residual;
91}
92
93Real
95{
96 if (_static_initialization && _t == _dt)
98 else if (_dt > 0)
100 (1.0 + _alpha + (1.0 + _alpha) * _zeta[_qp] / _dt);
101 else
102 return 0.0;
103}
104
105Real
107{
108 bool active = true;
109
110 for (unsigned int i = 0; i < _ndisp; ++i)
111 if (jvar == _disp_var[i])
112 active = true;
113
114 if (active)
115 {
116 if (_static_initialization && _t == _dt)
118 else if (_dt > 0)
120 (1.0 + _alpha + (1.0 + _alpha) * _zeta[_qp] / _dt);
121 else
122 return 0.0;
123 }
124
125 return 0;
126}
registerMooseObject("SolidMechanicsApp", DynamicStressDivergenceTensors)
DynamicStressDivergenceTensors derives from StressDivergenceTensors and adds stress related Rayleigh ...
const MaterialProperty< Real > & _zeta
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
const MaterialProperty< RankTwoTensor > & _stress_older
The old and older states of the stress tensor that the divergence operator operates on.
const MaterialProperty< RankTwoTensor > & _stress_old
DynamicStressDivergenceTensors(const InputParameters &parameters)
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)
StressDivergenceTensors mostly copies from StressDivergence.
std::vector< unsigned int > _disp_var
Displacement variables IDs.
const unsigned int _component
An integer corresponding to the direction this kernel acts in.
const MaterialProperty< RankTwoTensor > & _stress
The stress tensor that the divergence operator operates on.
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
bool _volumetric_locking_correction
Flag for volumetric locking correction.
static InputParameters validParams()
unsigned int _ndisp
Coupled displacement variables.
std::vector< std::vector< Real > > _avg_grad_test
Gradient of test function averaged over the element. Used in volumetric locking correction calculatio...
virtual Real computeQpJacobian() override