www.mooseframework.org
MechanicsBPD.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 
10 #include "MechanicsBPD.h"
11 
12 registerMooseObject("PeridynamicsApp", MechanicsBPD);
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<MechanicsBasePD>();
19  params.addClassDescription("Class for calculating residual and Jacobian for Bond-based "
20  "PeriDynamic mechanics formulation");
21 
22  params.addRequiredParam<unsigned int>(
23  "component",
24  "An integer corresponding to the variable this kernel acts on (0 for x, 1 for y, 2 for z)");
25 
26  return params;
27 }
28 
29 MechanicsBPD::MechanicsBPD(const InputParameters & parameters)
30  : MechanicsBasePD(parameters),
31  _bond_force_ij(getMaterialProperty<Real>("bond_force_ij")),
32  _bond_dfdU_ij(getMaterialProperty<Real>("bond_dfdU_ij")),
33  _bond_dfdT_ij(getMaterialProperty<Real>("bond_dfdT_ij")),
34  _component(getParam<unsigned int>("component"))
35 {
36 }
37 
38 void
40 {
41  _local_re(0) = -_bond_force_ij[0] * _cur_ori_ij(_component) * _bond_status_ij;
42  _local_re(1) = -_local_re(0);
43 }
44 
45 void
47 {
48  Real diag =
51 
52  for (_i = 0; _i < _test.size(); _i++)
53  for (_j = 0; _j < _phi.size(); _j++)
54  _local_ke(_i, _j) += (_i == _j ? 1 : -1) * diag * _bond_status_ij;
55 }
56 
57 void
58 MechanicsBPD::computeLocalOffDiagJacobian(unsigned int coupled_component)
59 {
60  if (coupled_component == 3)
61  {
62  for (_i = 0; _i < _test.size(); _i++)
63  for (_j = 0; _j < _phi.size(); _j++)
64  _local_ke(_i, _j) +=
65  (_i == 1 ? 1 : -1) * _cur_ori_ij(_component) * _bond_dfdT_ij[_j] * _bond_status_ij;
66  }
67  else
68  {
69  Real val =
70  _cur_ori_ij(_component) * _cur_ori_ij(coupled_component) * _bond_dfdU_ij[0] -
71  _bond_force_ij[0] * _cur_ori_ij(_component) * _cur_ori_ij(coupled_component) / _cur_len_ij;
72  for (_i = 0; _i < _test.size(); _i++)
73  for (_j = 0; _j < _phi.size(); _j++)
74  _local_ke(_i, _j) += (_i == _j ? 1 : -1) * val * _bond_status_ij;
75  }
76 }
MechanicsBPD::_bond_force_ij
const MaterialProperty< Real > & _bond_force_ij
Bond based material properties.
Definition: MechanicsBPD.h:33
MechanicsBasePD::_cur_ori_ij
RealGradient _cur_ori_ij
Vector of bond in current configuration.
Definition: MechanicsBasePD.h:72
validParams< MechanicsBPD >
InputParameters validParams< MechanicsBPD >()
Definition: MechanicsBPD.C:16
MechanicsBPD::MechanicsBPD
MechanicsBPD(const InputParameters &parameters)
Definition: MechanicsBPD.C:29
registerMooseObject
registerMooseObject("PeridynamicsApp", MechanicsBPD)
MechanicsBPD::_bond_dfdU_ij
const MaterialProperty< Real > & _bond_dfdU_ij
Definition: MechanicsBPD.h:34
MechanicsBPD::computeLocalOffDiagJacobian
virtual void computeLocalOffDiagJacobian(unsigned int jvar) override
Function to compute local contribution to the off-diagonal Jacobian at the current nodes.
Definition: MechanicsBPD.C:58
MechanicsBPD::_bond_dfdT_ij
const MaterialProperty< Real > & _bond_dfdT_ij
Definition: MechanicsBPD.h:35
MechanicsBPD::computeLocalJacobian
virtual void computeLocalJacobian() override
Definition: MechanicsBPD.C:46
MechanicsBPD
Kernel class for bond based peridynamic solid mechanics models.
Definition: MechanicsBPD.h:22
MechanicsBPD::computeLocalResidual
virtual void computeLocalResidual() override
Definition: MechanicsBPD.C:39
MechanicsBPD::_component
const unsigned int _component
The index of displcement component.
Definition: MechanicsBPD.h:39
validParams< MechanicsBasePD >
InputParameters validParams< MechanicsBasePD >()
Definition: MechanicsBasePD.C:15
MechanicsBasePD
Base kernel class for peridynamic solid mechanics models.
Definition: MechanicsBasePD.h:23
MechanicsBPD.h
MechanicsBasePD::_cur_len_ij
Real _cur_len_ij
Current bond length.
Definition: MechanicsBasePD.h:75