https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
HorizonStabilizedFormISmallStrainMechanicsNOSPD Class Reference

Kernel class for Form I of the horizon-stabilized peridynamic correspondence model for small strain. More...

#include <HorizonStabilizedFormISmallStrainMechanicsNOSPD.h>

Inheritance diagram for HorizonStabilizedFormISmallStrainMechanicsNOSPD:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 HorizonStabilizedFormISmallStrainMechanicsNOSPD (const InputParameters &parameters)
 
virtual void computeOffDiagJacobian (unsigned int jvar) override
 
virtual void initialSetup () override
 
virtual void prepare () override
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void computeLocalResidual () override
 
virtual void computeLocalJacobian () override
 
virtual void computeNonlocalJacobian () override
 
virtual void computeLocalOffDiagJacobian (unsigned int jvar_num, unsigned int coupled_component) override
 Function to compute local contribution to the off-diagonal Jacobian at the current nodes. More...
 
virtual void computePDNonlocalOffDiagJacobian (unsigned int jvar_num, unsigned int coupled_component) override
 Function to compute nonlocal contribution to the off-diagonal Jacobian at the current nodes. More...
 
virtual RankTwoTensor computeDSDU (unsigned int component, unsigned int nd)
 Function to compute derivative of stress with respect to displacements for small strain problems. More...
 

Protected Attributes

const unsigned int _component
 The index of displacement component. More...
 
std::vector< MooseVariable * > _disp_var
 displacement variables More...
 
unsigned int _ndisp
 number of displacement components More...
 
const std::vector< RealGradient > * _orientation
 Vector of bond in current configuration. More...
 
std::vector< dof_id_type_ivardofs
 Current variable dof numbers for nodes i and j. More...
 
std::vector< Real_weights
 weights used for the current element to obtain the nodal stress More...
 
RealGradient _current_vec
 Vector of bond in current configuration. More...
 
RealGradient _current_unit_vec
 Unit vector of bond in current configuration. More...
 
const MaterialProperty< Real > & _multi
 Material point based material properties. More...
 
const MaterialProperty< RankTwoTensor > & _stress
 
const MaterialProperty< RankTwoTensor > & _shape2
 
const MaterialProperty< RankTwoTensor > & _dgrad
 
const MaterialProperty< RankTwoTensor > & _ddgraddu
 
const MaterialProperty< RankTwoTensor > & _ddgraddv
 
const MaterialProperty< RankTwoTensor > & _ddgraddw
 
const MaterialProperty< RankFourTensor > & _Jacobian_mult
 
const std::vector< MaterialPropertyName > _eigenstrain_names
 
std::vector< const MaterialProperty< RankTwoTensor > * > _deigenstrain_dT
 
const bool _temp_coupled
 Temperature variable. More...
 
MooseVariable_temp_var
 
const bool _out_of_plane_strain_coupled
 Parameters for out-of-plane strain in weak plane stress formulation. More...
 
MooseVariable_out_of_plane_strain_var
 

Detailed Description

Kernel class for Form I of the horizon-stabilized peridynamic correspondence model for small strain.

Definition at line 20 of file HorizonStabilizedFormISmallStrainMechanicsNOSPD.h.

Constructor & Destructor Documentation

◆ HorizonStabilizedFormISmallStrainMechanicsNOSPD()

HorizonStabilizedFormISmallStrainMechanicsNOSPD::HorizonStabilizedFormISmallStrainMechanicsNOSPD ( const InputParameters parameters)

Definition at line 30 of file HorizonStabilizedFormISmallStrainMechanicsNOSPD.C.

32  : MechanicsBaseNOSPD(parameters), _component(getParam<unsigned int>("component"))
33 {
34 }
const unsigned int _component
The index of displacement component.
MechanicsBaseNOSPD(const InputParameters &parameters)

Member Function Documentation

◆ computeDSDU()

RankTwoTensor MechanicsBaseNOSPD::computeDSDU ( unsigned int  component,
unsigned int  nd 
)
protectedvirtualinherited

Function to compute derivative of stress with respect to displacements for small strain problems.

Parameters
componentThe index of displacement component
ndThe local index of element node (either 1 or 2 for Edge2 element)
Returns
The calculated derivative

Reimplemented in MechanicsFiniteStrainBaseNOSPD.

Definition at line 47 of file MechanicsBaseNOSPD.C.

Referenced by GeneralizedPlaneStrainOffDiagNOSPD::computeDispFullOffDiagJacobianScalar(), GeneralizedPlaneStrainOffDiagNOSPD::computeDispPartialOffDiagJacobianScalar(), ForceStabilizedSmallStrainMechanicsNOSPD::computeLocalJacobian(), computeLocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalJacobian(), WeakPlaneStressNOSPD::computeLocalOffDiagJacobian(), ForceStabilizedSmallStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), computeLocalOffDiagJacobian(), and HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalOffDiagJacobian().

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 MaterialProperty< RankTwoTensor > & _ddgraddu
const MaterialProperty< RankFourTensor > & _Jacobian_mult
static const std::string component
Definition: NS.h:153
const MaterialProperty< RankTwoTensor > & _ddgraddw
const MaterialProperty< RankTwoTensor > & _ddgraddv

◆ computeLocalJacobian()

void HorizonStabilizedFormISmallStrainMechanicsNOSPD::computeLocalJacobian ( )
overrideprotectedvirtual

Definition at line 53 of file HorizonStabilizedFormISmallStrainMechanicsNOSPD.C.

54 {
55  // excludes dTi/dUj and dTj/dUi contributions, which were considered as nonlocal contribution
56  for (unsigned int i = 0; i < _nnodes; ++i)
57  for (unsigned int j = 0; j < _nnodes; ++j)
58  _local_ke(i, j) += (i == 0 ? -1 : 1) * _multi[j] *
59  (computeDSDU(_component, j) * _shape2[j].inverse()).row(_component) *
60  _origin_vec * _bond_status;
61 }
virtual RankTwoTensor computeDSDU(unsigned int component, unsigned int nd)
Function to compute derivative of stress with respect to displacements for small strain problems...
const unsigned int _component
The index of displacement component.
const MaterialProperty< RankTwoTensor > & _shape2
const MaterialProperty< Real > & _multi
Material point based material properties.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")

◆ computeLocalOffDiagJacobian()

void HorizonStabilizedFormISmallStrainMechanicsNOSPD::computeLocalOffDiagJacobian ( unsigned int  ,
unsigned int   
)
overrideprotectedvirtual

Function to compute local contribution to the off-diagonal Jacobian at the current nodes.

Parameters
coupled_componentThe coupled variable number

Reimplemented from MechanicsBasePD.

Definition at line 138 of file HorizonStabilizedFormISmallStrainMechanicsNOSPD.C.

140 {
141  _local_ke.zero();
142  if (_temp_coupled && jvar_num == _temp_var->number()) // temperature is coupled
143  {
144  std::vector<RankTwoTensor> dSdT(_nnodes);
145  for (unsigned int nd = 0; nd < _nnodes; ++nd)
146  for (unsigned int es = 0; es < _deigenstrain_dT.size(); ++es)
147  dSdT[nd] = -_Jacobian_mult[nd] * (*_deigenstrain_dT[es])[nd];
148 
149  for (unsigned int i = 0; i < _nnodes; ++i)
150  for (unsigned int j = 0; j < _nnodes; ++j)
151  _local_ke(i, j) += (i == 0 ? -1 : 1) * _multi[j] *
152  (dSdT[j] * _shape2[j].inverse()).row(_component) * _origin_vec *
153  _bond_status;
154  }
155  else if (_out_of_plane_strain_coupled &&
156  jvar_num == _out_of_plane_strain_var
157  ->number()) // weak plane stress case, out_of_plane_strain is coupled
158  {
159  std::vector<RankTwoTensor> dSdE33(_nnodes);
160  for (unsigned int nd = 0; nd < _nnodes; ++nd)
161  for (unsigned int i = 0; i < 3; ++i)
162  for (unsigned int j = 0; j < 3; ++j)
163  dSdE33[nd](i, j) = _Jacobian_mult[nd](i, j, 2, 2);
164 
165  for (unsigned int i = 0; i < _nnodes; ++i)
166  for (unsigned int j = 0; j < _nnodes; ++j)
167  _local_ke(i, j) += (i == 0 ? -1 : 1) * _multi[j] *
168  (dSdE33[j] * _shape2[j].inverse()).row(_component) * _origin_vec *
169  _bond_status;
170  }
171  else // off-diagonal Jacobian with respect to other displacement variables
172  {
173  // ONLY consider the contributions to node i and j
174  // contributions to their neighbors are considered as nonlocal off-diagonal
175  for (unsigned int i = 0; i < _nnodes; ++i)
176  for (unsigned int j = 0; j < _nnodes; ++j)
177  _local_ke(i, j) +=
178  (i == 0 ? -1 : 1) * _multi[j] *
179  (computeDSDU(coupled_component, j) * _shape2[j].inverse()).row(_component) *
180  _origin_vec * _bond_status;
181  }
182 }
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...
const MaterialProperty< RankFourTensor > & _Jacobian_mult
unsigned int number() const
const unsigned int _component
The index of displacement component.
void inverse(const std::vector< std::vector< Real >> &m, std::vector< std::vector< Real >> &m_inv)
const bool _out_of_plane_strain_coupled
Parameters for out-of-plane strain in weak plane stress formulation.
std::vector< const MaterialProperty< RankTwoTensor > * > _deigenstrain_dT
MooseVariable * _out_of_plane_strain_var
const MaterialProperty< RankTwoTensor > & _shape2
const MaterialProperty< Real > & _multi
Material point based material properties.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
MooseVariable * _temp_var

◆ computeLocalResidual()

void HorizonStabilizedFormISmallStrainMechanicsNOSPD::computeLocalResidual ( )
overrideprotectedvirtual

Definition at line 37 of file HorizonStabilizedFormISmallStrainMechanicsNOSPD.C.

38 {
39  // For small strain assumptions, stress measures, i.e., Cauchy stress (Sigma), the first
40  // Piola-Kirchhoff stress (P), and the second Piola-Kirchhoff stress (S) are approximately the
41  // same. Thus, the nodal force state tensors are calculated using the Cauchy stresses,
42  // i.e., T = Sigma * inv(Shape) * xi * multi.
43  // Cauchy stress is calculated as Sigma = C * E in the ComputeSmallStrainNOSPD material class.
44 
45  for (unsigned int nd = 0; nd < _nnodes; ++nd)
46  for (unsigned int i = 0; i < _nnodes; ++i)
47  _local_re(i) += (i == 0 ? -1 : 1) * _multi[nd] *
48  (_stress[nd] * _shape2[nd].inverse()).row(_component) * _origin_vec *
49  _bond_status;
50 }
const MaterialProperty< RankTwoTensor > & _stress
const unsigned int _component
The index of displacement component.
void inverse(const std::vector< std::vector< Real >> &m, std::vector< std::vector< Real >> &m_inv)
const MaterialProperty< RankTwoTensor > & _shape2
const MaterialProperty< Real > & _multi
Material point based material properties.

◆ computeNonlocalJacobian()

void HorizonStabilizedFormISmallStrainMechanicsNOSPD::computeNonlocalJacobian ( )
overrideprotectedvirtual

Definition at line 64 of file HorizonStabilizedFormISmallStrainMechanicsNOSPD.C.

65 {
66  // includes dTi/dUj and dTj/dUi contributions
67  // excludes contributions to node i and j, which were considered as local contributions
68  for (unsigned int nd = 0; nd < _nnodes; ++nd)
69  {
70  // calculation of jacobian contribution to current_node's neighbors
71  std::vector<dof_id_type> ivardofs(_nnodes);
72  ivardofs[0] = _current_elem->node_ptr(nd)->dof_number(_sys.number(), _var.number(), 0);
73  std::vector<dof_id_type> neighbors = _pdmesh.getNeighbors(_current_elem->node_id(nd));
74  std::vector<dof_id_type> bonds = _pdmesh.getBonds(_current_elem->node_id(nd));
75 
76  dof_id_type nb_index =
77  std::find(neighbors.begin(), neighbors.end(), _current_elem->node_id(1 - nd)) -
78  neighbors.begin();
79  std::vector<dof_id_type> dg_neighbors =
80  _pdmesh.getBondDeformationGradientNeighbors(_current_elem->node_id(nd), nb_index);
81 
82  Real vol_nb;
83  RealGradient origin_vec_nb;
84  RankTwoTensor dFdUk, dPxdUkx;
85 
86  for (unsigned int nb = 0; nb < dg_neighbors.size(); ++nb)
87  if (_bond_status_var->getElementalValue(_pdmesh.elemPtr(bonds[dg_neighbors[nb]])) > 0.5)
88  {
89  ivardofs[1] = _pdmesh.nodePtr(neighbors[dg_neighbors[nb]])
90  ->dof_number(_sys.number(), _var.number(), 0);
91  vol_nb = _pdmesh.getNodeVolume(neighbors[dg_neighbors[nb]]);
92 
93  origin_vec_nb = _pdmesh.getNodeCoord(neighbors[dg_neighbors[nb]]) -
94  _pdmesh.getNodeCoord(_current_elem->node_id(nd));
95 
96  dFdUk.zero();
97  for (unsigned int i = 0; i < _dim; ++i)
98  dFdUk(_component, i) =
99  _horizon_radius[nd] / origin_vec_nb.norm() * origin_vec_nb(i) * vol_nb;
100 
101  dFdUk *= _shape2[nd].inverse();
102 
103  dPxdUkx = _Jacobian_mult[nd] * 0.5 * (dFdUk.transpose() + dFdUk);
104 
105  for (unsigned int i = 0; i < _nnodes; ++i)
106  for (unsigned int j = 0; j < _nnodes; ++j)
107  _local_ke(i, j) = (i == 0 ? -1 : 1) * (j == 0 ? 0 : 1) * _multi[nd] *
108  (dPxdUkx * _shape2[nd].inverse()).row(_component) * _origin_vec *
109  _bond_status;
110 
111  addJacobian(_assembly, _local_ke, _ivardofs, ivardofs, _var.scalingFactor());
112 
113  if (_has_diag_save_in)
114  {
115  unsigned int rows = _nnodes;
116  DenseVector<Real> diag(rows);
117  for (unsigned int i = 0; i < rows; ++i)
118  diag(i) = _local_ke(i, i);
119 
120  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
121  for (unsigned int i = 0; i < _diag_save_in.size(); ++i)
122  {
123  std::vector<dof_id_type> diag_save_in_dofs(2);
124  diag_save_in_dofs[0] = _current_elem->node_ptr(nd)->dof_number(
125  _diag_save_in[i]->sys().number(), _diag_save_in[i]->number(), 0);
126  diag_save_in_dofs[1] =
127  _pdmesh.nodePtr(neighbors[dg_neighbors[nb]])
128  ->dof_number(_diag_save_in[i]->sys().number(), _diag_save_in[i]->number(), 0);
129 
130  _diag_save_in[i]->sys().solution().add_vector(diag, diag_save_in_dofs);
131  }
132  }
133  }
134  }
135 }
auto norm() const -> decltype(std::norm(Real()))
const MaterialProperty< RankFourTensor > & _Jacobian_mult
const unsigned int _component
The index of displacement component.
std::vector< dof_id_type > _ivardofs
Current variable dof numbers for nodes i and j.
const MaterialProperty< RankTwoTensor > & _shape2
const MaterialProperty< Real > & _multi
Material point based material properties.
RankTwoTensorTempl< Real > transpose() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
uint8_t dof_id_type

◆ computeOffDiagJacobian()

void MechanicsBasePD::computeOffDiagJacobian ( unsigned int  jvar)
overridevirtualinherited

Definition at line 73 of file MechanicsBasePD.C.

74 {
75  prepare();
76 
77  if (jvar_num == _var.number())
78  computeJacobian();
79  else
80  {
81  unsigned int coupled_component = 0;
82  bool active = false;
83 
84  for (unsigned int i = 0; i < _dim; ++i)
85  if (jvar_num == _disp_var[i]->number())
86  {
87  coupled_component = i;
88  active = true;
89  }
90 
91  if (_temp_coupled && jvar_num == _temp_var->number())
92  active = true;
93 
95  active = true;
96 
97  if (active)
98  {
99  prepareMatrixTag(_assembly, _var.number(), jvar_num);
100  computeLocalOffDiagJacobian(jvar_num, coupled_component);
101  accumulateTaggedLocalMatrix();
102 
103  if (_use_full_jacobian)
104  computePDNonlocalOffDiagJacobian(jvar_num, coupled_component);
105  }
106  }
107 }
const bool _temp_coupled
Temperature variable.
unsigned int number() const
virtual void computeLocalOffDiagJacobian(unsigned int, unsigned int)
Function to compute local contribution to the off-diagonal Jacobian at the current nodes...
const bool _out_of_plane_strain_coupled
Parameters for out-of-plane strain in weak plane stress formulation.
std::vector< MooseVariable * > _disp_var
displacement variables
virtual void prepare() override
MooseVariable * _out_of_plane_strain_var
virtual void computePDNonlocalOffDiagJacobian(unsigned int, unsigned int)
Function to compute nonlocal contribution to the off-diagonal Jacobian at the current nodes...
MooseVariable * _temp_var

◆ computePDNonlocalOffDiagJacobian()

void HorizonStabilizedFormISmallStrainMechanicsNOSPD::computePDNonlocalOffDiagJacobian ( unsigned int  ,
unsigned int   
)
overrideprotectedvirtual

Function to compute nonlocal contribution to the off-diagonal Jacobian at the current nodes.

Parameters
jvar_numThe number of the first coupled variable
coupled_componentThe component number of the second coupled variable

Reimplemented from MechanicsBasePD.

Definition at line 185 of file HorizonStabilizedFormISmallStrainMechanicsNOSPD.C.

187 {
188  if (_temp_coupled && jvar_num == _temp_var->number())
189  {
190  // no nonlocal contribution from temperature
191  }
193  {
194  // no nonlocal contribution from out of plane strain
195  }
196  else
197  {
198  for (unsigned int nd = 0; nd < _nnodes; ++nd)
199  {
200  // calculation of jacobian contribution to current_node's neighbors
201  // NOT including the contribution to nodes i and j, which is considered as local off-diagonal
202  std::vector<dof_id_type> jvardofs(_nnodes);
203  jvardofs[0] = _current_elem->node_ptr(nd)->dof_number(_sys.number(), jvar_num, 0);
204  std::vector<dof_id_type> neighbors = _pdmesh.getNeighbors(_current_elem->node_id(nd));
205  std::vector<dof_id_type> bonds = _pdmesh.getBonds(_current_elem->node_id(nd));
206 
207  dof_id_type nb_index =
208  std::find(neighbors.begin(), neighbors.end(), _current_elem->node_id(1 - nd)) -
209  neighbors.begin();
210  std::vector<dof_id_type> dg_neighbors =
211  _pdmesh.getBondDeformationGradientNeighbors(_current_elem->node_id(nd), nb_index);
212 
213  Real vol_nb;
214  RealGradient origin_vec_nb;
215  RankTwoTensor dFdUk, dPxdUky;
216 
217  for (unsigned int nb = 0; nb < dg_neighbors.size(); ++nb)
218  if (_bond_status_var->getElementalValue(_pdmesh.elemPtr(bonds[dg_neighbors[nb]])) > 0.5)
219  {
220  jvardofs[1] =
221  _pdmesh.nodePtr(neighbors[dg_neighbors[nb]])->dof_number(_sys.number(), jvar_num, 0);
222  vol_nb = _pdmesh.getNodeVolume(neighbors[dg_neighbors[nb]]);
223 
224  origin_vec_nb = _pdmesh.getNodeCoord(neighbors[dg_neighbors[nb]]) -
225  _pdmesh.getNodeCoord(_current_elem->node_id(nd));
226 
227  dFdUk.zero();
228  for (unsigned int i = 0; i < _dim; ++i)
229  dFdUk(coupled_component, i) =
230  _horizon_radius[nd] / origin_vec_nb.norm() * origin_vec_nb(i) * vol_nb;
231 
232  dFdUk *= _shape2[nd].inverse();
233 
234  dPxdUky = _Jacobian_mult[nd] * 0.5 * (dFdUk.transpose() + dFdUk);
235 
236  for (unsigned int i = 0; i < _nnodes; ++i)
237  for (unsigned int j = 0; j < _nnodes; ++j)
238  _local_ke(i, j) = (i == 0 ? -1 : 1) * (j == 0 ? 0 : 1) * _multi[nd] *
239  (dPxdUky * _shape2[nd].inverse()).row(_component) * _origin_vec *
240  _bond_status;
241 
242  addJacobian(_assembly, _local_ke, _ivardofs, jvardofs, _var.scalingFactor());
243  }
244  }
245  }
246 }
const bool _temp_coupled
Temperature variable.
auto norm() const -> decltype(std::norm(Real()))
const MaterialProperty< RankFourTensor > & _Jacobian_mult
unsigned int number() const
const unsigned int _component
The index of displacement component.
const bool _out_of_plane_strain_coupled
Parameters for out-of-plane strain in weak plane stress formulation.
MooseVariable * _out_of_plane_strain_var
std::vector< dof_id_type > _ivardofs
Current variable dof numbers for nodes i and j.
const MaterialProperty< RankTwoTensor > & _shape2
const MaterialProperty< Real > & _multi
Material point based material properties.
RankTwoTensorTempl< Real > transpose() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
MooseVariable * _temp_var
uint8_t dof_id_type

◆ initialSetup()

void MechanicsBasePD::initialSetup ( )
overridevirtualinherited

Definition at line 45 of file MechanicsBasePD.C.

46 {
47  _orientation = &_assembly.getFE(FEType(), 1)->get_dxyzdxi();
48 }
const std::vector< RealGradient > * _orientation
Vector of bond in current configuration.

◆ prepare()

void MechanicsBasePD::prepare ( )
overridevirtualinherited

Definition at line 51 of file MechanicsBasePD.C.

Referenced by MechanicsBasePD::computeOffDiagJacobian(), GeneralizedPlaneStrainOffDiagNOSPD::computeOffDiagJacobianScalar(), and GeneralizedPlaneStrainOffDiagOSPD::computeOffDiagJacobianScalar().

52 {
54 
55  _ivardofs.resize(_nnodes);
56  _weights.resize(_nnodes);
57  for (unsigned int nd = 0; nd < _nnodes; ++nd)
58  {
59  _ivardofs[nd] = _current_elem->node_ptr(nd)->dof_number(_sys.number(), _var.number(), 0);
60  _weights[nd] = _pdmesh.getNeighborWeight(
61  _current_elem->node_id(nd),
62  _pdmesh.getNeighborIndex(_current_elem->node_id(nd), _current_elem->node_id(1 - nd)));
63  }
64 
65  for (unsigned int i = 0; i < _dim; ++i)
66  _current_vec(i) = _origin_vec(i) + _disp_var[i]->getNodalValue(*_current_elem->node_ptr(1)) -
67  _disp_var[i]->getNodalValue(*_current_elem->node_ptr(0));
68 
70 }
auto norm() const -> decltype(std::norm(Real()))
RealGradient _current_unit_vec
Unit vector of bond in current configuration.
std::vector< Real > _weights
weights used for the current element to obtain the nodal stress
std::vector< MooseVariable * > _disp_var
displacement variables
RealGradient _current_vec
Vector of bond in current configuration.
std::vector< dof_id_type > _ivardofs
Current variable dof numbers for nodes i and j.
virtual void prepare()
Function to precalculate data which will be used in the derived classes.

◆ validParams()

InputParameters HorizonStabilizedFormISmallStrainMechanicsNOSPD::validParams ( )
static

Definition at line 16 of file HorizonStabilizedFormISmallStrainMechanicsNOSPD.C.

17 {
19  params.addClassDescription(
20  "Class for calculating the residual and the Jacobian for Form I of the horizon-stabilized"
21  "peridynamic correspondence model under small strain assumptions");
22 
23  params.addRequiredParam<unsigned int>(
24  "component",
25  "An integer corresponding to the variable this kernel acts on (0 for x, 1 for y, 2 for z)");
26 
27  return params;
28 }
void addRequiredParam(const std::string &name, const std::string &doc_string)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _component

const unsigned int HorizonStabilizedFormISmallStrainMechanicsNOSPD::_component
protected

◆ _current_unit_vec

RealGradient MechanicsBasePD::_current_unit_vec
protectedinherited

◆ _current_vec

RealGradient MechanicsBasePD::_current_vec
protectedinherited

◆ _ddgraddu

const MaterialProperty<RankTwoTensor>& MechanicsBaseNOSPD::_ddgraddu
protectedinherited

◆ _ddgraddv

const MaterialProperty<RankTwoTensor>& MechanicsBaseNOSPD::_ddgraddv
protectedinherited

◆ _ddgraddw

const MaterialProperty<RankTwoTensor>& MechanicsBaseNOSPD::_ddgraddw
protectedinherited

◆ _deigenstrain_dT

std::vector<const MaterialProperty<RankTwoTensor> *> MechanicsBaseNOSPD::_deigenstrain_dT
protectedinherited

◆ _dgrad

const MaterialProperty<RankTwoTensor>& MechanicsBaseNOSPD::_dgrad
protectedinherited

◆ _disp_var

std::vector<MooseVariable *> MechanicsBasePD::_disp_var
protectedinherited

◆ _eigenstrain_names

const std::vector<MaterialPropertyName> MechanicsBaseNOSPD::_eigenstrain_names
protectedinherited

Definition at line 43 of file MechanicsBaseNOSPD.h.

Referenced by MechanicsBaseNOSPD::MechanicsBaseNOSPD().

◆ _ivardofs

std::vector<dof_id_type> MechanicsBasePD::_ivardofs
protectedinherited

◆ _Jacobian_mult

const MaterialProperty<RankFourTensor>& MechanicsBaseNOSPD::_Jacobian_mult
protectedinherited

◆ _multi

const MaterialProperty<Real>& MechanicsBaseNOSPD::_multi
protectedinherited

Material point based material properties.

Definition at line 35 of file MechanicsBaseNOSPD.h.

Referenced by GeneralizedPlaneStrainOffDiagNOSPD::computeDispFullOffDiagJacobianScalar(), GeneralizedPlaneStrainOffDiagNOSPD::computeDispPartialOffDiagJacobianScalar(), ForceStabilizedSmallStrainMechanicsNOSPD::computeLocalJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeLocalJacobian(), computeLocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeLocalJacobian(), ForceStabilizedSmallStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), computeLocalOffDiagJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), ForceStabilizedSmallStrainMechanicsNOSPD::computeLocalResidual(), computeLocalResidual(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeLocalResidual(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeLocalResidual(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalResidual(), ForceStabilizedSmallStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeNonlocalJacobian(), computeNonlocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeNonlocalResidual(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeNonlocalResidual(), ForceStabilizedSmallStrainMechanicsNOSPD::computePDNonlocalOffDiagJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computePDNonlocalOffDiagJacobian(), computePDNonlocalOffDiagJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computePDNonlocalOffDiagJacobian(), and HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computePDNonlocalOffDiagJacobian().

◆ _ndisp

unsigned int MechanicsBasePD::_ndisp
protectedinherited

number of displacement components

Definition at line 55 of file MechanicsBasePD.h.

Referenced by MechanicsBasePD::MechanicsBasePD().

◆ _orientation

const std::vector<RealGradient>* MechanicsBasePD::_orientation
protectedinherited

Vector of bond in current configuration.

Definition at line 63 of file MechanicsBasePD.h.

Referenced by MechanicsBasePD::initialSetup().

◆ _out_of_plane_strain_coupled

const bool MechanicsBasePD::_out_of_plane_strain_coupled
protectedinherited

◆ _out_of_plane_strain_var

MooseVariable* MechanicsBasePD::_out_of_plane_strain_var
protectedinherited

◆ _shape2

const MaterialProperty<RankTwoTensor>& MechanicsBaseNOSPD::_shape2
protectedinherited

Definition at line 37 of file MechanicsBaseNOSPD.h.

Referenced by GeneralizedPlaneStrainOffDiagNOSPD::computeDispFullOffDiagJacobianScalar(), GeneralizedPlaneStrainOffDiagNOSPD::computeDispPartialOffDiagJacobianScalar(), ForceStabilizedSmallStrainMechanicsNOSPD::computeLocalJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeLocalJacobian(), computeLocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeLocalJacobian(), ForceStabilizedSmallStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), computeLocalOffDiagJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), ForceStabilizedSmallStrainMechanicsNOSPD::computeLocalResidual(), computeLocalResidual(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeLocalResidual(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeLocalResidual(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalResidual(), ForceStabilizedSmallStrainMechanicsNOSPD::computeNonlocalJacobian(), computeNonlocalJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeNonlocalResidual(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeNonlocalResidual(), WeakPlaneStressNOSPD::computePDNonlocalOffDiagJacobian(), ForceStabilizedSmallStrainMechanicsNOSPD::computePDNonlocalOffDiagJacobian(), computePDNonlocalOffDiagJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computePDNonlocalOffDiagJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computePDNonlocalOffDiagJacobian(), and HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computePDNonlocalOffDiagJacobian().

◆ _stress

const MaterialProperty<RankTwoTensor>& MechanicsBaseNOSPD::_stress
protectedinherited

◆ _temp_coupled

const bool MechanicsBasePD::_temp_coupled
protectedinherited

◆ _temp_var

MooseVariable* MechanicsBasePD::_temp_var
protectedinherited

◆ _weights

std::vector<Real> MechanicsBasePD::_weights
protectedinherited

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