www.mooseframework.org
DynamicStressDivergenceTensors.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<StressDivergenceTensors>();
15  params.addClassDescription(
16  "Residual due to stress related Rayleigh damping and HHT time integration terms ");
17  params.addParam<MaterialPropertyName>("zeta",
18  0.0,
19  "Name of material property or a constant real "
20  "number defining the zeta parameter for the "
21  "Rayleigh damping.");
22  params.addParam<Real>("alpha", 0, "alpha parameter for HHT time integration");
23  params.addParam<bool>("static_initialization",
24  false,
25  "Set to true to get the system to "
26  "equillibrium under gravity by running a "
27  "quasi-static analysis (by solving Ku = F) "
28  "in the first time step");
29  return params;
30 }
31 
33  : StressDivergenceTensors(parameters),
34  _stress_older(getMaterialPropertyOlderByName<RankTwoTensor>(_base_name + "stress")),
35  _stress_old(getMaterialPropertyOldByName<RankTwoTensor>(_base_name + "stress")),
36  _zeta(getMaterialProperty<Real>("zeta")),
37  _alpha(getParam<Real>("alpha")),
38  _static_initialization(getParam<bool>("static_initialization"))
39 {
40 }
41 
42 Real
44 {
59  Real residual = 0.0;
60  if (_static_initialization && _t == _dt)
61  {
62  // If static inialization is true, then in the first step residual is only Ku which is
63  // stress.grad(test).
64  residual += _stress[_qp].row(_component) * _grad_test[_i][_qp];
65 
67  residual += _stress[_qp].trace() / 3.0 *
68  (_avg_grad_test[_i][_component] - _grad_test[_i][_qp](_component));
69  }
70  else if (_dt > 0)
71  {
72  residual +=
73  _stress[_qp].row(_component) * _grad_test[_i][_qp] *
74  (1.0 + _alpha + (1.0 + _alpha) * _zeta[_qp] / _dt) -
75  (_alpha + (1.0 + 2.0 * _alpha) * _zeta[_qp] / _dt) * _stress_old[_qp].row(_component) *
76  _grad_test[_i][_qp] +
77  (_alpha * _zeta[_qp] / _dt) * _stress_older[_qp].row(_component) * _grad_test[_i][_qp];
78 
80  residual += (_stress[_qp].trace() * (1.0 + _alpha + (1.0 + _alpha) * _zeta[_qp] / _dt) -
81  (_alpha + (1.0 + 2.0 * _alpha) * _zeta[_qp] / _dt) * _stress_old[_qp].trace() +
82  (_alpha * _zeta[_qp] / _dt) * _stress_older[_qp].trace()) /
83  3.0 * (_avg_grad_test[_i][_component] - _grad_test[_i][_qp](_component));
84  }
85 
86  return residual;
87 }
88 
89 Real
91 {
92  if (_static_initialization && _t == _dt)
94  else if (_dt > 0)
95  return StressDivergenceTensors::computeQpJacobian() * (1.0 + _alpha + _zeta[_qp] / _dt);
96  else
97  return 0.0;
98 }
99 
100 Real
102 {
103  bool active = true;
104 
105  for (unsigned int i = 0; i < _ndisp; ++i)
106  if (jvar == _disp_var[i])
107  active = true;
108 
109  if (active)
110  {
111  if (_static_initialization && _t == _dt)
113  else if (_dt > 0)
115  (1.0 + _alpha + _zeta[_qp] / _dt);
116  else
117  return 0.0;
118  }
119  if (_temp_coupled && jvar == _temp_var)
120  return 0.0;
121 
122  return 0;
123 }
InputParameters validParams< DynamicStressDivergenceTensors >()
bool _volumetric_locking_correction
Flag for volumetric locking correction.
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...
const MaterialProperty< Real > & _zeta
const MaterialProperty< RankTwoTensor > & _stress_old
virtual Real computeQpJacobian() override
std::vector< unsigned int > _disp_var
DynamicStressDivergenceTensors(const InputParameters &parameters)
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
const MaterialProperty< RankTwoTensor > & _stress_older
const MaterialProperty< RankTwoTensor > & _stress
InputParameters validParams< StressDivergenceTensors >()
StressDivergenceTensors mostly copies from StressDivergence.