Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
GeneralizedPlaneStrainOffDiagOSPD Class Reference

Kernel class for coupled off diagonal Jacobian entries of ordinary state-based peridynamic generalized plane strain model. More...

#include <GeneralizedPlaneStrainOffDiagOSPD.h>

Inheritance diagram for GeneralizedPlaneStrainOffDiagOSPD:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 GeneralizedPlaneStrainOffDiagOSPD (const InputParameters &parameters)
 
virtual void computeOffDiagJacobian (unsigned int jvar) override
 
virtual void computeLocalOffDiagJacobian (unsigned int, unsigned int)
 Function to compute local contribution to the off-diagonal Jacobian at the current nodes. More...
 
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
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void computeLocalResidual () override
 
virtual void computeOffDiagJacobianScalar (unsigned int jvar_num) override
 
void computeDispFullOffDiagJacobianScalar (unsigned int component, unsigned int jvar_num)
 Function to compute the full off diagonal Jacobian for coupling between displacements and scalar variable. More...
 
void computeDispPartialOffDiagJacobianScalar (unsigned int component, unsigned int jvar_num)
 Function to compute partial off diagonal Jacobian for coupling between displacements and scalar variable. More...
 
void computeTempOffDiagJacobianScalar (unsigned int jvar_num)
 Function to compute off disgonal Jacobian for coupling between temperature and scalar variable. More...
 

Protected Attributes

const MaterialProperty< RankFourTensor > & _Cijkl
 Material point based material property. More...
 
const unsigned int _scalar_out_of_plane_strain_var_num
 The variable number of the scalar out-of-plane strain variable. More...
 
DenseMatrix< Number_ken
 
DenseMatrix< Number_kne
 
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
 Current variable dof numbers for nodes i and j. More...
 
std::vector< Real_weights
 weights used for the current element to obtain the nodal stress More...
 
RealGradient _current_vec
 Vector of bond in current configuration. More...
 
RealGradient _current_unit_vec
 Unit vector of bond in current configuration. More...
 
const MaterialProperty< Real > & _bond_local_dfdE
 Bond based material properties. More...
 
const MaterialProperty< Real > & _bond_nonlocal_dfdE
 
const MaterialProperty< Real > & _alpha
 
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 coupled off diagonal Jacobian entries of ordinary state-based peridynamic generalized plane strain model.

Definition at line 18 of file GeneralizedPlaneStrainOffDiagOSPD.h.

Constructor & Destructor Documentation

◆ GeneralizedPlaneStrainOffDiagOSPD()

GeneralizedPlaneStrainOffDiagOSPD::GeneralizedPlaneStrainOffDiagOSPD ( const InputParameters parameters)

Definition at line 31 of file GeneralizedPlaneStrainOffDiagOSPD.C.

33  : MechanicsBasePD(parameters),
34  _bond_local_dfdE(getMaterialProperty<Real>("bond_local_dfdE")),
35  _bond_nonlocal_dfdE(getMaterialProperty<Real>("bond_nonlocal_dfdE")),
36  _alpha(getMaterialProperty<Real>("thermal_expansion_coeff")),
37  _Cijkl(getMaterialProperty<RankFourTensor>("elasticity_tensor")),
38  _scalar_out_of_plane_strain_var_num(coupledScalar("scalar_out_of_plane_strain"))
39 {
40  // Consistency check
41  if (_disp_var.size() != 2)
42  mooseError("GeneralizedPlaneStrain only works for two dimensional case!");
43 }
const MaterialProperty< Real > & _bond_nonlocal_dfdE
void mooseError(Args &&... args)
MechanicsBasePD(const InputParameters &parameters)
const MaterialProperty< Real > & _bond_local_dfdE
Bond based material properties.
std::vector< MooseVariable * > _disp_var
displacement variables
const MaterialProperty< RankFourTensor > & _Cijkl
Material point based material property.
const unsigned int _scalar_out_of_plane_strain_var_num
The variable number of the scalar out-of-plane strain variable.

Member Function Documentation

◆ computeDispFullOffDiagJacobianScalar()

void GeneralizedPlaneStrainOffDiagOSPD::computeDispFullOffDiagJacobianScalar ( unsigned int  component,
unsigned int  jvar_num 
)
protected

Function to compute the full off diagonal Jacobian for coupling between displacements and scalar variable.

Parameters
componentThe index of displacement component
jvar_numThe coupled scalar variable number

Definition at line 68 of file GeneralizedPlaneStrainOffDiagOSPD.C.

Referenced by computeOffDiagJacobianScalar().

70 {
71  prepareMatrixTag(_assembly, _var.number(), jvar_num, _ken);
72  prepareMatrixTag(_assembly, jvar_num, _var.number(), _kne);
73  MooseVariableScalar & jvar = _sys.getScalarVariable(_tid, jvar_num);
74 
75  // LOCAL jacobian contribution
76  // fill in the column corresponding to the scalar variable from bond ij
77  for (unsigned int i = 0; i < _nnodes; ++i)
78  for (unsigned int j = 0; j < jvar.order(); ++j)
79  _ken(i, j) +=
80  (i == j ? -1 : 1) * _current_unit_vec(component) * _bond_local_dfdE[0] * _bond_status;
81 
82  // NONLOCAL jacobian contribution
83  std::vector<RankTwoTensor> shape(_nnodes), dgrad(_nnodes);
84 
85  // for off-diagonal low components
86  if (_bond_status > 0.5)
87  {
88  for (unsigned int nd = 0; nd < _nnodes; nd++)
89  {
90  if (_dim == 2)
91  shape[nd](2, 2) = dgrad[nd](2, 2) = 1.0;
92  // calculation of jacobian contribution to current node's neighbors
93  std::vector<dof_id_type> ivardofs(_nnodes);
94  ivardofs[nd] = _ivardofs[nd];
95  std::vector<dof_id_type> neighbors = _pdmesh.getNeighbors(_current_elem->node_id(nd));
96  std::vector<dof_id_type> bonds = _pdmesh.getBonds(_current_elem->node_id(nd));
97 
98  Real vol_nb, weight_nb;
99  RealGradient origin_vec_nb, current_vec_nb;
100 
101  for (unsigned int nb = 0; nb < neighbors.size(); nb++)
102  if (_bond_status_var->getElementalValue(_pdmesh.elemPtr(bonds[nb])) > 0.5)
103  {
104  ivardofs[1 - nd] =
105  _pdmesh.nodePtr(neighbors[nb])->dof_number(_sys.number(), _var.number(), 0);
106  vol_nb = _pdmesh.getNodeVolume(neighbors[nb]);
107 
108  // obtain bond nb's origin length and current orientation
109  origin_vec_nb = _pdmesh.getNodeCoord(neighbors[nb]) -
110  _pdmesh.getNodeCoord(_current_elem->node_id(nd));
111 
112  for (unsigned int k = 0; k < _dim; k++)
113  current_vec_nb(k) = origin_vec_nb(k) +
114  _disp_var[k]->getNodalValue(*_pdmesh.nodePtr(neighbors[nb])) -
115  _disp_var[k]->getNodalValue(*_current_elem->node_ptr(nd));
116 
117  weight_nb = _horizon_radius[nd] / origin_vec_nb.norm();
118  // prepare shape tensor and deformation gradient tensor for current node
119  for (unsigned int k = 0; k < _dim; k++)
120  for (unsigned int l = 0; l < _dim; l++)
121  {
122  shape[nd](k, l) += weight_nb * origin_vec_nb(k) * origin_vec_nb(l) * vol_nb;
123  dgrad[nd](k, l) += weight_nb * current_vec_nb(k) * origin_vec_nb(l) * vol_nb;
124  }
125 
126  // cache the nonlocal jacobian contribution
127  _local_ke.resize(_ken.m(), _ken.n());
128  _local_ke.zero();
129  _local_ke(0, 0) = (nd == 0 ? -1 : 1) * current_vec_nb(component) / current_vec_nb.norm() *
130  _bond_nonlocal_dfdE[nd] / origin_vec_nb.norm() * vol_nb * _bond_status;
131  _local_ke(1, 0) = (nd == 0 ? 1 : -1) * current_vec_nb(component) / current_vec_nb.norm() *
132  _bond_nonlocal_dfdE[nd] / origin_vec_nb.norm() * vol_nb * _bond_status;
133 
134  addJacobian(_assembly, _local_ke, ivardofs, jvar.dofIndices(), _var.scalingFactor());
135  }
136 
137  // finalize the shape tensor and deformation gradient tensor for node_i
138  if (shape[nd].det() == 0.)
139  mooseError("Singular shape tensor is detected in GeneralizedPlaneStrainOffDiagOSPD! Use "
140  "SingularShapeTensorEliminatorUserObjectPD to avoid singular shape tensor");
141 
142  shape[nd] = shape[nd].inverse();
143  dgrad[nd] = dgrad[nd] * shape[nd];
144  }
145  }
146 
147  // off-diagonal jacobian entries on the row
148  Real dEidUi =
149  -_node_vol[1] * _horizon_radius[0] / _origin_vec.norm() *
150  (_Cijkl[0](2, 2, 0, 0) * (_origin_vec(0) * shape[0](0, 0) + _origin_vec(1) * shape[0](1, 0)) *
151  dgrad[0](component, 0) +
152  _Cijkl[0](2, 2, 1, 1) * (_origin_vec(0) * shape[0](0, 1) + _origin_vec(1) * shape[0](1, 1)) *
153  dgrad[0](component, 1));
154  Real dEjdUj =
155  _node_vol[0] * _horizon_radius[1] / _origin_vec.norm() *
156  (_Cijkl[0](2, 2, 0, 0) * (_origin_vec(0) * shape[1](0, 0) + _origin_vec(1) * shape[1](1, 0)) *
157  dgrad[1](component, 0) +
158  _Cijkl[0](2, 2, 1, 1) * (_origin_vec(0) * shape[1](0, 1) + _origin_vec(1) * shape[1](1, 1)) *
159  dgrad[1](component, 1));
160 
161  // fill in the row corresponding to the scalar variable
162  _kne(0, 0) += (dEidUi * _node_vol[0] - dEjdUj * _node_vol[1]) * _bond_status; // node i
163  _kne(0, 1) += (dEjdUj * _node_vol[1] - dEidUi * _node_vol[0]) * _bond_status; // node j
164 
165  accumulateTaggedLocalMatrix(_assembly, _var.number(), jvar_num, _ken);
166  accumulateTaggedLocalMatrix(_assembly, jvar_num, _var.number(), _kne);
167 }
const MaterialProperty< Real > & _bond_nonlocal_dfdE
auto norm() const -> decltype(std::norm(Real()))
void mooseError(Args &&... args)
static const std::string component
Definition: NS.h:153
RealGradient _current_unit_vec
Unit vector of bond in current configuration.
unsigned int m() const
const MaterialProperty< Real > & _bond_local_dfdE
Bond based material properties.
std::vector< MooseVariable * > _disp_var
displacement variables
const MaterialProperty< RankFourTensor > & _Cijkl
Material point based material property.
std::vector< dof_id_type > _ivardofs
Current variable dof numbers for nodes i and j.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
unsigned int n() const
static const std::string k
Definition: NS.h:130

◆ computeDispPartialOffDiagJacobianScalar()

void GeneralizedPlaneStrainOffDiagOSPD::computeDispPartialOffDiagJacobianScalar ( unsigned int  component,
unsigned int  jvar_num 
)
protected

Function to compute partial off diagonal Jacobian for coupling between displacements and scalar variable.

Parameters
componentThe index of displacement component
jvar_numThe coupled scalar variable number

Definition at line 170 of file GeneralizedPlaneStrainOffDiagOSPD.C.

Referenced by computeOffDiagJacobianScalar().

172 {
173  prepareMatrixTag(_assembly, _var.number(), jvar_num, _ken);
174  prepareMatrixTag(_assembly, jvar_num, _var.number(), _kne);
175  MooseVariableScalar & jvar = _sys.getScalarVariable(_tid, jvar_num);
176 
177  // fill in the column corresponding to the scalar variable from bond ij
178  for (unsigned int i = 0; i < _nnodes; ++i)
179  for (unsigned int j = 0; j < jvar.order(); ++j)
180  {
181  _ken(i, j) +=
182  (i == j ? -1 : 1) * _current_unit_vec(component) * _bond_local_dfdE[0] * _bond_status;
183  _kne(j, i) +=
184  (i == j ? -1 : 1) * _current_unit_vec(component) * _bond_local_dfdE[0] * _bond_status;
185  }
186 
187  accumulateTaggedLocalMatrix(_assembly, _var.number(), jvar_num, _ken);
188  accumulateTaggedLocalMatrix(_assembly, jvar_num, _var.number(), _kne);
189 }
static const std::string component
Definition: NS.h:153
RealGradient _current_unit_vec
Unit vector of bond in current configuration.
const MaterialProperty< Real > & _bond_local_dfdE
Bond based material properties.
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")

◆ computeLocalOffDiagJacobian()

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

Function to compute local contribution to the off-diagonal Jacobian at the current nodes.

Parameters
coupled_componentThe coupled variable number

Reimplemented in HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD, HorizonStabilizedFormIISmallStrainMechanicsNOSPD, HorizonStabilizedFormIFiniteStrainMechanicsNOSPD, HorizonStabilizedFormISmallStrainMechanicsNOSPD, MechanicsOSPD, ForceStabilizedSmallStrainMechanicsNOSPD, MechanicsBPD, and WeakPlaneStressNOSPD.

Definition at line 31 of file MechanicsBasePD.h.

Referenced by MechanicsBasePD::computeOffDiagJacobian().

32  {};

◆ computeLocalResidual()

virtual void GeneralizedPlaneStrainOffDiagOSPD::computeLocalResidual ( )
inlineoverrideprotectedvirtual

Definition at line 26 of file GeneralizedPlaneStrainOffDiagOSPD.h.

26 {};

◆ computeOffDiagJacobian()

void MechanicsBasePD::computeOffDiagJacobian ( unsigned int  jvar)
overridevirtualinherited

Definition at line 73 of file MechanicsBasePD.C.

74 {
75  prepare();
76 
77  if (jvar_num == _var.number())
78  computeJacobian();
79  else
80  {
81  unsigned int coupled_component = 0;
82  bool active = false;
83 
84  for (unsigned int i = 0; i < _dim; ++i)
85  if (jvar_num == _disp_var[i]->number())
86  {
87  coupled_component = i;
88  active = true;
89  }
90 
91  if (_temp_coupled && jvar_num == _temp_var->number())
92  active = true;
93 
95  active = true;
96 
97  if (active)
98  {
99  prepareMatrixTag(_assembly, _var.number(), jvar_num);
100  computeLocalOffDiagJacobian(jvar_num, coupled_component);
101  accumulateTaggedLocalMatrix();
102 
103  if (_use_full_jacobian)
104  computePDNonlocalOffDiagJacobian(jvar_num, coupled_component);
105  }
106  }
107 }
const bool _temp_coupled
Temperature variable.
unsigned int number() const
virtual void computeLocalOffDiagJacobian(unsigned int, unsigned int)
Function to compute local contribution to the off-diagonal Jacobian at the current nodes...
const bool _out_of_plane_strain_coupled
Parameters for out-of-plane strain in weak plane stress formulation.
std::vector< MooseVariable * > _disp_var
displacement variables
virtual void prepare() override
MooseVariable * _out_of_plane_strain_var
virtual void computePDNonlocalOffDiagJacobian(unsigned int, unsigned int)
Function to compute nonlocal contribution to the off-diagonal Jacobian at the current nodes...
MooseVariable * _temp_var

◆ computeOffDiagJacobianScalar()

void GeneralizedPlaneStrainOffDiagOSPD::computeOffDiagJacobianScalar ( unsigned int  jvar_num)
overrideprotectedvirtual

Definition at line 46 of file GeneralizedPlaneStrainOffDiagOSPD.C.

47 {
49  {
50  prepare();
51 
52  if (_var.number() == _disp_var[0]->number())
53  if (_use_full_jacobian)
55  else
57  else if (_var.number() == _disp_var[1]->number())
58  if (_use_full_jacobian)
60  else
62  else if (_temp_coupled ? _var.number() == _temp_var->number() : 0)
64  }
65 }
void computeTempOffDiagJacobianScalar(unsigned int jvar_num)
Function to compute off disgonal Jacobian for coupling between temperature and scalar variable...
const bool _temp_coupled
Temperature variable.
unsigned int number() const
std::vector< MooseVariable * > _disp_var
displacement variables
virtual void prepare() override
void computeDispPartialOffDiagJacobianScalar(unsigned int component, unsigned int jvar_num)
Function to compute partial off diagonal Jacobian for coupling between displacements and scalar varia...
const unsigned int _scalar_out_of_plane_strain_var_num
The variable number of the scalar out-of-plane strain variable.
void computeDispFullOffDiagJacobianScalar(unsigned int component, unsigned int jvar_num)
Function to compute the full off diagonal Jacobian for coupling between displacements and scalar vari...
MooseVariable * _temp_var

◆ 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 HorizonStabilizedFormIIFiniteStrainMechanicsNOSPD, HorizonStabilizedFormIISmallStrainMechanicsNOSPD, HorizonStabilizedFormIFiniteStrainMechanicsNOSPD, HorizonStabilizedFormISmallStrainMechanicsNOSPD, MechanicsOSPD, ForceStabilizedSmallStrainMechanicsNOSPD, and WeakPlaneStressNOSPD.

Definition at line 39 of file MechanicsBasePD.h.

Referenced by MechanicsBasePD::computeOffDiagJacobian().

40  {};

◆ computeTempOffDiagJacobianScalar()

void GeneralizedPlaneStrainOffDiagOSPD::computeTempOffDiagJacobianScalar ( unsigned int  jvar_num)
protected

Function to compute off disgonal Jacobian for coupling between temperature and scalar variable.

Parameters
jvar_numThe coupled scalar variable number

Definition at line 192 of file GeneralizedPlaneStrainOffDiagOSPD.C.

Referenced by computeOffDiagJacobianScalar().

193 {
194  // off-diagonal jacobian entries on the row
195  prepareMatrixTag(_assembly, jvar_num, _var.number(), _kne);
196 
197  // calculate number of active neighbors for node i and j
198  std::vector<unsigned int> active_neighbors(_nnodes, 0);
199  for (unsigned int nd = 0; nd < _nnodes; nd++)
200  {
201  std::vector<dof_id_type> bonds = _pdmesh.getBonds(_current_elem->node_id(nd));
202  for (unsigned int nb = 0; nb < bonds.size(); ++nb)
203  if (_bond_status_var->getElementalValue(_pdmesh.elemPtr(bonds[nb])) > 0.5)
204  active_neighbors[nd]++;
205 
206  if (active_neighbors[nd] == 0) // avoid dividing by zero
207  active_neighbors[nd] = 1;
208  }
209 
210  // one-way coupling between the strain_zz and temperature. fill in the row corresponding to the
211  // scalar variable strain_zz
212  _kne(0, 0) += -_alpha[0] *
213  (_Cijkl[0](2, 2, 0, 0) + _Cijkl[0](2, 2, 1, 1) + _Cijkl[0](2, 2, 2, 2)) *
214  _node_vol[0] / active_neighbors[0] * _bond_status; // node i
215  _kne(0, 1) += -_alpha[0] *
216  (_Cijkl[0](2, 2, 0, 0) + _Cijkl[0](2, 2, 1, 1) + _Cijkl[0](2, 2, 2, 2)) *
217  _node_vol[1] / active_neighbors[1] * _bond_status; // node j
218 
219  accumulateTaggedLocalMatrix(_assembly, jvar_num, _var.number(), _kne);
220 }
const MaterialProperty< RankFourTensor > & _Cijkl
Material point based material property.

◆ initialSetup()

void MechanicsBasePD::initialSetup ( )
overridevirtualinherited

Definition at line 45 of file MechanicsBasePD.C.

46 {
47  _orientation = &_assembly.getFE(FEType(), 1)->get_dxyzdxi();
48 }
const std::vector< RealGradient > * _orientation
Vector of bond in current configuration.

◆ prepare()

void MechanicsBasePD::prepare ( )
overridevirtualinherited

Definition at line 51 of file MechanicsBasePD.C.

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

52 {
54 
55  _ivardofs.resize(_nnodes);
56  _weights.resize(_nnodes);
57  for (unsigned int nd = 0; nd < _nnodes; ++nd)
58  {
59  _ivardofs[nd] = _current_elem->node_ptr(nd)->dof_number(_sys.number(), _var.number(), 0);
60  _weights[nd] = _pdmesh.getNeighborWeight(
61  _current_elem->node_id(nd),
62  _pdmesh.getNeighborIndex(_current_elem->node_id(nd), _current_elem->node_id(1 - nd)));
63  }
64 
65  for (unsigned int i = 0; i < _dim; ++i)
66  _current_vec(i) = _origin_vec(i) + _disp_var[i]->getNodalValue(*_current_elem->node_ptr(1)) -
67  _disp_var[i]->getNodalValue(*_current_elem->node_ptr(0));
68 
70 }
auto norm() const -> decltype(std::norm(Real()))
RealGradient _current_unit_vec
Unit vector of bond in current configuration.
std::vector< Real > _weights
weights used for the current element to obtain the nodal stress
std::vector< MooseVariable * > _disp_var
displacement variables
RealGradient _current_vec
Vector of bond in current configuration.
std::vector< dof_id_type > _ivardofs
Current variable dof numbers for nodes i and j.
virtual void prepare()
Function to precalculate data which will be used in the derived classes.

◆ validParams()

InputParameters GeneralizedPlaneStrainOffDiagOSPD::validParams ( )
static

Definition at line 17 of file GeneralizedPlaneStrainOffDiagOSPD.C.

18 {
20  params.addClassDescription(
21  "Class for calculating the off-diagonal Jacobian corresponding to "
22  "coupling between displacements (or temperature) and the scalar out-of-plane strain for "
23  "the generalized plane strain using the OSPD formulation");
24 
25  params.addCoupledVar("scalar_out_of_plane_strain",
26  "Scalar variable for strain in the out-of-plane direction");
27 
28  return params;
29 }
static InputParameters validParams()
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _alpha

const MaterialProperty<Real>& GeneralizedPlaneStrainOffDiagOSPD::_alpha
protected

◆ _bond_local_dfdE

const MaterialProperty<Real>& GeneralizedPlaneStrainOffDiagOSPD::_bond_local_dfdE
protected

Bond based material properties.

Definition at line 52 of file GeneralizedPlaneStrainOffDiagOSPD.h.

Referenced by computeDispFullOffDiagJacobianScalar(), and computeDispPartialOffDiagJacobianScalar().

◆ _bond_nonlocal_dfdE

const MaterialProperty<Real>& GeneralizedPlaneStrainOffDiagOSPD::_bond_nonlocal_dfdE
protected

◆ _Cijkl

const MaterialProperty<RankFourTensor>& GeneralizedPlaneStrainOffDiagOSPD::_Cijkl
protected

Material point based material property.

Definition at line 58 of file GeneralizedPlaneStrainOffDiagOSPD.h.

Referenced by computeDispFullOffDiagJacobianScalar(), and computeTempOffDiagJacobianScalar().

◆ _current_unit_vec

RealGradient MechanicsBasePD::_current_unit_vec
protectedinherited

◆ _current_vec

RealGradient MechanicsBasePD::_current_vec
protectedinherited

◆ _disp_var

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

◆ _ivardofs

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

◆ _ken

DenseMatrix<Number> GeneralizedPlaneStrainOffDiagOSPD::_ken
protected

◆ _kne

DenseMatrix<Number> GeneralizedPlaneStrainOffDiagOSPD::_kne
protected

◆ _ndisp

unsigned int MechanicsBasePD::_ndisp
protectedinherited

number of displacement components

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

Referenced by MechanicsBasePD::initialSetup().

◆ _out_of_plane_strain_coupled

const bool MechanicsBasePD::_out_of_plane_strain_coupled
protectedinherited

◆ _out_of_plane_strain_var

MooseVariable* MechanicsBasePD::_out_of_plane_strain_var
protectedinherited

◆ _scalar_out_of_plane_strain_var_num

const unsigned int GeneralizedPlaneStrainOffDiagOSPD::_scalar_out_of_plane_strain_var_num
protected

The variable number of the scalar out-of-plane strain variable.

Definition at line 61 of file GeneralizedPlaneStrainOffDiagOSPD.h.

Referenced by computeOffDiagJacobianScalar().

◆ _temp_coupled

const bool MechanicsBasePD::_temp_coupled
protectedinherited

◆ _temp_var

MooseVariable* MechanicsBasePD::_temp_var
protectedinherited

◆ _weights

std::vector<Real> MechanicsBasePD::_weights
protectedinherited

The documentation for this class was generated from the following files: