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

UserObject class to compute the residual and diagonal Jacobian components for scalar out-of-plane strain variable of generalized plane strain model based on ordinary state-based peridynamic model. More...

#include <GeneralizedPlaneStrainUserObjectOSPD.h>

Inheritance diagram for GeneralizedPlaneStrainUserObjectOSPD:
[legend]

Public Member Functions

 GeneralizedPlaneStrainUserObjectOSPD (const InputParameters &parameters)
 
virtual void execute () override
 
virtual void initialize () override
 
virtual void threadJoin (const UserObject &uo) override
 
virtual void finalize () override
 
Real returnResidual () const
 Function to return the computed residual. More...
 
Real returnJacobian () const
 Function to return the computed diagonal Jacobian. More...
 

Protected Attributes

MooseVariable * _out_of_plane_stress_var
 Variable for out-of-plane stress component. More...
 
const MooseEnum _strain
 Option of strain formulation: SMALL or FINITE. More...
 
const MaterialProperty< RankFourTensor > & _Cijkl
 Elasticity tensor. More...
 
Real _residual
 Residual parameter. More...
 
Real _jacobian
 Jacobian parameter. More...
 
MooseVariable * _bond_status_var
 Bond status aux variable. More...
 
AuxiliarySystem & _aux
 Reference to auxiliary system. More...
 
NumericVector< Number > & _aux_sln
 Solution vector for aux variables. More...
 
PeridynamicsMesh_pdmesh
 Reference to Peridynamic mesh. More...
 
const Function & _pressure
 Applied out-of-plane force parameters. More...
 
const Real _factor
 

Detailed Description

UserObject class to compute the residual and diagonal Jacobian components for scalar out-of-plane strain variable of generalized plane strain model based on ordinary state-based peridynamic model.

Definition at line 24 of file GeneralizedPlaneStrainUserObjectOSPD.h.

Constructor & Destructor Documentation

◆ GeneralizedPlaneStrainUserObjectOSPD()

GeneralizedPlaneStrainUserObjectOSPD::GeneralizedPlaneStrainUserObjectOSPD ( const InputParameters &  parameters)

Definition at line 30 of file GeneralizedPlaneStrainUserObjectOSPD.C.

33  _out_of_plane_stress_var(getVar("out_of_plane_stress_variable", 0))
34 {
35 }

Member Function Documentation

◆ execute()

void GeneralizedPlaneStrainUserObjectOSPD::execute ( )
overridevirtual

Definition at line 38 of file GeneralizedPlaneStrainUserObjectOSPD.C.

39 {
40  // dof_id_type for node i and j
41  dof_id_type node_i = _current_elem->node_id(0);
42  dof_id_type node_j = _current_elem->node_id(1);
43 
44  // coordinates for node i and j
45  Point coord_i = *_pdmesh.nodePtr(node_i);
46  Point coord_j = *_pdmesh.nodePtr(node_j);
47 
48  // nodal area for node i and j
49  Real nv_i = _pdmesh.getPDNodeVolume(node_i);
50  Real nv_j = _pdmesh.getPDNodeVolume(node_j);
51 
52  // number of neighbors for node i and j, used to avoid repeated accounting nodal stress in
53  // element-wise loop
54  unsigned int nn_i = _pdmesh.getNeighbors(node_i).size();
55  unsigned int nn_j = _pdmesh.getNeighbors(node_j).size();
56 
57  // residual
58  _residual += (_out_of_plane_stress_var->getNodalValue(*_current_elem->node_ptr(0)) -
59  _pressure.value(_t, coord_i) * _factor) *
60  nv_i / nn_i;
61  _residual += (_out_of_plane_stress_var->getNodalValue(*_current_elem->node_ptr(1)) -
62  _pressure.value(_t, coord_j) * _factor) *
63  nv_j / nn_j;
64 
65  // diagonal jacobian
66  _jacobian += _Cijkl[0](2, 2, 2, 2) * nv_i / nn_i + _Cijkl[0](2, 2, 2, 2) * nv_j / nn_j;
67 }

◆ finalize()

void GeneralizedPlaneStrainUserObjectBasePD::finalize ( )
overridevirtualinherited

Definition at line 60 of file GeneralizedPlaneStrainUserObjectBasePD.C.

61 {
62  gatherSum(_residual);
63  gatherSum(_jacobian);
64 }

◆ initialize()

void GeneralizedPlaneStrainUserObjectBasePD::initialize ( )
overridevirtualinherited

Definition at line 44 of file GeneralizedPlaneStrainUserObjectBasePD.C.

45 {
46  _residual = 0;
47  _jacobian = 0;
48 }

◆ returnJacobian()

Real GeneralizedPlaneStrainUserObjectBasePD::returnJacobian ( ) const
inherited

Function to return the computed diagonal Jacobian.

Returns
The computed Jacobian

Definition at line 73 of file GeneralizedPlaneStrainUserObjectBasePD.C.

74 {
75  return _jacobian;
76 }

Referenced by GeneralizedPlaneStrainPD::computeJacobian().

◆ returnResidual()

Real GeneralizedPlaneStrainUserObjectBasePD::returnResidual ( ) const
inherited

Function to return the computed residual.

Returns
The computed residual

Definition at line 67 of file GeneralizedPlaneStrainUserObjectBasePD.C.

68 {
69  return _residual;
70 }

Referenced by GeneralizedPlaneStrainPD::computeResidual().

◆ threadJoin()

void GeneralizedPlaneStrainUserObjectBasePD::threadJoin ( const UserObject &  uo)
overridevirtualinherited

Definition at line 51 of file GeneralizedPlaneStrainUserObjectBasePD.C.

52 {
54  static_cast<const GeneralizedPlaneStrainUserObjectBasePD &>(uo);
55  _residual += gpsuo._residual;
56  _jacobian += gpsuo._jacobian;
57 }

Member Data Documentation

◆ _aux

AuxiliarySystem& ElementUserObjectBasePD::_aux
protectedinherited

Reference to auxiliary system.

Definition at line 33 of file ElementUserObjectBasePD.h.

Referenced by NodalAuxVariableUserObjectBasePD::execute(), and NodalAuxVariableUserObjectBasePD::initialize().

◆ _aux_sln

NumericVector<Number>& ElementUserObjectBasePD::_aux_sln
protectedinherited

◆ _bond_status_var

MooseVariable* ElementUserObjectBasePD::_bond_status_var
protectedinherited

◆ _Cijkl

const MaterialProperty<RankFourTensor>& GeneralizedPlaneStrainUserObjectBasePD::_Cijkl
protectedinherited

Elasticity tensor.

Definition at line 49 of file GeneralizedPlaneStrainUserObjectBasePD.h.

Referenced by GeneralizedPlaneStrainUserObjectNOSPD::execute(), and execute().

◆ _factor

const Real GeneralizedPlaneStrainUserObjectBasePD::_factor
protectedinherited

◆ _jacobian

Real GeneralizedPlaneStrainUserObjectBasePD::_jacobian
protectedinherited

◆ _out_of_plane_stress_var

MooseVariable* GeneralizedPlaneStrainUserObjectOSPD::_out_of_plane_stress_var
protected

Variable for out-of-plane stress component.

Definition at line 33 of file GeneralizedPlaneStrainUserObjectOSPD.h.

Referenced by execute().

◆ _pdmesh

PeridynamicsMesh& ElementUserObjectBasePD::_pdmesh
protectedinherited

◆ _pressure

const Function& GeneralizedPlaneStrainUserObjectBasePD::_pressure
protectedinherited

Applied out-of-plane force parameters.

Definition at line 52 of file GeneralizedPlaneStrainUserObjectBasePD.h.

Referenced by GeneralizedPlaneStrainUserObjectNOSPD::execute(), and execute().

◆ _residual

Real GeneralizedPlaneStrainUserObjectBasePD::_residual
protectedinherited

◆ _strain

const MooseEnum GeneralizedPlaneStrainUserObjectBasePD::_strain
protectedinherited

Option of strain formulation: SMALL or FINITE.

Definition at line 46 of file GeneralizedPlaneStrainUserObjectBasePD.h.


The documentation for this class was generated from the following files:
GeneralizedPlaneStrainUserObjectBasePD::_pressure
const Function & _pressure
Applied out-of-plane force parameters.
Definition: GeneralizedPlaneStrainUserObjectBasePD.h:52
PeridynamicsMesh::getPDNodeVolume
Real getPDNodeVolume(dof_id_type node_id)
Function to return nodal volume for node node_id.
Definition: PeridynamicsMesh.C:435
GeneralizedPlaneStrainUserObjectBasePD::_factor
const Real _factor
Definition: GeneralizedPlaneStrainUserObjectBasePD.h:53
GeneralizedPlaneStrainUserObjectBasePD::_jacobian
Real _jacobian
Jacobian parameter.
Definition: GeneralizedPlaneStrainUserObjectBasePD.h:60
GeneralizedPlaneStrainUserObjectBasePD::GeneralizedPlaneStrainUserObjectBasePD
GeneralizedPlaneStrainUserObjectBasePD(const InputParameters &parameters)
Definition: GeneralizedPlaneStrainUserObjectBasePD.C:33
GeneralizedPlaneStrainUserObjectBasePD
Base userObject class to compute the residual and diagonal Jacobian components for scalar out-of-plan...
Definition: GeneralizedPlaneStrainUserObjectBasePD.h:23
GeneralizedPlaneStrainUserObjectBasePD::_Cijkl
const MaterialProperty< RankFourTensor > & _Cijkl
Elasticity tensor.
Definition: GeneralizedPlaneStrainUserObjectBasePD.h:49
PeridynamicsMesh::getNeighbors
std::vector< dof_id_type > getNeighbors(dof_id_type node_id)
Function to return neighbor nodes indices for node node_id.
Definition: PeridynamicsMesh.C:362
GeneralizedPlaneStrainUserObjectBasePD::_residual
Real _residual
Residual parameter.
Definition: GeneralizedPlaneStrainUserObjectBasePD.h:57
GeneralizedPlaneStrainUserObjectOSPD::_out_of_plane_stress_var
MooseVariable * _out_of_plane_stress_var
Variable for out-of-plane stress component.
Definition: GeneralizedPlaneStrainUserObjectOSPD.h:33
ElementUserObjectBasePD::_pdmesh
PeridynamicsMesh & _pdmesh
Reference to Peridynamic mesh.
Definition: ElementUserObjectBasePD.h:39