https://mooseframework.inl.gov
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PhaseFieldFractureMechanicsOffDiag Class Reference

This class computes the off-diagonal Jacobian component of stress divergence residual system Contribution from damage order parameter c Useful if user wants to add the off diagonal Jacobian term. More...

#include <PhaseFieldFractureMechanicsOffDiag.h>

Inheritance diagram for PhaseFieldFractureMechanicsOffDiag:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 PhaseFieldFractureMechanicsOffDiag (const InputParameters &parameters)
 
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

Real computeQpResidual () override
 
Real computeQpJacobian () override
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar) override
 

Protected Attributes

const std::string _base_name
 Base name of the material system that this kernel applies to. More...
 
const unsigned int _component
 An integer corresponding to the direction this kernel acts in. More...
 
const bool _c_coupled
 
const unsigned int _c_var
 
const MaterialProperty< RankTwoTensor > & _d_stress_dc
 

Detailed Description

This class computes the off-diagonal Jacobian component of stress divergence residual system Contribution from damage order parameter c Useful if user wants to add the off diagonal Jacobian term.

Definition at line 22 of file PhaseFieldFractureMechanicsOffDiag.h.

Constructor & Destructor Documentation

◆ PhaseFieldFractureMechanicsOffDiag()

PhaseFieldFractureMechanicsOffDiag::PhaseFieldFractureMechanicsOffDiag ( const InputParameters parameters)

Definition at line 32 of file PhaseFieldFractureMechanicsOffDiag.C.

35  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
36  _component(getParam<unsigned int>("component")),
37  _c_coupled(isCoupled("c")),
38  _c_var(_c_coupled ? coupled("c") : 0),
40  getMaterialPropertyDerivative<RankTwoTensor>(_base_name + "stress", coupledName("c", 0)))
41 {
42 }
const MaterialProperty< RankTwoTensor > & _d_stress_dc
const unsigned int _component
An integer corresponding to the direction this kernel acts in.
const std::string _base_name
Base name of the material system that this kernel applies to.

Member Function Documentation

◆ computeQpJacobian()

Real PhaseFieldFractureMechanicsOffDiag::computeQpJacobian ( )
inlineoverrideprotected

Definition at line 32 of file PhaseFieldFractureMechanicsOffDiag.h.

32 { return 0.0; }

◆ computeQpOffDiagJacobian()

Real PhaseFieldFractureMechanicsOffDiag::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 45 of file PhaseFieldFractureMechanicsOffDiag.C.

46 {
47  if (_c_coupled && jvar == _c_var)
48  {
49  Real val = 0.0;
50  for (unsigned int k = 0; k < 3; ++k)
51  val += _d_stress_dc[_qp](_component, k) * _grad_test[_i][_qp](k);
52  return val * _phi[_j][_qp];
53  }
54 
55  // Returns if coupled variable is not c (damage variable)
56  return 0.0;
57 }
const MaterialProperty< RankTwoTensor > & _d_stress_dc
const unsigned int _component
An integer corresponding to the direction this kernel acts in.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string k
Definition: NS.h:130

◆ computeQpResidual()

Real PhaseFieldFractureMechanicsOffDiag::computeQpResidual ( )
inlineoverrideprotected

Definition at line 30 of file PhaseFieldFractureMechanicsOffDiag.h.

30 { return 0.0; }

◆ validParams()

InputParameters PhaseFieldFractureMechanicsOffDiag::validParams ( )
static

Definition at line 15 of file PhaseFieldFractureMechanicsOffDiag.C.

16 {
18  params.addClassDescription("Stress divergence kernel for phase-field fracture: Computes off "
19  "diagonal damage dependent Jacobian components. To be used with "
20  "StressDivergenceTensors or DynamicStressDivergenceTensors.");
21  params.addParam<std::string>("base_name", "Material property base name");
22  params.addRequiredParam<unsigned int>("component",
23  "An integer corresponding to the direction "
24  "the variable this kernel acts in. (0 for x, "
25  "1 for y, 2 for z)");
26  params.addCoupledVar(
27  "c",
28  "Phase field damage variable: Used to indicate calculation of Off Diagonal Jacobian term");
29  return params;
30 }
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _base_name

const std::string PhaseFieldFractureMechanicsOffDiag::_base_name
protected

Base name of the material system that this kernel applies to.

Definition at line 37 of file PhaseFieldFractureMechanicsOffDiag.h.

◆ _c_coupled

const bool PhaseFieldFractureMechanicsOffDiag::_c_coupled
protected

Definition at line 42 of file PhaseFieldFractureMechanicsOffDiag.h.

Referenced by computeQpOffDiagJacobian().

◆ _c_var

const unsigned int PhaseFieldFractureMechanicsOffDiag::_c_var
protected

Definition at line 43 of file PhaseFieldFractureMechanicsOffDiag.h.

Referenced by computeQpOffDiagJacobian().

◆ _component

const unsigned int PhaseFieldFractureMechanicsOffDiag::_component
protected

An integer corresponding to the direction this kernel acts in.

Definition at line 40 of file PhaseFieldFractureMechanicsOffDiag.h.

Referenced by computeQpOffDiagJacobian().

◆ _d_stress_dc

const MaterialProperty<RankTwoTensor>& PhaseFieldFractureMechanicsOffDiag::_d_stress_dc
protected

Definition at line 44 of file PhaseFieldFractureMechanicsOffDiag.h.

Referenced by computeQpOffDiagJacobian().


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