https://mooseframework.inl.gov
MechanicsBaseNOSPD.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 
10 #include "MechanicsBaseNOSPD.h"
11 
14 {
16  params.addClassDescription("Base class for kernels of the stabilized non-ordinary "
17  "state-based peridynamic correspondence models");
18 
19  params.addParam<std::vector<MaterialPropertyName>>(
20  "eigenstrain_names",
21  {},
22  "List of eigenstrains to be coupled in non-ordinary state-based mechanics kernels");
23 
24  return params;
25 }
26 
28  : MechanicsBasePD(parameters),
29  _multi(getMaterialProperty<Real>("multi")),
30  _stress(getMaterialProperty<RankTwoTensor>("stress")),
31  _shape2(getMaterialProperty<RankTwoTensor>("rank_two_shape_tensor")),
32  _dgrad(getMaterialProperty<RankTwoTensor>("deformation_gradient")),
33  _ddgraddu(getMaterialProperty<RankTwoTensor>("ddeformation_gradient_du")),
34  _ddgraddv(getMaterialProperty<RankTwoTensor>("ddeformation_gradient_dv")),
35  _ddgraddw(getMaterialProperty<RankTwoTensor>("ddeformation_gradient_dw")),
36  _Jacobian_mult(getMaterialProperty<RankFourTensor>("Jacobian_mult")),
37  _eigenstrain_names(getParam<std::vector<MaterialPropertyName>>("eigenstrain_names")),
38  _deigenstrain_dT(_eigenstrain_names.size())
39 {
40  if (_temp_coupled)
41  for (unsigned int i = 0; i < _deigenstrain_dT.size(); ++i)
42  _deigenstrain_dT[i] =
43  &getMaterialPropertyDerivative<RankTwoTensor>(_eigenstrain_names[i], _temp_var->name());
44 }
45 
47 MechanicsBaseNOSPD::computeDSDU(unsigned int component, unsigned int nd)
48 {
49  // compute the derivative of stress w.r.t the solution components for small strain
50  RankTwoTensor dSdU;
51  if (component == 0)
52  dSdU = _Jacobian_mult[nd] * 0.5 * (_ddgraddu[nd].transpose() + _ddgraddu[nd]);
53  else if (component == 1)
54  dSdU = _Jacobian_mult[nd] * 0.5 * (_ddgraddv[nd].transpose() + _ddgraddv[nd]);
55  else if (component == 2)
56  dSdU = _Jacobian_mult[nd] * 0.5 * (_ddgraddw[nd].transpose() + _ddgraddw[nd]);
57 
58  return dSdU;
59 }
const bool _temp_coupled
Temperature variable.
virtual RankTwoTensor computeDSDU(unsigned int component, unsigned int nd)
Function to compute derivative of stress with respect to displacements for small strain problems...
Base kernel class for peridynamic solid mechanics models.
const MaterialProperty< RankTwoTensor > & _ddgraddu
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const MaterialProperty< RankFourTensor > & _Jacobian_mult
static InputParameters validParams()
static const std::string component
Definition: NS.h:153
const std::string & name() const override
std::vector< const MaterialProperty< RankTwoTensor > * > _deigenstrain_dT
static InputParameters validParams()
MechanicsBaseNOSPD(const InputParameters &parameters)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
const MaterialProperty< RankTwoTensor > & _ddgraddw
const MaterialProperty< RankTwoTensor > & _ddgraddv
MooseVariable * _temp_var
const std::vector< MaterialPropertyName > _eigenstrain_names