21 "Class for calculating the residual and the Jacobian for the peridynamic plane " 22 "stress model using weak formulation based on peridynamic correspondence models");
35 _local_re(0) =
_stress[0](2, 2) *
_weights[0] * _node_vol[0] * _bond_status;
36 _local_re(1) =
_stress[1](2, 2) *
_weights[1] * _node_vol[1] * _bond_status;
42 for (
unsigned int i = 0; i < _nnodes; ++i)
43 for (
unsigned int j = 0;
j < _nnodes; ++
j)
45 _node_vol[i] * _bond_status;
50 unsigned int coupled_component)
55 std::vector<RankTwoTensor> dSdT(_nnodes);
56 for (
unsigned int nd = 0; nd < _nnodes; nd++)
60 for (
unsigned int i = 0; i < _nnodes; ++i)
61 for (
unsigned int j = 0;
j < _nnodes; ++
j)
63 (i ==
j ? 1 : 0) * dSdT[i](2, 2) *
_weights[i] * _node_vol[i] * _bond_status;
69 for (
unsigned int i = 0; i < _nnodes; ++i)
70 for (
unsigned int j = 0;
j < _nnodes; ++
j)
71 _local_ke(i,
j) += (i ==
j ? 1 : 0) *
computeDSDU(coupled_component,
j)(2, 2) *
78 unsigned int coupled_component)
86 for (
unsigned int nd = 0; nd < _nnodes; nd++)
91 std::vector<dof_id_type> jvardofs(_nnodes);
92 jvardofs[0] = _current_elem->node_ptr(nd)->dof_number(_sys.number(), jvar_num, 0);
93 std::vector<dof_id_type> neighbors = _pdmesh.getNeighbors(_current_elem->node_id(nd));
94 std::vector<dof_id_type> bonds = _pdmesh.getBonds(_current_elem->node_id(nd));
97 std::find(neighbors.begin(), neighbors.end(), _current_elem->node_id(1 - nd)) -
99 std::vector<dof_id_type> dg_neighbors =
100 _pdmesh.getBondDeformationGradientNeighbors(_current_elem->node_id(nd), nb_index);
102 Real vol_nb, weight_nb;
106 for (
unsigned int nb = 0; nb < dg_neighbors.size(); nb++)
107 if (_bond_status_var->getElementalValue(_pdmesh.elemPtr(bonds[dg_neighbors[nb]])) > 0.5)
110 _pdmesh.nodePtr(neighbors[dg_neighbors[nb]])->dof_number(_sys.number(), jvar_num, 0);
111 vol_nb = _pdmesh.getNodeVolume(neighbors[dg_neighbors[nb]]);
113 origin_vec_nb = _pdmesh.getNodeCoord(neighbors[dg_neighbors[nb]]) -
114 _pdmesh.getNodeCoord(_current_elem->node_id(nd));
116 weight_nb = _horizon_radius[nd] / origin_vec_nb.
norm();
119 for (
unsigned int i = 0; i < _dim; ++i)
120 dFdUk(coupled_component, i) = weight_nb * origin_vec_nb(i) * vol_nb;
122 dFdUk *=
_shape2[nd].inverse();
128 _local_ke(nd, 1) = dPdUk(2, 2) *
_weights[nd] * _node_vol[nd] * _bond_status;
130 addJacobian(_assembly, _local_ke,
_ivardofs, jvardofs, _var.scalingFactor());
const bool _temp_coupled
Temperature variable.
virtual void computeLocalJacobian() override
virtual RankTwoTensor computeDSDU(unsigned int component, unsigned int nd)
Function to compute derivative of stress with respect to displacements for small strain problems...
auto norm() const -> decltype(std::norm(Real()))
const MaterialProperty< RankFourTensor > & _Jacobian_mult
Kernel class for weak plane stress formulation based on Form I of the horizon-stabilized peridynamic ...
unsigned int number() const
const MaterialProperty< RankTwoTensor > & _stress
virtual void computeLocalResidual() override
WeakPlaneStressNOSPD(const InputParameters ¶meters)
registerMooseObject("PeridynamicsApp", WeakPlaneStressNOSPD)
std::vector< const MaterialProperty< RankTwoTensor > * > _deigenstrain_dT
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...
std::vector< Real > _weights
weights used for the current element to obtain the nodal stress
static InputParameters validParams()
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...
std::vector< dof_id_type > _ivardofs
Current variable dof numbers for nodes i and j.
const MaterialProperty< RankTwoTensor > & _shape2
RankTwoTensorTempl< Real > transpose() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
MooseVariable * _temp_var
Base kernel class for bond-associated correspondence material models.
const MaterialProperty< RankTwoTensor > & _dgrad