www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MechanicsBPD Class Reference

Kernel class for bond based peridynamic solid mechanics models. More...

#include <MechanicsBPD.h>

Inheritance diagram for MechanicsBPD:
[legend]

Public Member Functions

 MechanicsBPD (const InputParameters &parameters)
 
virtual void computeOffDiagJacobian (MooseVariableFEBase &jvar) override
 
virtual void computePDNonlocalOffDiagJacobian (unsigned int, unsigned int)
 Function to compute nonlocal contribution to the off-diagonal Jacobian at the current nodes. More...
 
virtual void initialSetup () override
 
virtual void prepare () override
 

Protected Member Functions

virtual void computeLocalResidual () override
 
virtual void computeLocalJacobian () override
 
virtual void computeLocalOffDiagJacobian (unsigned int jvar) override
 Function to compute local contribution to the off-diagonal Jacobian at the current nodes. More...
 

Protected Attributes

const unsigned int _component
 The index of displcement 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_ij
 Current variable dof numbers for nodes i and j. More...
 
RealGradient _cur_ori_ij
 Vector of bond in current configuration. More...
 
Real _cur_len_ij
 Current bond length. More...
 
const MaterialProperty< Real > & _bond_force_ij
 Bond based material properties. More...
 
const MaterialProperty< Real > & _bond_dfdU_ij
 
const MaterialProperty< Real > & _bond_dfdT_ij
 
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 bond based peridynamic solid mechanics models.

Definition at line 22 of file MechanicsBPD.h.

Constructor & Destructor Documentation

◆ MechanicsBPD()

MechanicsBPD::MechanicsBPD ( const InputParameters &  parameters)

Definition at line 29 of file MechanicsBPD.C.

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 }

Member Function Documentation

◆ computeLocalJacobian()

void MechanicsBPD::computeLocalJacobian ( )
overrideprotectedvirtual

Definition at line 46 of file MechanicsBPD.C.

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 }

◆ computeLocalOffDiagJacobian()

void MechanicsBPD::computeLocalOffDiagJacobian ( 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 58 of file MechanicsBPD.C.

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 }

◆ computeLocalResidual()

void MechanicsBPD::computeLocalResidual ( )
overrideprotectedvirtual

Definition at line 39 of file MechanicsBPD.C.

40 {
41  _local_re(0) = -_bond_force_ij[0] * _cur_ori_ij(_component) * _bond_status_ij;
42  _local_re(1) = -_local_re(0);
43 }

◆ computeOffDiagJacobian()

void MechanicsBasePD::computeOffDiagJacobian ( MooseVariableFEBase &  jvar)
overridevirtualinherited

Definition at line 71 of file MechanicsBasePD.C.

72 {
73  prepare();
74 
75  if (jvar.number() == _var.number())
76  computeJacobian();
77  else
78  {
79  unsigned int coupled_component = 0;
80  bool active = false;
81 
82  for (unsigned int i = 0; i < _dim; ++i)
83  if (jvar.number() == _disp_var[i]->number())
84  {
85  coupled_component = i;
86  active = true;
87  }
88 
89  if (_temp_coupled && jvar.number() == _temp_var->number())
90  {
91  coupled_component = 3;
92  active = true;
93  }
94 
95  if (_out_of_plane_strain_coupled && jvar.number() == _out_of_plane_strain_var->number())
96  {
97  coupled_component = 4;
98  active = true;
99  }
100 
101  if (active)
102  {
103  DenseMatrix<Number> & ke = _assembly.jacobianBlock(_var.number(), jvar.number());
104  _local_ke.resize(ke.m(), ke.n());
105  _local_ke.zero();
106 
107  computeLocalOffDiagJacobian(coupled_component);
108 
109  ke += _local_ke;
110 
111  if (_use_full_jacobian)
112  computePDNonlocalOffDiagJacobian(jvar.number(), coupled_component);
113  }
114  }
115 }

◆ computePDNonlocalOffDiagJacobian()

virtual void MechanicsBasePD::computePDNonlocalOffDiagJacobian ( unsigned int  ,
unsigned int   
)
inlinevirtualinherited

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 in MechanicsOSPD, FiniteStrainMechanicsNOSPD, ForceStabilizedSmallStrainMechanicsNOSPD, SmallStrainMechanicsNOSPD, and WeakPlaneStressNOSPD.

Definition at line 42 of file MechanicsBasePD.h.

43  {};

Referenced by MechanicsBasePD::computeOffDiagJacobian().

◆ initialSetup()

void MechanicsBasePD::initialSetup ( )
overridevirtualinherited

Definition at line 47 of file MechanicsBasePD.C.

48 {
49  _orientation = &_assembly.getFE(FEType(), 1)->get_dxyzdxi();
50 }

◆ prepare()

void MechanicsBasePD::prepare ( )
overridevirtualinherited

Definition at line 53 of file MechanicsBasePD.C.

54 {
56 
57  _ivardofs_ij.resize(_nnodes);
58 
59  for (unsigned int i = 0; i < _nnodes; ++i)
60  _ivardofs_ij[i] = _current_elem->node_ptr(i)->dof_number(_sys.number(), _var.number(), 0);
61 
62  for (unsigned int i = 0; i < _dim; ++i)
63  _cur_ori_ij(i) = _origin_vec_ij(i) + _disp_var[i]->getNodalValue(*_current_elem->node_ptr(1)) -
64  _disp_var[i]->getNodalValue(*_current_elem->node_ptr(0));
65 
66  _cur_len_ij = _cur_ori_ij.norm();
68 }

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

Member Data Documentation

◆ _bond_dfdT_ij

const MaterialProperty<Real>& MechanicsBPD::_bond_dfdT_ij
protected

Definition at line 35 of file MechanicsBPD.h.

Referenced by computeLocalOffDiagJacobian().

◆ _bond_dfdU_ij

const MaterialProperty<Real>& MechanicsBPD::_bond_dfdU_ij
protected

Definition at line 34 of file MechanicsBPD.h.

Referenced by computeLocalJacobian(), and computeLocalOffDiagJacobian().

◆ _bond_force_ij

const MaterialProperty<Real>& MechanicsBPD::_bond_force_ij
protected

Bond based material properties.

Definition at line 33 of file MechanicsBPD.h.

Referenced by computeLocalJacobian(), computeLocalOffDiagJacobian(), and computeLocalResidual().

◆ _component

const unsigned int MechanicsBPD::_component
protected

The index of displcement component.

Definition at line 39 of file MechanicsBPD.h.

Referenced by computeLocalJacobian(), computeLocalOffDiagJacobian(), and computeLocalResidual().

◆ _cur_len_ij

Real MechanicsBasePD::_cur_len_ij
protectedinherited

◆ _cur_ori_ij

RealGradient MechanicsBasePD::_cur_ori_ij
protectedinherited

◆ _disp_var

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

◆ _ivardofs_ij

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

◆ _ndisp

unsigned int MechanicsBasePD::_ndisp
protectedinherited

number of displacement components

Definition at line 58 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 66 of file MechanicsBasePD.h.

Referenced by MechanicsBasePD::initialSetup().

◆ _out_of_plane_strain_coupled

const bool MechanicsBasePD::_out_of_plane_strain_coupled
protectedinherited

Parameters for out-of-plane strain in weak plane stress formulation.

Definition at line 61 of file MechanicsBasePD.h.

Referenced by MechanicsBasePD::computeOffDiagJacobian().

◆ _out_of_plane_strain_var

MooseVariable* MechanicsBasePD::_out_of_plane_strain_var
protectedinherited

Definition at line 62 of file MechanicsBasePD.h.

Referenced by MechanicsBasePD::computeOffDiagJacobian().

◆ _temp_coupled

const bool MechanicsBasePD::_temp_coupled
protectedinherited

◆ _temp_var

MooseVariable* MechanicsBasePD::_temp_var
protectedinherited

The documentation for this class was generated from the following files:
MechanicsBPD::_bond_force_ij
const MaterialProperty< Real > & _bond_force_ij
Bond based material properties.
Definition: MechanicsBPD.h:33
MechanicsBasePD::MechanicsBasePD
MechanicsBasePD(const InputParameters &parameters)
Definition: MechanicsBasePD.C:29
MechanicsBasePD::_cur_ori_ij
RealGradient _cur_ori_ij
Vector of bond in current configuration.
Definition: MechanicsBasePD.h:72
MechanicsBasePD::_temp_var
MooseVariable * _temp_var
Definition: MechanicsBasePD.h:54
MechanicsBasePD::_temp_coupled
const bool _temp_coupled
Temperature variable.
Definition: MechanicsBasePD.h:53
MechanicsBPD::_bond_dfdU_ij
const MaterialProperty< Real > & _bond_dfdU_ij
Definition: MechanicsBPD.h:34
MechanicsBPD::_bond_dfdT_ij
const MaterialProperty< Real > & _bond_dfdT_ij
Definition: MechanicsBPD.h:35
MechanicsBasePD::_orientation
const std::vector< RealGradient > * _orientation
Vector of bond in current configuration.
Definition: MechanicsBasePD.h:66
MechanicsBasePD::computeLocalOffDiagJacobian
virtual void computeLocalOffDiagJacobian(unsigned int)
Function to compute local contribution to the off-diagonal Jacobian at the current nodes.
Definition: MechanicsBasePD.h:35
MechanicsBasePD::_out_of_plane_strain_var
MooseVariable * _out_of_plane_strain_var
Definition: MechanicsBasePD.h:62
PeridynamicsKernelBase::prepare
virtual void prepare()
Function to precalculate data which will be used in the derived classes.
Definition: PeridynamicsKernelBase.C:43
MechanicsBasePD::_out_of_plane_strain_coupled
const bool _out_of_plane_strain_coupled
Parameters for out-of-plane strain in weak plane stress formulation.
Definition: MechanicsBasePD.h:61
MechanicsBasePD::_ivardofs_ij
std::vector< dof_id_type > _ivardofs_ij
Current variable dof numbers for nodes i and j.
Definition: MechanicsBasePD.h:69
MechanicsBPD::_component
const unsigned int _component
The index of displcement component.
Definition: MechanicsBPD.h:39
MechanicsBasePD::computePDNonlocalOffDiagJacobian
virtual void computePDNonlocalOffDiagJacobian(unsigned int, unsigned int)
Function to compute nonlocal contribution to the off-diagonal Jacobian at the current nodes.
Definition: MechanicsBasePD.h:42
MechanicsBasePD::prepare
virtual void prepare() override
Definition: MechanicsBasePD.C:53
MechanicsBasePD::_cur_len_ij
Real _cur_len_ij
Current bond length.
Definition: MechanicsBasePD.h:75
MechanicsBasePD::_disp_var
std::vector< MooseVariable * > _disp_var
displacement variables
Definition: MechanicsBasePD.h:50