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
ForceStabilizedSmallStrainMechanicsNOSPD Class Reference

Kernel class for fictitious force stabilized peridynamic correspondence material model for small strain. More...

#include <ForceStabilizedSmallStrainMechanicsNOSPD.h>

Inheritance diagram for ForceStabilizedSmallStrainMechanicsNOSPD:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 ForceStabilizedSmallStrainMechanicsNOSPD (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
 
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...
 
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 MaterialProperty< Real > & _sf_coeff
 Bond based material property for fictitious stabilization force. More...
 
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 fictitious force stabilized peridynamic correspondence material model for small strain.

Definition at line 18 of file ForceStabilizedSmallStrainMechanicsNOSPD.h.

Constructor & Destructor Documentation

◆ ForceStabilizedSmallStrainMechanicsNOSPD()

ForceStabilizedSmallStrainMechanicsNOSPD::ForceStabilizedSmallStrainMechanicsNOSPD ( const InputParameters parameters)

Definition at line 30 of file ForceStabilizedSmallStrainMechanicsNOSPD.C.

32  : MechanicsBaseNOSPD(parameters),
33  _sf_coeff(getMaterialProperty<Real>("stabilization_force_coeff")),
34  _component(getParam<unsigned int>("component"))
35 {
36 }
const unsigned int _component
The index of displacement component.
MechanicsBaseNOSPD(const InputParameters &parameters)
const MaterialProperty< Real > & _sf_coeff
Bond based material property for fictitious stabilization force.

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(), computeLocalJacobian(), HorizonStabilizedFormISmallStrainMechanicsNOSPD::computeLocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalJacobian(), WeakPlaneStressNOSPD::computeLocalOffDiagJacobian(), computeLocalOffDiagJacobian(), HorizonStabilizedFormISmallStrainMechanicsNOSPD::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 ForceStabilizedSmallStrainMechanicsNOSPD::computeLocalJacobian ( )
overrideprotectedvirtual

Definition at line 64 of file ForceStabilizedSmallStrainMechanicsNOSPD.C.

65 {
66  // excludes dTi/dUj and dTj/dUi contribution which was considered as nonlocal contribution
67  for (unsigned int i = 0; i < _nnodes; ++i)
68  for (unsigned int j = 0; j < _nnodes; ++j)
69  _local_ke(i, j) += (i == 0 ? -1 : 1) * _multi[j] *
70  (computeDSDU(_component, j) * _shape2[j].inverse()).row(_component) *
71  _origin_vec * _bond_status;
72 
73  // compute local stabilization force jacobian
74  Real diag = 0.5 * (_sf_coeff[0] + _sf_coeff[1]);
75  for (unsigned int i = 0; i < _nnodes; ++i)
76  for (unsigned int j = 0; j < _nnodes; ++j)
77  _local_ke(i, j) += (i == j ? 1 : -1) * diag * _bond_status;
78 }
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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MaterialProperty< Real > & _sf_coeff
Bond based material property for fictitious stabilization force.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")

◆ computeLocalOffDiagJacobian()

void ForceStabilizedSmallStrainMechanicsNOSPD::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 140 of file ForceStabilizedSmallStrainMechanicsNOSPD.C.

142 {
143  _local_ke.zero();
144  if (_temp_coupled && jvar_num == _temp_var->number())
145  {
146  std::vector<RankTwoTensor> dSdT(_nnodes);
147  for (unsigned int nd = 0; nd < _nnodes; ++nd)
148  for (unsigned int es = 0; es < _deigenstrain_dT.size(); ++es)
149  dSdT[nd] = -(_Jacobian_mult[nd] * (*_deigenstrain_dT[es])[nd]);
150 
151  for (unsigned int i = 0; i < _nnodes; ++i)
152  for (unsigned int j = 0; j < _nnodes; ++j)
153  _local_ke(i, j) += (i == 0 ? -1 : 1) * _multi[j] *
154  (dSdT[j] * _shape2[j].inverse()).row(_component) * _origin_vec *
155  _bond_status;
156  }
157  else
158  {
159  for (unsigned int i = 0; i < _nnodes; ++i)
160  for (unsigned int j = 0; j < _nnodes; ++j)
161  _local_ke(i, j) +=
162  (i == 0 ? -1 : 1) * _multi[j] *
163  (computeDSDU(coupled_component, j) * _shape2[j].inverse()).row(_component) *
164  _origin_vec * _bond_status;
165  }
166 }
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
void inverse(const std::vector< std::vector< Real >> &m, std::vector< std::vector< Real >> &m_inv)
std::vector< const MaterialProperty< RankTwoTensor > * > _deigenstrain_dT
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")
MooseVariable * _temp_var

◆ computeLocalResidual()

void ForceStabilizedSmallStrainMechanicsNOSPD::computeLocalResidual ( )
overrideprotectedvirtual

Definition at line 39 of file ForceStabilizedSmallStrainMechanicsNOSPD.C.

40 {
41  Real sforce = 0.5 * (_sf_coeff[0] + _sf_coeff[1]) *
42  (_disp_var[_component]->getNodalValue(*_current_elem->node_ptr(1)) -
43  _disp_var[_component]->getNodalValue(*_current_elem->node_ptr(0))) *
44  _bond_status;
45 
46  // For small strain assumptions, stress measures, i.e., Cauchy stress (Sigma), the first
47  // Piola-Kirchhoff stress (P), and the second Piola-Kirchhoff stress (S) are approximately the
48  // same. Thus, the nodal force state tensors are calculated using the Cauchy stresses,
49  // i.e., T = Sigma * inv(Shape) * xi * multi.
50  // Cauchy stress is calculated as Sigma = C * E.
51 
52  for (unsigned int nd = 0; nd < _nnodes; ++nd)
53  for (unsigned int i = 0; i < _nnodes; ++i)
54  _local_re(i) += (i == 0 ? -1 : 1) * _multi[nd] *
55  (_stress[nd] * _shape2[nd].inverse()).row(_component) * _origin_vec *
56  _bond_status;
57 
58  // add fictitious force for model stabilization
59  _local_re(0) += -sforce;
60  _local_re(1) += sforce;
61 }
const MaterialProperty< RankTwoTensor > & _stress
void inverse(const std::vector< std::vector< Real >> &m, std::vector< std::vector< Real >> &m_inv)
std::vector< MooseVariable * > _disp_var
displacement variables
const unsigned int _component
The index of displacement component.
const MaterialProperty< RankTwoTensor > & _shape2
const MaterialProperty< Real > & _multi
Material point based material properties.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MaterialProperty< Real > & _sf_coeff
Bond based material property for fictitious stabilization force.

◆ computeNonlocalJacobian()

void ForceStabilizedSmallStrainMechanicsNOSPD::computeNonlocalJacobian ( )
overrideprotectedvirtual

Definition at line 81 of file ForceStabilizedSmallStrainMechanicsNOSPD.C.

82 {
83  // includes dTi/dUj and dTj/dUi contributions
84  for (unsigned int nd = 0; nd < _nnodes; ++nd)
85  {
86  // calculation of jacobian contribution to current_node's neighbors
87  std::vector<dof_id_type> ivardofs(_nnodes);
88  ivardofs[0] = _current_elem->node_ptr(nd)->dof_number(_sys.number(), _var.number(), 0);
89  std::vector<dof_id_type> neighbors = _pdmesh.getNeighbors(_current_elem->node_id(nd));
90  std::vector<dof_id_type> bonds = _pdmesh.getBonds(_current_elem->node_id(nd));
91 
92  Real vol_nb;
93  RealGradient origin_vec_nb;
94  RankTwoTensor dFdUk, dSxdUkx;
95 
96  for (unsigned int nb = 0; nb < neighbors.size(); ++nb)
97  if (_bond_status_var->getElementalValue(_pdmesh.elemPtr(bonds[nb])) > 0.5)
98  {
99  Node * neighbor_nb = _pdmesh.nodePtr(neighbors[nb]);
100  ivardofs[1] = neighbor_nb->dof_number(_sys.number(), _var.number(), 0);
101  vol_nb = _pdmesh.getNodeVolume(neighbors[nb]);
102 
103  // obtain bond ndnb's origin vector
104  origin_vec_nb = _pdmesh.getNodeCoord(neighbor_nb->id()) -
105  _pdmesh.getNodeCoord(_current_elem->node_id(nd));
106 
107  dFdUk.zero();
108  for (unsigned int i = 0; i < _dim; ++i)
109  dFdUk(_component, i) =
110  vol_nb * _horizon_radius[nd] / origin_vec_nb.norm() * origin_vec_nb(i);
111 
112  dFdUk *= _shape2[nd].inverse();
113  dSxdUkx = _Jacobian_mult[nd] * 0.5 * (dFdUk.transpose() + dFdUk);
114 
115  _local_ke.zero();
116  for (unsigned int i = 0; i < _nnodes; ++i)
117  for (unsigned int j = 0; j < _nnodes; ++j)
118  _local_ke(i, j) = (i == 0 ? -1 : 1) * (j == 0 ? 0 : 1) * _multi[nd] *
119  (dSxdUkx * _shape2[nd].inverse()).row(_component) * _origin_vec *
120  _bond_status;
121 
122  addJacobian(_assembly, _local_ke, _ivardofs, ivardofs, _var.scalingFactor());
123 
124  if (_has_diag_save_in)
125  {
126  unsigned int rows = _nnodes;
127  DenseVector<Real> diag(rows);
128  for (unsigned int i = 0; i < rows; ++i)
129  diag(i) = _local_ke(i, i);
130 
131  Threads::spin_mutex::scoped_lock lock(Threads::spin_mtx);
132  for (unsigned int i = 0; i < _diag_save_in.size(); ++i)
133  _diag_save_in[i]->sys().solution().add_vector(diag, _diag_save_in[i]->dofIndices());
134  }
135  }
136  }
137 }
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")

◆ 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 ForceStabilizedSmallStrainMechanicsNOSPD::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 169 of file ForceStabilizedSmallStrainMechanicsNOSPD.C.

171 {
172  if (_temp_coupled && jvar_num == _temp_var->number())
173  {
174  // no nonlocal contribution from temperature
175  }
176  else
177  {
178  for (unsigned int nd = 0; nd < _nnodes; ++nd)
179  {
180  // calculation of jacobian contribution to current_node's neighbors
181  std::vector<dof_id_type> jvardofs(_nnodes);
182  jvardofs[0] = _current_elem->node_ptr(nd)->dof_number(_sys.number(), jvar_num, 0);
183  std::vector<dof_id_type> neighbors = _pdmesh.getNeighbors(_current_elem->node_id(nd));
184  std::vector<dof_id_type> bonds = _pdmesh.getBonds(_current_elem->node_id(nd));
185 
186  Real vol_nb;
187  RealGradient origin_vec_nb;
188  RankTwoTensor dFdUk, dSxdUky;
189 
190  for (unsigned int nb = 0; nb < neighbors.size(); ++nb)
191  if (_bond_status_var->getElementalValue(_pdmesh.elemPtr(bonds[nb])) > 0.5)
192 
193  {
194  Node * neighbor_nb = _pdmesh.nodePtr(neighbors[nb]);
195  jvardofs[1] = neighbor_nb->dof_number(_sys.number(), jvar_num, 0);
196  vol_nb = _pdmesh.getNodeVolume(neighbors[nb]);
197 
198  // obtain bond ndnb's origin vector
199  origin_vec_nb = _pdmesh.getNodeCoord(neighbor_nb->id()) -
200  _pdmesh.getNodeCoord(_current_elem->node_id(nd));
201 
202  dFdUk.zero();
203  for (unsigned int i = 0; i < _dim; ++i)
204  dFdUk(coupled_component, i) =
205  _horizon_radius[nd] / origin_vec_nb.norm() * origin_vec_nb(i) * vol_nb;
206 
207  dFdUk *= _shape2[nd].inverse();
208  dSxdUky = _Jacobian_mult[nd] * 0.5 * (dFdUk.transpose() + dFdUk);
209 
210  _local_ke.zero();
211  for (unsigned int i = 0; i < _nnodes; ++i)
212  for (unsigned int j = 0; j < _nnodes; ++j)
213  _local_ke(i, j) = (i == 0 ? -1 : 1) * (j == 0 ? 0 : 1) * _multi[nd] *
214  (dSxdUky * _shape2[nd].inverse()).row(_component) * _origin_vec *
215  _bond_status;
216 
217  addJacobian(_assembly, _local_ke, _ivardofs, jvardofs, _var.scalingFactor());
218  }
219  }
220  }
221 }
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.
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

◆ 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 ForceStabilizedSmallStrainMechanicsNOSPD::validParams ( )
static

Definition at line 16 of file ForceStabilizedSmallStrainMechanicsNOSPD.C.

17 {
19  params.addClassDescription(
20  "Class for calculating the residual and Jacobian for the force-stabilized peridynamic "
21  "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 ForceStabilizedSmallStrainMechanicsNOSPD::_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(), computeLocalJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeLocalJacobian(), HorizonStabilizedFormISmallStrainMechanicsNOSPD::computeLocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeLocalJacobian(), computeLocalOffDiagJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), HorizonStabilizedFormISmallStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), computeLocalResidual(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeLocalResidual(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalResidual(), HorizonStabilizedFormISmallStrainMechanicsNOSPD::computeLocalResidual(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeLocalResidual(), computeNonlocalJacobian(), HorizonStabilizedFormISmallStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeNonlocalResidual(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeNonlocalResidual(), computePDNonlocalOffDiagJacobian(), HorizonStabilizedFormISmallStrainMechanicsNOSPD::computePDNonlocalOffDiagJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computePDNonlocalOffDiagJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computePDNonlocalOffDiagJacobian(), and HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::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

◆ _sf_coeff

const MaterialProperty<Real>& ForceStabilizedSmallStrainMechanicsNOSPD::_sf_coeff
protected

Bond based material property for fictitious stabilization force.

Definition at line 35 of file ForceStabilizedSmallStrainMechanicsNOSPD.h.

Referenced by computeLocalJacobian(), and computeLocalResidual().

◆ _shape2

const MaterialProperty<RankTwoTensor>& MechanicsBaseNOSPD::_shape2
protectedinherited

Definition at line 37 of file MechanicsBaseNOSPD.h.

Referenced by GeneralizedPlaneStrainOffDiagNOSPD::computeDispFullOffDiagJacobianScalar(), GeneralizedPlaneStrainOffDiagNOSPD::computeDispPartialOffDiagJacobianScalar(), computeLocalJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeLocalJacobian(), HorizonStabilizedFormISmallStrainMechanicsNOSPD::computeLocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeLocalJacobian(), computeLocalOffDiagJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), HorizonStabilizedFormISmallStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalOffDiagJacobian(), computeLocalResidual(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeLocalResidual(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeLocalResidual(), HorizonStabilizedFormISmallStrainMechanicsNOSPD::computeLocalResidual(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeLocalResidual(), computeNonlocalJacobian(), HorizonStabilizedFormIFiniteStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormISmallStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeNonlocalJacobian(), HorizonStabilizedFormIISmallStrainMechanicsNOSPD::computeNonlocalResidual(), HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD::computeNonlocalResidual(), WeakPlaneStressNOSPD::computePDNonlocalOffDiagJacobian(), computePDNonlocalOffDiagJacobian(), HorizonStabilizedFormISmallStrainMechanicsNOSPD::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: