www.mooseframework.org
ComputeForceStabilizedSmallStrainNOSPD.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
11 #include "RankFourTensor.h"
12 #include "ElasticityTensorTools.h"
13 
15 
16 template <>
17 InputParameters
19 {
20  InputParameters params = validParams<ComputeSmallStrainNOSPD>();
21  params.addClassDescription(
22  "Class for computing bond interaction for force-stabilized peridynamic correspondence model");
23 
24  return params;
25 }
26 
28  const InputParameters & parameters)
29  : ComputeSmallStrainNOSPD(parameters),
30  _Cijkl(getMaterialProperty<RankFourTensor>("elasticity_tensor")),
31  _sf_coeff(declareProperty<Real>("stabilization_force_coeff"))
32 {
33 }
34 
35 void
37 {
38  _shape2[_qp].zero();
39  _deformation_gradient[_qp].zero();
40  _ddgraddu[_qp].zero();
41  _ddgraddv[_qp].zero();
42  _ddgraddw[_qp].zero();
43 
44  if (_dim == 2)
45  _shape2[_qp](2, 2) = _deformation_gradient[_qp](2, 2) = 1.0;
46 
47  const Node * cur_nd = _current_elem->node_ptr(_qp);
48  std::vector<dof_id_type> neighbors = _pdmesh.getNeighbors(cur_nd->id());
49  std::vector<dof_id_type> bonds = _pdmesh.getBonds(cur_nd->id());
50 
51  // calculate the shape tensor and prepare the deformation gradient tensor
52  RealGradient ori_vec(_dim);
53  RealGradient cur_vec(_dim);
54 
55  for (unsigned int j = 0; j < neighbors.size(); ++j)
56  if (_bond_status_var->getElementalValue(_pdmesh.elemPtr(bonds[j])) > 0.5)
57  {
58  Node * node_j = _pdmesh.nodePtr(neighbors[j]);
59  Real vol_j = _pdmesh.getPDNodeVolume(neighbors[j]);
60  ori_vec = *node_j - *_pdmesh.nodePtr(cur_nd->id());
61 
62  for (unsigned int k = 0; k < _dim; ++k)
63  cur_vec(k) = ori_vec(k) + _disp_var[k]->getNodalValue(*node_j) -
64  _disp_var[k]->getNodalValue(*cur_nd);
65 
66  Real ori_len = ori_vec.norm();
67  for (unsigned int k = 0; k < _dim; ++k)
68  {
69  for (unsigned int l = 0; l < _dim; ++l)
70  {
71  _shape2[_qp](k, l) += vol_j * _horiz_rad[_qp] / ori_len * ori_vec(k) * ori_vec(l);
72  _deformation_gradient[_qp](k, l) +=
73  vol_j * _horiz_rad[_qp] / ori_len * cur_vec(k) * ori_vec(l);
74  }
75  // calculate derivatives of deformation_gradient w.r.t displacements of node i
76  _ddgraddu[_qp](0, k) += -vol_j * _horiz_rad[_qp] / ori_len * ori_vec(k);
77  _ddgraddv[_qp](1, k) += -vol_j * _horiz_rad[_qp] / ori_len * ori_vec(k);
78  if (_dim == 3)
79  _ddgraddw[_qp](2, k) += -vol_j * _horiz_rad[_qp] / ori_len * ori_vec(k);
80  }
81  }
82 
83  // finalize the deformation gradient tensor
84  _deformation_gradient[_qp] *= _shape2[_qp].inverse();
85  _ddgraddu[_qp] *= _shape2[_qp].inverse();
86  _ddgraddv[_qp] *= _shape2[_qp].inverse();
87  _ddgraddw[_qp] *= _shape2[_qp].inverse();
88 
89  Real youngs_modulus = ElasticityTensorTools::getIsotropicYoungsModulus(_Cijkl[_qp]);
90  _sf_coeff[_qp] = youngs_modulus * _pdmesh.getNodeAvgSpacing(_current_elem->node_id(_qp)) *
91  _horiz_rad[_qp] / _origin_length;
92  _multi[_qp] = _horiz_rad[_qp] / _origin_length * _node_vol[0] * _node_vol[1];
93 }
validParams< ComputeSmallStrainNOSPD >
InputParameters validParams< ComputeSmallStrainNOSPD >()
Definition: ComputeSmallStrainNOSPD.C:16
validParams< ComputeForceStabilizedSmallStrainNOSPD >
InputParameters validParams< ComputeForceStabilizedSmallStrainNOSPD >()
Definition: ComputeForceStabilizedSmallStrainNOSPD.C:18
ComputeForceStabilizedSmallStrainNOSPD.h
ComputeSmallStrainNOSPD
Material class for bond-associated correspondence material model for small strain.
Definition: ComputeSmallStrainNOSPD.h:23
ComputeStrainBaseNOSPD::_ddgraddv
MaterialProperty< RankTwoTensor > & _ddgraddv
Definition: ComputeStrainBaseNOSPD.h:58
ComputeStrainBaseNOSPD::_shape2
MaterialProperty< RankTwoTensor > & _shape2
Material properties to store.
Definition: ComputeStrainBaseNOSPD.h:54
libMesh::RealGradient
VectorValue< Real > RealGradient
Definition: GrainForceAndTorqueInterface.h:17
ComputeForceStabilizedSmallStrainNOSPD
Material class for conventional correspondence material model with fictitious force stabilization for...
Definition: ComputeForceStabilizedSmallStrainNOSPD.h:23
ComputeForceStabilizedSmallStrainNOSPD::ComputeForceStabilizedSmallStrainNOSPD
ComputeForceStabilizedSmallStrainNOSPD(const InputParameters &parameters)
Definition: ComputeForceStabilizedSmallStrainNOSPD.C:27
ComputeStrainBaseNOSPD::_deformation_gradient
MaterialProperty< RankTwoTensor > & _deformation_gradient
Definition: ComputeStrainBaseNOSPD.h:55
ElasticityTensorTools::getIsotropicYoungsModulus
T getIsotropicYoungsModulus(const RankFourTensorTempl< T > &elasticity_tensor)
Get the Young's modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must b...
Definition: ElasticityTensorTools.h:98
ElasticityTensorTools.h
ComputeStrainBaseNOSPD::_multi
MaterialProperty< Real > & _multi
Definition: ComputeStrainBaseNOSPD.h:64
ComputeStrainBaseNOSPD::_ddgraddw
MaterialProperty< RankTwoTensor > & _ddgraddw
Definition: ComputeStrainBaseNOSPD.h:59
ComputeForceStabilizedSmallStrainNOSPD::_Cijkl
const MaterialProperty< RankFourTensor > & _Cijkl
Elasticity tensor.
Definition: ComputeForceStabilizedSmallStrainNOSPD.h:32
ComputeForceStabilizedSmallStrainNOSPD::computeQpDeformationGradient
virtual void computeQpDeformationGradient() override
Function to compute bond-associated deformation gradient.
Definition: ComputeForceStabilizedSmallStrainNOSPD.C:36
RankFourTensorTempl
Definition: ACGrGrElasticDrivingForce.h:20
ComputeStrainBaseNOSPD::_ddgraddu
MaterialProperty< RankTwoTensor > & _ddgraddu
Definition: ComputeStrainBaseNOSPD.h:57
registerMooseObject
registerMooseObject("PeridynamicsApp", ComputeForceStabilizedSmallStrainNOSPD)
ComputeForceStabilizedSmallStrainNOSPD::_sf_coeff
MaterialProperty< Real > & _sf_coeff
Material property for fictitious force.
Definition: ComputeForceStabilizedSmallStrainNOSPD.h:35