Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
StressDivergenceRZTensors Class Reference

StressDivergenceRZTensors is a modification of StressDivergenceTensors to accommodate the Axisymmetric material models that use cylindrical coordinates. More...

#include <StressDivergenceRZTensors.h>

Inheritance diagram for StressDivergenceRZTensors:
[legend]

Public Types

typedef std::vector< intJvarMap
 

Public Member Functions

 StressDivergenceRZTensors (const InputParameters &parameters)
 
virtual void computeJacobian () override
 
virtual void computeOffDiagJacobian (unsigned int jvar) override
 
unsigned int mapJvarToCvar (unsigned int jvar)
 
int mapJvarToCvar (unsigned int jvar, const JvarMap &jvar_map)
 
bool mapJvarToCvar (unsigned int jvar, unsigned int &cvar)
 
const JvarMapgetJvarMap ()
 
const JvarMapgetParameterJvarMap (std::string parameter_name)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void initialSetup () override
 
virtual Real computeQpResidual () override
 
virtual Real computeQpJacobian () override
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar) override
 
virtual void computeAverageGradientTest () override
 
virtual void computeAverageGradientPhi () override
 
Real calculateJacobian (unsigned int ivar, unsigned int jvar)
 
virtual void computeResidual () override
 
virtual void computeFiniteDeformJacobian ()
 

Protected Attributes

const std::string _base_name
 Base name of the material system that this kernel applies to. More...
 
bool _use_finite_deform_jacobian
 
const MaterialProperty< RankTwoTensor > & _stress
 The stress tensor that the divergence operator operates on. More...
 
const MaterialProperty< RankFourTensor > & _Jacobian_mult
 
std::vector< RankFourTensor_finite_deform_Jacobian_mult
 
const MaterialProperty< RankTwoTensor > * _deformation_gradient
 
const MaterialProperty< RankTwoTensor > * _deformation_gradient_old
 
const MaterialProperty< RankTwoTensor > * _rotation_increment
 
const unsigned int _component
 An integer corresponding to the direction this kernel acts in. More...
 
unsigned int _ndisp
 Coupled displacement variables. More...
 
std::vector< unsigned int_disp_var
 Displacement variables IDs. More...
 
std::vector< std::vector< const MaterialProperty< RankTwoTensor > * > > _deigenstrain_dargs
 eigen strain derivatives wrt coupled variables More...
 
const bool _out_of_plane_strain_coupled
 
const VariableValue *const _out_of_plane_strain
 
const unsigned int _out_of_plane_strain_var
 
const unsigned int _out_of_plane_direction
 
const bool _use_displaced_mesh
 Whether this object is acting on the displaced mesh. More...
 
std::vector< std::vector< Real > > _avg_grad_test
 Gradient of test function averaged over the element. Used in volumetric locking correction calculation. More...
 
std::vector< std::vector< Real > > _avg_grad_phi
 Gradient of phi function averaged over the element. Used in volumetric locking correction calculation. More...
 
bool _volumetric_locking_correction
 Flag for volumetric locking correction. More...
 
const unsigned int _n_args
 

Detailed Description

StressDivergenceRZTensors is a modification of StressDivergenceTensors to accommodate the Axisymmetric material models that use cylindrical coordinates.

This kernel is for symmetrical loading only. The key modifications are a result of the circumferential stress' dependence on displacement in the axial direction. Reference: Cook et.al. Concepts and Applications of Finite Element Analysis, 4th Ed. 2002. p 510. Within this kernel, '_disp_x' refers to displacement in the radial direction, u_r, and '_disp_y' refers to displacement in the axial direction, u_z. The COORD_TYPE in the Problem block must be set to RZ.

Definition at line 27 of file StressDivergenceRZTensors.h.

Constructor & Destructor Documentation

◆ StressDivergenceRZTensors()

StressDivergenceRZTensors::StressDivergenceRZTensors ( const InputParameters parameters)

Definition at line 32 of file StressDivergenceRZTensors.C.

33  : StressDivergenceTensors(parameters)
34 {
35 }
StressDivergenceTensors(const InputParameters &parameters)

Member Function Documentation

◆ calculateJacobian()

Real StressDivergenceRZTensors::calculateJacobian ( unsigned int  ivar,
unsigned int  jvar 
)
protected

Definition at line 130 of file StressDivergenceRZTensors.C.

Referenced by computeQpJacobian(), and computeQpOffDiagJacobian().

131 {
132  // B^T_i * C * B_j
133  RealGradient test, test_z, phi, phi_z;
134  Real first_term = 0.0;
135  if (ivar == 0) // Case grad_test for x, requires contributions from stress_xx, stress_xy, and
136  // stress_zz
137  {
138  test(0) = _grad_test[_i][_qp](0);
139  test(1) = _grad_test[_i][_qp](1);
140  test_z(2) = _test[_i][_qp] / _q_point[_qp](0);
141  }
142  else // Case grad_test for y
143  {
144  test(0) = _grad_test[_i][_qp](0);
145  test(1) = _grad_test[_i][_qp](1);
146  }
147 
148  if (jvar == 0)
149  {
150  phi(0) = _grad_phi[_j][_qp](0);
151  phi(1) = _grad_phi[_j][_qp](1);
152  phi_z(2) = _phi[_j][_qp] / _q_point[_qp](0);
153  }
154  else
155  {
156  phi(0) = _grad_phi[_j][_qp](0);
157  phi(1) = _grad_phi[_j][_qp](1);
158  }
159 
160  if (ivar == 0 &&
161  jvar == 0) // Case when both phi and test are functions of x and z; requires four terms
162  {
164  _Jacobian_mult[_qp], ivar, jvar, test, phi); // test_x and phi_x
165  const Real second_sum = ElasticityTensorTools::elasticJacobian(
166  _Jacobian_mult[_qp], 2, 2, test_z, phi_z); // test_z and phi_z
167  const Real mixed_sum1 = ElasticityTensorTools::elasticJacobian(
168  _Jacobian_mult[_qp], ivar, 2, test, phi_z); // test_x and phi_z
169  const Real mixed_sum2 = ElasticityTensorTools::elasticJacobian(
170  _Jacobian_mult[_qp], 2, jvar, test_z, phi); // test_z and phi_x
171 
172  first_term = first_sum + second_sum + mixed_sum1 + mixed_sum2;
173  }
174  else if (ivar == 0 && jvar == 1)
175  {
177  _Jacobian_mult[_qp], ivar, jvar, test, phi); // test_x and phi_y
178  const Real mixed_sum2 = ElasticityTensorTools::elasticJacobian(
179  _Jacobian_mult[_qp], 2, jvar, test_z, phi); // test_z and phi_y
180 
181  first_term = first_sum + mixed_sum2;
182  }
183  else if (ivar == 1 && jvar == 0)
184  {
185  const Real second_sum = ElasticityTensorTools::elasticJacobian(
186  _Jacobian_mult[_qp], ivar, jvar, test, phi); // test_y and phi_x
187  const Real mixed_sum1 = ElasticityTensorTools::elasticJacobian(
188  _Jacobian_mult[_qp], ivar, 2, test, phi_z); // test_y and phi_z
189 
190  first_term = second_sum + mixed_sum1;
191  }
192  else if (ivar == 1 && jvar == 1)
194  _Jacobian_mult[_qp], ivar, jvar, test, phi); // test_y and phi_y
195  else
196  mooseError("Invalid component in Jacobian Calculation");
197 
198  Real val = 0.0;
199  // volumetric locking correction
200  // K = Bbar^T_i * C * Bbar^T_j where Bbar = B + Bvol
201  // K = B^T_i * C * B_j + Bvol^T_i * C * Bvol_j + B^T_i * C * Bvol_j + Bvol^T_i * C * B_j
203  {
204  RealGradient new_test(2, 0.0);
205  RealGradient new_phi(2, 0.0);
206 
207  new_test(0) = _grad_test[_i][_qp](0) + _test[_i][_qp] / _q_point[_qp](0);
208  new_test(1) = _grad_test[_i][_qp](1);
209  new_phi(0) = _grad_phi[_j][_qp](0) + _phi[_j][_qp] / _q_point[_qp](0);
210  new_phi(1) = _grad_phi[_j][_qp](1);
211 
212  // Bvol^T_i * C * Bvol_j
213  val += _Jacobian_mult[_qp].sum3x3() * (_avg_grad_test[_i][ivar] - new_test(ivar)) *
214  (_avg_grad_phi[_j][jvar] - new_phi(jvar)) / 3.0;
215 
216  // B^T_i * C * Bvol_j
217  RealGradient sum_3x1 = _Jacobian_mult[_qp].sum3x1();
218  if (ivar == 0 && jvar == 0)
219  val += (sum_3x1(0) * test(0) + sum_3x1(2) * test_z(2)) * (_avg_grad_phi[_j][0] - new_phi(0));
220  else if (ivar == 0 && jvar == 1)
221  val += (sum_3x1(0) * test(0) + sum_3x1(2) * test_z(2)) * (_avg_grad_phi[_j][1] - new_phi(1));
222  else if (ivar == 1 && jvar == 0)
223  val += sum_3x1(1) * test(1) * (_avg_grad_phi[_j][0] - new_phi(0));
224  else
225  val += sum_3x1(1) * test(1) * (_avg_grad_phi[_j][1] - new_phi(1));
226 
227  // Bvol^T_i * C * B_j
228  // val = trace (C * B_j) *(avg_grad_test[_i][ivar] - new_test(ivar))
229  if (jvar == 0)
230  for (unsigned int i = 0; i < 3; ++i)
231  val +=
232  (_Jacobian_mult[_qp](i, i, 0, 0) * phi(0) + _Jacobian_mult[_qp](i, i, 0, 1) * phi(1) +
233  _Jacobian_mult[_qp](i, i, 2, 2) * phi_z(2)) *
234  (_avg_grad_test[_i][ivar] - new_test(ivar));
235  else if (jvar == 1)
236  for (unsigned int i = 0; i < 3; ++i)
237  val +=
238  (_Jacobian_mult[_qp](i, i, 0, 1) * phi(0) + _Jacobian_mult[_qp](i, i, 1, 1) * phi(1)) *
239  (_avg_grad_test[_i][ivar] - new_test(ivar));
240  }
241 
242  return val / 3.0 + first_term;
243 }
std::vector< std::vector< Real > > _avg_grad_phi
Gradient of phi function averaged over the element. Used in volumetric locking correction calculation...
bool _volumetric_locking_correction
Flag for volumetric locking correction.
void mooseError(Args &&... args)
std::vector< std::vector< Real > > _avg_grad_test
Gradient of test function averaged over the element. Used in volumetric locking correction calculatio...
Real elasticJacobian(const RankFourTensor &r4t, unsigned int i, unsigned int k, const RealGradient &grad_test, const RealGradient &grad_phi)
This is used for the standard kernel stress_ij*d(test)/dx_j, when varied wrt u_k Jacobian entry: d(st...
const MaterialProperty< RankFourTensor > & _Jacobian_mult
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ computeAverageGradientPhi()

void StressDivergenceRZTensors::computeAverageGradientPhi ( )
overrideprotectedvirtual

Reimplemented from StressDivergenceTensors.

Definition at line 268 of file StressDivergenceRZTensors.C.

269 {
270  _avg_grad_phi.resize(_phi.size());
271  for (_i = 0; _i < _phi.size(); ++_i)
272  {
273  _avg_grad_phi[_i].resize(2);
274  for (unsigned int component = 0; component < 2; ++component)
275  {
276  _avg_grad_phi[_i][component] = 0.0;
277  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
278  {
279  if (component == 0)
280  _avg_grad_phi[_i][component] +=
281  (_grad_phi[_i][_qp](component) + _phi[_i][_qp] / _q_point[_qp](0)) * _JxW[_qp] *
282  _coord[_qp];
283  else
284  _avg_grad_phi[_i][component] += _grad_phi[_i][_qp](component) * _JxW[_qp] * _coord[_qp];
285  }
286  _avg_grad_phi[_i][component] /= _current_elem_volume;
287  }
288  }
289 }
std::vector< std::vector< Real > > _avg_grad_phi
Gradient of phi function averaged over the element. Used in volumetric locking correction calculation...
static const std::string component
Definition: NS.h:153

◆ computeAverageGradientTest()

void StressDivergenceRZTensors::computeAverageGradientTest ( )
overrideprotectedvirtual

Reimplemented from StressDivergenceTensors.

Definition at line 246 of file StressDivergenceRZTensors.C.

247 {
248  // calculate volume averaged value of shape function derivative
249  _avg_grad_test.resize(_test.size());
250  for (_i = 0; _i < _test.size(); ++_i)
251  {
252  _avg_grad_test[_i].resize(2);
253  _avg_grad_test[_i][_component] = 0.0;
254  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
255  {
256  if (_component == 0)
257  _avg_grad_test[_i][_component] +=
258  (_grad_test[_i][_qp](_component) + _test[_i][_qp] / _q_point[_qp](0)) * _JxW[_qp] *
259  _coord[_qp];
260  else
261  _avg_grad_test[_i][_component] += _grad_test[_i][_qp](_component) * _JxW[_qp] * _coord[_qp];
262  }
263  _avg_grad_test[_i][_component] /= _current_elem_volume;
264  }
265 }
std::vector< std::vector< Real > > _avg_grad_test
Gradient of test function averaged over the element. Used in volumetric locking correction calculatio...
const unsigned int _component
An integer corresponding to the direction this kernel acts in.

◆ computeFiniteDeformJacobian()

void StressDivergenceTensors::computeFiniteDeformJacobian ( )
protectedvirtualinherited

Definition at line 369 of file StressDivergenceTensors.C.

Referenced by StressDivergenceTensors::computeJacobian(), and StressDivergenceTensors::computeOffDiagJacobian().

370 {
371  usingTensorIndices(i_, j_, k_, l_);
372  const auto I = RankTwoTensor::Identity();
373  const RankFourTensor I2 = I.times<i_, k_, j_, l_>(I);
374 
375  // Bring back to unrotated config
376  const RankTwoTensor unrotated_stress =
377  (*_rotation_increment)[_qp].transpose() * _stress[_qp] * (*_rotation_increment)[_qp];
378 
379  // Incremental deformation gradient Fhat
380  const RankTwoTensor Fhat =
381  (*_deformation_gradient)[_qp] * (*_deformation_gradient_old)[_qp].inverse();
382  const RankTwoTensor Fhatinv = Fhat.inverse();
383 
384  const RankTwoTensor rot_times_stress = (*_rotation_increment)[_qp] * unrotated_stress;
385  const RankFourTensor dstress_drot =
386  I.times<i_, k_, j_, l_>(rot_times_stress) + I.times<j_, k_, i_, l_>(rot_times_stress);
387  const RankFourTensor rot_rank_four =
388  (*_rotation_increment)[_qp].times<i_, k_, j_, l_>((*_rotation_increment)[_qp]);
389  const RankFourTensor drot_dUhatinv = Fhat.times<i_, k_, j_, l_>(I);
390 
391  const RankTwoTensor A = I - Fhatinv;
392 
393  // Ctilde = Chat^-1 - I
394  const RankTwoTensor Ctilde = A * A.transpose() - A - A.transpose();
395  const RankFourTensor dCtilde_dFhatinv =
396  -I.times<i_, k_, j_, l_>(A) - I.times<j_, k_, i_, l_>(A) + I2 + I.times<j_, k_, i_, l_>(I);
397 
398  // Second order approximation of Uhat - consistent with strain increment definition
399  // const RankTwoTensor Uhat = I - 0.5 * Ctilde - 3.0/8.0 * Ctilde * Ctilde;
400 
401  RankFourTensor dUhatinv_dCtilde =
402  0.5 * I2 - 1.0 / 8.0 * (I.times<i_, k_, j_, l_>(Ctilde) + Ctilde.times<i_, k_, j_, l_>(I));
403  RankFourTensor drot_dFhatinv = drot_dUhatinv * dUhatinv_dCtilde * dCtilde_dFhatinv;
404 
405  drot_dFhatinv -= Fhat.times<i_, k_, j_, l_>((*_rotation_increment)[_qp].transpose());
406  _finite_deform_Jacobian_mult[_qp] = dstress_drot * drot_dFhatinv;
407 
408  const RankFourTensor dstrain_increment_dCtilde =
409  -0.5 * I2 + 0.25 * (I.times<i_, k_, j_, l_>(Ctilde) + Ctilde.times<i_, k_, j_, l_>(I));
411  rot_rank_four * _Jacobian_mult[_qp] * dstrain_increment_dCtilde * dCtilde_dFhatinv;
412  _finite_deform_Jacobian_mult[_qp] += Fhat.times<j_, k_, i_, l_>(_stress[_qp]);
413 
414  const RankFourTensor dFhat_dFhatinv = -Fhat.times<i_, k_, j_, l_>(Fhat.transpose());
415  const RankTwoTensor dJ_dFhatinv = dFhat_dFhatinv.innerProductTranspose(Fhat.ddet());
416 
417  // Component from Jacobian derivative
418  _finite_deform_Jacobian_mult[_qp] += _stress[_qp].times<i_, j_, k_, l_>(dJ_dFhatinv);
419 
420  // Derivative of Fhatinv w.r.t. undisplaced coordinates
421  const RankTwoTensor Finv = (*_deformation_gradient)[_qp].inverse();
422  const RankFourTensor dFhatinv_dGradu = -Fhatinv.times<i_, k_, j_, l_>(Finv.transpose());
423  _finite_deform_Jacobian_mult[_qp] = _finite_deform_Jacobian_mult[_qp] * dFhatinv_dGradu;
424 }
RankTwoTensorTempl< Real > inverse() const
static RankTwoTensorTempl Identity()
std::vector< RankFourTensor > _finite_deform_Jacobian_mult
const MaterialProperty< RankFourTensor > & _Jacobian_mult
RankTwoTensorTempl< Real > transpose() const
RankFourTensorTempl< Real > times(const RankTwoTensorTempl< Real > &b) const
RankTwoTensorTempl< Real > ddet() const
const MaterialProperty< RankTwoTensor > & _stress
The stress tensor that the divergence operator operates on.

◆ computeJacobian()

void StressDivergenceTensors::computeJacobian ( )
overridevirtualinherited

Definition at line 178 of file StressDivergenceTensors.C.

179 {
181  {
184  }
185 
187  {
188  _finite_deform_Jacobian_mult.resize(_qrule->n_points());
189 
190  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
192 
194  }
195  else
197 }
bool _volumetric_locking_correction
Flag for volumetric locking correction.
std::vector< RankFourTensor > _finite_deform_Jacobian_mult
virtual void computeJacobian() override
virtual void computeFiniteDeformJacobian()
virtual void computeJacobian() override
Definition: ALEKernel.C:34

◆ computeOffDiagJacobian()

void StressDivergenceTensors::computeOffDiagJacobian ( unsigned int  jvar)
overridevirtualinherited

Reimplemented from JvarMapKernelInterface< ALEKernel >.

Definition at line 200 of file StressDivergenceTensors.C.

201 {
203  {
206  }
207 
209  {
210  _finite_deform_Jacobian_mult.resize(_qrule->n_points());
211 
212  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
214 
216  }
217  else
219 }
bool _volumetric_locking_correction
Flag for volumetric locking correction.
std::vector< RankFourTensor > _finite_deform_Jacobian_mult
virtual void computeOffDiagJacobian(unsigned int jvar) override
Definition: ALEKernel.C:41
virtual void computeFiniteDeformJacobian()
virtual void computeOffDiagJacobian(unsigned int jvar) override

◆ computeQpJacobian()

Real StressDivergenceRZTensors::computeQpJacobian ( )
overrideprotectedvirtual

Reimplemented from StressDivergenceTensors.

Definition at line 83 of file StressDivergenceRZTensors.C.

84 {
86 }
const unsigned int _component
An integer corresponding to the direction this kernel acts in.
Real calculateJacobian(unsigned int ivar, unsigned int jvar)

◆ computeQpOffDiagJacobian()

Real StressDivergenceRZTensors::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Reimplemented from StressDivergenceTensors.

Definition at line 89 of file StressDivergenceRZTensors.C.

90 {
91  for (unsigned int i = 0; i < _ndisp; ++i)
92  if (jvar == _disp_var[i])
93  return calculateJacobian(_component, i);
94 
95  // bail out if jvar is not coupled
96  if (getJvarMap()[jvar] < 0)
97  return 0.0;
98 
99  // off-diagonal Jacobian with respect to any other coupled variable
100  const unsigned int cvar = mapJvarToCvar(jvar);
101  RankTwoTensor total_deigenstrain;
102  for (const auto deigenstrain_darg : _deigenstrain_dargs[cvar])
103  total_deigenstrain += (*deigenstrain_darg)[_qp];
104 
105  Real jac = 0.0;
106  if (_component == 0)
107  {
108  for (unsigned k = 0; k < LIBMESH_DIM; ++k)
109  for (unsigned l = 0; l < LIBMESH_DIM; ++l)
110  jac -= (_grad_test[_i][_qp](0) * _Jacobian_mult[_qp](0, 0, k, l) +
111  _test[_i][_qp] / _q_point[_qp](0) * _Jacobian_mult[_qp](2, 2, k, l) +
112  _grad_test[_i][_qp](1) * _Jacobian_mult[_qp](0, 1, k, l)) *
113  total_deigenstrain(k, l);
114  return jac * _phi[_j][_qp];
115  }
116  else if (_component == 1)
117  {
118  for (unsigned k = 0; k < LIBMESH_DIM; ++k)
119  for (unsigned l = 0; l < LIBMESH_DIM; ++l)
120  jac -= (_grad_test[_i][_qp](1) * _Jacobian_mult[_qp](1, 1, k, l) +
121  _grad_test[_i][_qp](0) * _Jacobian_mult[_qp](1, 0, k, l)) *
122  total_deigenstrain(k, l);
123  return jac * _phi[_j][_qp];
124  }
125 
126  return 0.0;
127 }
unsigned int _ndisp
Coupled displacement variables.
const unsigned int _component
An integer corresponding to the direction this kernel acts in.
std::vector< unsigned int > _disp_var
Displacement variables IDs.
std::vector< std::vector< const MaterialProperty< RankTwoTensor > * > > _deigenstrain_dargs
eigen strain derivatives wrt coupled variables
unsigned int mapJvarToCvar(unsigned int jvar)
const MaterialProperty< RankFourTensor > & _Jacobian_mult
Real calculateJacobian(unsigned int ivar, unsigned int jvar)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string k
Definition: NS.h:130

◆ computeQpResidual()

Real StressDivergenceRZTensors::computeQpResidual ( )
overrideprotectedvirtual

Reimplemented from StressDivergenceTensors.

Definition at line 53 of file StressDivergenceRZTensors.C.

54 {
55  Real div = 0.0;
56  if (_component == 0)
57  {
58  div = _grad_test[_i][_qp](0) * _stress[_qp](0, 0) +
59  +(_test[_i][_qp] / _q_point[_qp](0)) * _stress[_qp](2, 2) +
60  +_grad_test[_i][_qp](1) * _stress[_qp](0, 1); // stress_{rz}
61 
62  // volumetric locking correction
64  div += (_avg_grad_test[_i][0] - _grad_test[_i][_qp](0) - _test[_i][_qp] / _q_point[_qp](0)) *
65  (_stress[_qp].trace()) / 3.0;
66  }
67  else if (_component == 1)
68  {
69  div = _grad_test[_i][_qp](1) * _stress[_qp](1, 1) +
70  +_grad_test[_i][_qp](0) * _stress[_qp](1, 0); // stress_{zr}
71 
72  // volumetric locking correction
74  div += (_avg_grad_test[_i][1] - _grad_test[_i][_qp](1)) * (_stress[_qp].trace()) / 3.0;
75  }
76  else
77  mooseError("Invalid component for this AxisymmetricRZ problem.");
78 
79  return div;
80 }
bool _volumetric_locking_correction
Flag for volumetric locking correction.
void mooseError(Args &&... args)
std::vector< std::vector< Real > > _avg_grad_test
Gradient of test function averaged over the element. Used in volumetric locking correction calculatio...
const unsigned int _component
An integer corresponding to the direction this kernel acts in.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MaterialProperty< RankTwoTensor > & _stress
The stress tensor that the divergence operator operates on.

◆ computeResidual()

void StressDivergenceTensors::computeResidual ( )
overrideprotectedvirtualinherited

Definition at line 137 of file StressDivergenceTensors.C.

138 {
139  prepareVectorTag(_assembly, _var.number());
140 
143 
144  precalculateResidual();
145  for (_i = 0; _i < _test.size(); ++_i)
146  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
147  _local_re(_i) += _JxW[_qp] * _coord[_qp] * computeQpResidual();
148 
149  accumulateTaggedLocalResidual();
150 
151  if (_has_save_in)
152  {
153  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
154  for (const auto & var : _save_in)
155  var->sys().solution().add_vector(_local_re, var->dofIndices());
156  }
157 }
bool _volumetric_locking_correction
Flag for volumetric locking correction.
virtual Real computeQpResidual() override

◆ initialSetup()

void StressDivergenceRZTensors::initialSetup ( )
overrideprotectedvirtual

Reimplemented from StressDivergenceTensors.

Definition at line 38 of file StressDivergenceRZTensors.C.

39 {
40  // check if any of the eigenstrains provide derivatives wrt variables that are not coupled
41  for (auto eigenstrain_name : getParam<std::vector<MaterialPropertyName>>("eigenstrain_names"))
42  validateNonlinearCoupling<RankTwoTensor>(eigenstrain_name);
43 
44  if (getBlockCoordSystem() != Moose::COORD_RZ)
45  mooseError("The coordinate system in the Problem block must be set to RZ for axisymmetric "
46  "geometries.");
47 
48  if (getBlockCoordSystem() == Moose::COORD_RZ && _fe_problem.getAxisymmetricRadialCoord() != 0)
49  mooseError("rz_coord_axis=Y is the only supported option for StressDivergenceRZTensors");
50 }
void mooseError(Args &&... args)

◆ validParams()

InputParameters StressDivergenceRZTensors::validParams ( )
static

Definition at line 18 of file StressDivergenceRZTensors.C.

19 {
21  params.addClassDescription(
22  "Calculate stress divergence for an axisymmetric problem in cylindrical coordinates.");
23  params.addRequiredRangeCheckedParam<unsigned int>(
24  "component",
25  "component < 2",
26  "An integer corresponding to the direction the variable this kernel acts in. (0 "
27  "refers to the radial and 1 to the axial displacement.)");
28  params.set<bool>("use_displaced_mesh") = true;
29  return params;
30 }
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
T & set(const std::string &name, bool quiet_mode=false)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _avg_grad_phi

std::vector<std::vector<Real> > StressDivergenceTensors::_avg_grad_phi
protectedinherited

Gradient of phi function averaged over the element. Used in volumetric locking correction calculation.

Definition at line 85 of file StressDivergenceTensors.h.

Referenced by calculateJacobian(), computeAverageGradientPhi(), StressDivergenceTensors::computeAverageGradientPhi(), StressDivergenceTensors::computeQpJacobian(), and StressDivergenceTensors::computeQpOffDiagJacobian().

◆ _avg_grad_test

std::vector<std::vector<Real> > StressDivergenceTensors::_avg_grad_test
protectedinherited

◆ _base_name

const std::string StressDivergenceTensors::_base_name
protectedinherited

Base name of the material system that this kernel applies to.

Definition at line 47 of file StressDivergenceTensors.h.

Referenced by StressDivergenceTensors::StressDivergenceTensors().

◆ _component

const unsigned int StressDivergenceTensors::_component
protectedinherited

◆ _deformation_gradient

const MaterialProperty<RankTwoTensor>* StressDivergenceTensors::_deformation_gradient
protectedinherited

◆ _deformation_gradient_old

const MaterialProperty<RankTwoTensor>* StressDivergenceTensors::_deformation_gradient_old
protectedinherited

◆ _deigenstrain_dargs

std::vector<std::vector<const MaterialProperty<RankTwoTensor> *> > StressDivergenceTensors::_deigenstrain_dargs
protectedinherited

◆ _disp_var

std::vector<unsigned int> StressDivergenceTensors::_disp_var
protectedinherited

◆ _finite_deform_Jacobian_mult

std::vector<RankFourTensor> StressDivergenceTensors::_finite_deform_Jacobian_mult
protectedinherited

◆ _Jacobian_mult

const MaterialProperty<RankFourTensor>& StressDivergenceTensors::_Jacobian_mult
protectedinherited

◆ _ndisp

unsigned int StressDivergenceTensors::_ndisp
protectedinherited

◆ _out_of_plane_direction

const unsigned int StressDivergenceTensors::_out_of_plane_direction
protectedinherited

◆ _out_of_plane_strain

const VariableValue* const StressDivergenceTensors::_out_of_plane_strain
protectedinherited

◆ _out_of_plane_strain_coupled

const bool StressDivergenceTensors::_out_of_plane_strain_coupled
protectedinherited

◆ _out_of_plane_strain_var

const unsigned int StressDivergenceTensors::_out_of_plane_strain_var
protectedinherited

◆ _rotation_increment

const MaterialProperty<RankTwoTensor>* StressDivergenceTensors::_rotation_increment
protectedinherited

◆ _stress

const MaterialProperty<RankTwoTensor>& StressDivergenceTensors::_stress
protectedinherited

◆ _use_displaced_mesh

const bool StressDivergenceTensors::_use_displaced_mesh
protectedinherited

Whether this object is acting on the displaced mesh.

Definition at line 79 of file StressDivergenceTensors.h.

Referenced by StressDivergenceTensors::computeQpJacobian(), and StressDivergenceTensors::computeQpResidual().

◆ _use_finite_deform_jacobian

bool StressDivergenceTensors::_use_finite_deform_jacobian
protectedinherited

◆ _volumetric_locking_correction

bool StressDivergenceTensors::_volumetric_locking_correction
protectedinherited

The documentation for this class was generated from the following files: