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

Userobject class to compute the equivalent scalar values for rank two tensor at individual material point. More...

#include <NodalRankTwoScalarPD.h>

Inheritance diagram for NodalRankTwoScalarPD:
[legend]

Public Member Functions

 NodalRankTwoScalarPD (const InputParameters &parameters)
 
virtual void gatherWeightedValue (unsigned int id, dof_id_type dof, Real dg_vol_frac) override
 Function to gather bond-associated quantities to each material point. More...
 
virtual void computeValue (unsigned int id, dof_id_type dof) override
 Function to assemble elemental quantities to nodal AuxVariable at a material point. More...
 
virtual void initialize () override
 
virtual void execute () override
 
virtual void threadJoin (const UserObject &) override
 
virtual void finalize () override
 

Protected Attributes

MooseEnum _scalar_type
 Determines the information to be extracted from the tensor by using the RankTwoScalarTools namespace, e.g., vonMisesStress, EquivalentPlasticStrain, L2norm, MaxPrincipal eigenvalue, etc. More...
 
const Point _point1
 Start point for axis used to calculate some cylinderical material tensor quantities. More...
 
const Point _point2
 End point for axis used to calculate some cylinderical material tensor quantities. More...
 
Point _input_direction
 Direction vector used to calculate some material tensor quantities. More...
 
const MaterialProperty< RankTwoTensor > & _tensor
 Material properties tensor. More...
 
MooseVariable * _var
 Pointer to the aux variable this userobject operates on. 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...
 

Detailed Description

Userobject class to compute the equivalent scalar values for rank two tensor at individual material point.

Definition at line 23 of file NodalRankTwoScalarPD.h.

Constructor & Destructor Documentation

◆ NodalRankTwoScalarPD()

NodalRankTwoScalarPD::NodalRankTwoScalarPD ( const InputParameters &  parameters)

Definition at line 40 of file NodalRankTwoScalarPD.C.

41  : NodalRankTwoUserObjectBasePD(parameters),
42  _scalar_type(getParam<MooseEnum>("scalar_type")),
43  _point1(parameters.get<Point>("point1")),
44  _point2(parameters.get<Point>("point2")),
45  _input_direction(parameters.get<Point>("direction") / parameters.get<Point>("direction").norm())
46 {
47 }

Member Function Documentation

◆ computeValue()

void NodalRankTwoUserObjectBasePD::computeValue ( unsigned int  id,
dof_id_type  dof 
)
overridevirtualinherited

Function to assemble elemental quantities to nodal AuxVariable at a material point.

Parameters
idThe local index of element node (either 1 or 2 for Edge2 element)
dofThe global DOF of element node
Returns
The computed value for the node

Implements NodalAuxVariableUserObjectBasePD.

Definition at line 39 of file NodalRankTwoUserObjectBasePD.C.

40 {
41  dof_id_type id_j_in_i =
42  _pdmesh.getNeighborIndex(_current_elem->node_id(id), _current_elem->node_id(1 - id));
43  Real dg_vol_frac = _pdmesh.getDefGradVolFraction(_current_elem->node_id(id), id_j_in_i);
44 
45  // gather volume weighted contribution only if the bond is active
46  if (_bond_status_var->getElementalValue(_current_elem) > 0.5)
47  gatherWeightedValue(id, dof, dg_vol_frac);
48 }

◆ execute()

void NodalAuxVariableUserObjectBasePD::execute ( )
overridevirtualinherited

Definition at line 43 of file NodalAuxVariableUserObjectBasePD.C.

44 {
45  for (unsigned int i = 0; i < 2; ++i)
46  {
47  dof_id_type dof = _current_elem->node_ptr(i)->dof_number(_aux.number(), _var->number(), 0);
48 
49  computeValue(i, dof);
50  }
51 }

◆ finalize()

void NodalAuxVariableUserObjectBasePD::finalize ( )
overridevirtualinherited

Definition at line 54 of file NodalAuxVariableUserObjectBasePD.C.

55 {
56  _aux_sln.close();
57 }

◆ gatherWeightedValue()

void NodalRankTwoScalarPD::gatherWeightedValue ( unsigned int  id,
dof_id_type  dof,
Real  dg_vol_frac 
)
overridevirtual

Function to gather bond-associated quantities to each material point.

Parameters
idThe local index of element node (either 1 or 2 for Edge2 element)
dofThe global DOF of element node
dg_vol_fracvolume fraction of deformation gradient approximation to its summation at a node
Returns
What the function returns (if it returns anything)

Implements NodalRankTwoUserObjectBasePD.

Definition at line 50 of file NodalRankTwoScalarPD.C.

51 {
52  Point curr_point = *_current_elem->node_ptr(id);
53  Real scalar_value = RankTwoScalarTools::getQuantity(
55 
56  _aux_sln.add(dof, scalar_value * dg_vol_frac);
57 }

◆ initialize()

void NodalAuxVariableUserObjectBasePD::initialize ( )
overridevirtualinherited

Definition at line 35 of file NodalAuxVariableUserObjectBasePD.C.

36 {
37  std::vector<std::string> zero_vars;
38  zero_vars.push_back(_var->name());
39  _aux.zeroVariables(zero_vars);
40 }

◆ threadJoin()

virtual void NodalAuxVariableUserObjectBasePD::threadJoin ( const UserObject &  )
inlineoverridevirtualinherited

Definition at line 30 of file NodalAuxVariableUserObjectBasePD.h.

30 {};

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

◆ _input_direction

Point NodalRankTwoScalarPD::_input_direction
protected

Direction vector used to calculate some material tensor quantities.

Definition at line 45 of file NodalRankTwoScalarPD.h.

Referenced by gatherWeightedValue().

◆ _pdmesh

PeridynamicsMesh& ElementUserObjectBasePD::_pdmesh
protectedinherited

◆ _point1

const Point NodalRankTwoScalarPD::_point1
protected

Start point for axis used to calculate some cylinderical material tensor quantities.

Definition at line 39 of file NodalRankTwoScalarPD.h.

Referenced by gatherWeightedValue().

◆ _point2

const Point NodalRankTwoScalarPD::_point2
protected

End point for axis used to calculate some cylinderical material tensor quantities.

Definition at line 42 of file NodalRankTwoScalarPD.h.

Referenced by gatherWeightedValue().

◆ _scalar_type

MooseEnum NodalRankTwoScalarPD::_scalar_type
protected

Determines the information to be extracted from the tensor by using the RankTwoScalarTools namespace, e.g., vonMisesStress, EquivalentPlasticStrain, L2norm, MaxPrincipal eigenvalue, etc.

Definition at line 36 of file NodalRankTwoScalarPD.h.

Referenced by gatherWeightedValue().

◆ _tensor

const MaterialProperty<RankTwoTensor>& NodalRankTwoUserObjectBasePD::_tensor
protectedinherited

Material properties tensor.

Definition at line 41 of file NodalRankTwoUserObjectBasePD.h.

Referenced by NodalRankTwoComponentPD::gatherWeightedValue(), and gatherWeightedValue().

◆ _var

MooseVariable* NodalAuxVariableUserObjectBasePD::_var
protectedinherited

Pointer to the aux variable this userobject operates on.

Definition at line 43 of file NodalAuxVariableUserObjectBasePD.h.

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


The documentation for this class was generated from the following files:
ElementUserObjectBasePD::_aux
AuxiliarySystem & _aux
Reference to auxiliary system.
Definition: ElementUserObjectBasePD.h:33
NodalRankTwoScalarPD::_point1
const Point _point1
Start point for axis used to calculate some cylinderical material tensor quantities.
Definition: NodalRankTwoScalarPD.h:39
NodalRankTwoScalarPD::_input_direction
Point _input_direction
Direction vector used to calculate some material tensor quantities.
Definition: NodalRankTwoScalarPD.h:45
RankTwoScalarTools::getQuantity
T getQuantity(const RankTwoTensorTempl< T > &tensor, const MooseEnum &scalar_type, const Point &point1, const Point &point2, const Point &curr_point, Point &direction)
Definition: RankTwoScalarTools.h:420
NodalRankTwoScalarPD::_point2
const Point _point2
End point for axis used to calculate some cylinderical material tensor quantities.
Definition: NodalRankTwoScalarPD.h:42
NodalAuxVariableUserObjectBasePD::computeValue
virtual void computeValue(unsigned int id, dof_id_type dof)=0
Function to assemble elemental quantities to nodal AuxVariable at a material point.
NodalAuxVariableUserObjectBasePD::_var
MooseVariable * _var
Pointer to the aux variable this userobject operates on.
Definition: NodalAuxVariableUserObjectBasePD.h:43
PeridynamicsMesh::getNeighborIndex
dof_id_type getNeighborIndex(dof_id_type node_i, dof_id_type node_j)
Function to return the local neighbor index of node_j from node_i's neighbor list.
Definition: PeridynamicsMesh.C:368
NodalRankTwoUserObjectBasePD::gatherWeightedValue
virtual void gatherWeightedValue(unsigned int id, dof_id_type dof, Real dg_vol_frac)=0
Function to gather bond-associated quantities to each material point.
NodalRankTwoUserObjectBasePD::NodalRankTwoUserObjectBasePD
NodalRankTwoUserObjectBasePD(const InputParameters &parameters)
Definition: NodalRankTwoUserObjectBasePD.C:32
NodalRankTwoUserObjectBasePD::_tensor
const MaterialProperty< RankTwoTensor > & _tensor
Material properties tensor.
Definition: NodalRankTwoUserObjectBasePD.h:41
ElementUserObjectBasePD::_bond_status_var
MooseVariable * _bond_status_var
Bond status aux variable.
Definition: ElementUserObjectBasePD.h:30
ElementUserObjectBasePD::_aux_sln
NumericVector< Number > & _aux_sln
Solution vector for aux variables.
Definition: ElementUserObjectBasePD.h:36
ElementUserObjectBasePD::_pdmesh
PeridynamicsMesh & _pdmesh
Reference to Peridynamic mesh.
Definition: ElementUserObjectBasePD.h:39
PeridynamicsMesh::getDefGradVolFraction
Real getDefGradVolFraction(dof_id_type node_id, dof_id_type neighbor_id)
Function to return summation of volumes of bond-associated neighbors used in the deformation gradient...
Definition: PeridynamicsMesh.C:453
NodalRankTwoScalarPD::_scalar_type
MooseEnum _scalar_type
Determines the information to be extracted from the tensor by using the RankTwoScalarTools namespace,...
Definition: NodalRankTwoScalarPD.h:36