#include <StressDivergenceRZ.h>
Definition at line 22 of file StressDivergenceRZ.h.
◆ StressDivergenceRZ()
StressDivergenceRZ::StressDivergenceRZ |
( |
const InputParameters & |
parameters | ) |
|
Definition at line 49 of file StressDivergenceRZ.C.
51 _stress(getMaterialProperty<SymmTensor>(
"stress")),
52 _Jacobian_mult(getMaterialProperty<SymmElasticityTensor>(
"Jacobian_mult")),
53 _d_stress_dT(getMaterialProperty<SymmTensor>(
"d_stress_dT")),
54 _component(getParam<unsigned int>(
"component")),
65 mooseDeprecated(
name(),
": StressDivergenceRZ is deprecated. \
66 The solid_mechanics module will be removed from MOOSE on July 31, 2020. \
67 Please update your input files to utilize the tensor_mechanics equivalents of \
68 models based on solid_mechanics. A detailed migration guide that was developed \
69 for BISON, but which is generally applicable to any MOOSE model is available at: \
70 https://mooseframework.org/bison/tutorials/mechanics_conversion/overview.html");
◆ calculateJacobian()
Real StressDivergenceRZ::calculateJacobian |
( |
unsigned int |
ivar, |
|
|
unsigned int |
jvar |
|
) |
| |
|
protected |
Definition at line 226 of file StressDivergenceRZ.C.
232 test.
xx() = _grad_test[_i][_qp](0);
233 test.
xy() = 0.5 * _grad_test[_i][_qp](1);
234 test.
zz() = _test[_i][_qp] / _q_point[_qp](0);
238 test.
xy() = 0.5 * _grad_test[_i][_qp](0);
239 test.
yy() = _grad_test[_i][_qp](1);
243 phi.
xx() = _grad_phi[_j][_qp](0);
244 phi.
xy() = 0.5 * _grad_phi[_j][_qp](1);
245 phi.
zz() = _phi[_j][_qp] / _q_point[_qp](0);
249 phi.
xy() = 0.5 * _grad_phi[_j][_qp](0);
250 phi.
yy() = _grad_phi[_j][_qp](1);
264 new_test(0) = _grad_test[_i][_qp](0) + _test[_i][_qp] / _q_point[_qp](0);
265 new_test(1) = _grad_test[_i][_qp](1);
266 new_phi(0) = _grad_phi[_j][_qp](0) + _phi[_j][_qp] / _q_point[_qp](0);
267 new_phi(1) = _grad_phi[_j][_qp](1);
275 if (ivar == 0 && jvar == 0)
277 (sum_3x1(0) * test.
xx() + sum_3x1(2) * test.
zz()) * (
_avg_grad_phi[_j][0] - new_phi(0));
278 else if (ivar == 0 && jvar == 1)
280 (sum_3x1(0) * test.
xx() + sum_3x1(2) * test.
zz()) * (
_avg_grad_phi[_j][1] - new_phi(1));
281 else if (ivar == 1 && jvar == 0)
289 val += (tmp.xx() + tmp.yy() + tmp.zz()) * (
_avg_grad_test[_i][0] - new_test(0));
291 val += (tmp.xx() + tmp.yy() + tmp.zz()) * (
_avg_grad_test[_i][1] - new_test(1));
293 return val / 3.0 + first_term;
Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().
◆ computeJacobian()
void StressDivergenceRZ::computeJacobian |
( |
| ) |
|
|
overrideprotectedvirtual |
Definition at line 152 of file StressDivergenceRZ.C.
154 prepareMatrixTag(_assembly, _var.number(), _var.number());
160 for (_i = 0; _i < _test.size(); _i++)
164 for (_qp = 0; _qp < _qrule->n_points(); _qp++)
168 (_grad_test[_i][_qp](
_component) + _test[_i][_qp] / _q_point[_qp](0)) * _JxW[_qp] *
172 _grad_test[_i][_qp](
_component) * _JxW[_qp] * _coord[_qp];
178 for (_i = 0; _i < _phi.size(); _i++)
184 for (_qp = 0; _qp < _qrule->n_points(); _qp++)
188 (_grad_phi[_i][_qp](
component) + _phi[_i][_qp] / _q_point[_qp](0)) * _JxW[_qp] *
199 for (_i = 0; _i < _test.size(); _i++)
200 for (_j = 0; _j < _phi.size(); _j++)
201 for (_qp = 0; _qp < _qrule->n_points(); _qp++)
204 accumulateTaggedLocalMatrix();
206 if (_has_diag_save_in)
208 unsigned int rows = _local_ke.m();
209 DenseVector<Number> diag(rows);
210 for (
unsigned int i = 0; i < rows; i++)
211 diag(i) = _local_ke(i, i);
213 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
214 for (
const auto & var : _diag_save_in)
215 var->sys().solution().add_vector(diag, var->dofIndices());
Referenced by computeOffDiagJacobian().
◆ computeOffDiagJacobian()
void StressDivergenceRZ::computeOffDiagJacobian |
( |
MooseVariableFEBase & |
jvar | ) |
|
|
overrideprotectedvirtual |
Definition at line 297 of file StressDivergenceRZ.C.
299 size_t jvar_num = jvar.number();
300 if (jvar_num == _var.number())
306 auto phi_size = _sys.getVariable(_tid, jvar.number()).dofIndices().size();
312 for (_i = 0; _i < _test.size(); _i++)
316 for (_qp = 0; _qp < _qrule->n_points(); _qp++)
320 (_grad_test[_i][_qp](
_component) + _test[_i][_qp] / _q_point[_qp](0)) * _JxW[_qp] *
324 _grad_test[_i][_qp](
_component) * _JxW[_qp] * _coord[_qp];
330 for (_i = 0; _i < phi_size; _i++)
336 for (_qp = 0; _qp < _qrule->n_points(); _qp++)
340 (_grad_phi[_i][_qp](
component) + _phi[_i][_qp] / _q_point[_qp](0)) * _JxW[_qp] *
344 _grad_phi[_i][_qp](
component) * _JxW[_qp] * _coord[_qp];
352 prepareMatrixTag(_assembly, _var.number(), jvar_num);
354 for (_i = 0; _i < _test.size(); _i++)
355 for (_j = 0; _j < phi_size; _j++)
356 for (_qp = 0; _qp < _qrule->n_points(); _qp++)
359 accumulateTaggedLocalMatrix();
◆ computeQpJacobian()
Real StressDivergenceRZ::computeQpJacobian |
( |
| ) |
|
|
overrideprotectedvirtual |
◆ computeQpOffDiagJacobian()
Real StressDivergenceRZ::computeQpOffDiagJacobian |
( |
unsigned int |
jvar | ) |
|
|
overrideprotectedvirtual |
Definition at line 364 of file StressDivergenceRZ.C.
380 test.
xx() = _grad_test[_i][_qp](0);
381 test.
xy() = 0.5 * _grad_test[_i][_qp](1);
382 test.
zz() = _test[_i][_qp] / _q_point[_qp](0);
386 test.
xy() = 0.5 * _grad_test[_i][_qp](0);
387 test.
yy() = _grad_test[_i][_qp](1);
389 return _d_stress_dT[_qp].doubleContraction(test) * _phi[_j][_qp];
Referenced by computeOffDiagJacobian().
◆ computeQpResidual()
Real StressDivergenceRZ::computeQpResidual |
( |
| ) |
|
|
overrideprotectedvirtual |
Definition at line 116 of file StressDivergenceRZ.C.
121 div = _grad_test[_i][_qp](0) *
_stress[_qp].xx() +
123 +_test[_i][_qp] / _q_point[_qp](0) *
_stress[_qp].zz() +
124 +_grad_test[_i][_qp](1) *
_stress[_qp].xy();
128 div += (
_avg_grad_test[_i][0] - _grad_test[_i][_qp](0) - _test[_i][_qp] / _q_point[_qp](0)) *
135 _grad_test[_i][_qp](1) *
_stress[_qp].yy() +
137 _grad_test[_i][_qp](0) *
_stress[_qp].xy();
145 mooseError(
"Invalid component");
Referenced by computeResidual().
◆ computeResidual()
void StressDivergenceRZ::computeResidual |
( |
| ) |
|
|
overrideprotectedvirtual |
Definition at line 74 of file StressDivergenceRZ.C.
76 prepareVectorTag(_assembly, _var.number());
82 for (_i = 0; _i < _test.size(); _i++)
86 for (_qp = 0; _qp < _qrule->n_points(); _qp++)
90 (_grad_test[_i][_qp](
_component) + _test[_i][_qp] / _q_point[_qp](0)) * _JxW[_qp] *
94 _grad_test[_i][_qp](
_component) * _JxW[_qp] * _coord[_qp];
100 precalculateResidual();
101 for (_i = 0; _i < _test.size(); _i++)
102 for (_qp = 0; _qp < _qrule->n_points(); _qp++)
105 accumulateTaggedLocalResidual();
109 Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
110 for (
const auto & var : _save_in)
111 var->sys().solution().add_vector(_local_re, var->dofIndices());
◆ _avg_grad_phi
std::vector<std::vector<Real> > StressDivergenceRZ::_avg_grad_phi |
|
private |
◆ _avg_grad_test
std::vector<std::vector<Real> > StressDivergenceRZ::_avg_grad_test |
|
private |
◆ _component
const unsigned int StressDivergenceRZ::_component |
|
private |
◆ _d_stress_dT
const MaterialProperty<SymmTensor>& StressDivergenceRZ::_d_stress_dT |
|
protected |
◆ _Jacobian_mult
◆ _rdisp_coupled
const bool StressDivergenceRZ::_rdisp_coupled |
|
private |
◆ _rdisp_var
const unsigned int StressDivergenceRZ::_rdisp_var |
|
private |
◆ _stress
const MaterialProperty<SymmTensor>& StressDivergenceRZ::_stress |
|
protected |
◆ _temp_coupled
const bool StressDivergenceRZ::_temp_coupled |
|
private |
◆ _temp_var
const unsigned int StressDivergenceRZ::_temp_var |
|
private |
◆ _volumetric_locking_correction
bool StressDivergenceRZ::_volumetric_locking_correction |
|
private |
◆ _zdisp_coupled
const bool StressDivergenceRZ::_zdisp_coupled |
|
private |
◆ _zdisp_var
const unsigned int StressDivergenceRZ::_zdisp_var |
|
private |
The documentation for this class was generated from the following files: