https://mooseframework.inl.gov
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
AllenCahnElasticEnergyOffDiag Class Reference

This kernel computes the off-diagonal jacobian of elastic energy in AllenCahn respect to displacements. More...

#include <AllenCahnElasticEnergyOffDiag.h>

Inheritance diagram for AllenCahnElasticEnergyOffDiag:
[legend]

Public Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 AllenCahnElasticEnergyOffDiag (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
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar) override
 

Protected Attributes

const MaterialProperty< Real > & _L
 Mobility.
 
JvarMap _disp_map
 Displacement variables used for off-diagonal Jacobian.
 
const MaterialProperty< RankTwoTensor > & _d2Fdcdstrain
 Free energy material properties and derivatives.
 

Private Member Functions

bool haveMaterialProperty (const std::string &prop_name)
 
std::vector< VariableName > buildVariableVector (const VariableName &c1, const VariableName &c2, const VariableName &c3)
 
void validateCouplingHelper (const MaterialPropertyName &base, const std::vector< VariableName > &c, const System &system, std::vector< VariableName > &missing)
 
bool isNotObjectVariable (const VariableName &name)
 

Private Attributes

FEProblemBase_dmi_fe_problem
 

Detailed Description

This kernel computes the off-diagonal jacobian of elastic energy in AllenCahn respect to displacements.

Definition at line 21 of file AllenCahnElasticEnergyOffDiag.h.

Constructor & Destructor Documentation

◆ AllenCahnElasticEnergyOffDiag()

AllenCahnElasticEnergyOffDiag::AllenCahnElasticEnergyOffDiag ( const InputParameters parameters)

Definition at line 30 of file AllenCahnElasticEnergyOffDiag.C.

32 _L(getMaterialProperty<Real>("mob_name")),
33 _disp_map(getParameterJvarMap("displacements")),
34 _d2Fdcdstrain(getMaterialProperty<RankTwoTensor>("d2Fdcdstrain"))
35{
36}
JvarMap _disp_map
Displacement variables used for off-diagonal Jacobian.
const MaterialProperty< Real > & _L
Mobility.
const MaterialProperty< RankTwoTensor > & _d2Fdcdstrain
Free energy material properties and derivatives.

Member Function Documentation

◆ computeQpOffDiagJacobian()

Real AllenCahnElasticEnergyOffDiag::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 39 of file AllenCahnElasticEnergyOffDiag.C.

40{
41 auto dispvar = mapJvarToCvar(jvar, _disp_map);
42 if (dispvar >= 0)
43 {
44 const Real dxddFdc = _L[_qp] * _test[_i][_qp];
45 const Real d2Fdcdstrain_comp =
46 (_d2Fdcdstrain[_qp].column(dispvar) + _d2Fdcdstrain[_qp].row(dispvar)) / 2.0 *
47 _grad_phi[_j][_qp];
48 return dxddFdc * d2Fdcdstrain_comp;
49 }
50
51 return 0.0;
52}
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real

◆ computeQpResidual()

Real AllenCahnElasticEnergyOffDiag::computeQpResidual ( )
inlineoverrideprotected

Definition at line 30 of file AllenCahnElasticEnergyOffDiag.h.

30{ return 0.0; }

◆ validParams()

InputParameters AllenCahnElasticEnergyOffDiag::validParams ( )
static

Definition at line 17 of file AllenCahnElasticEnergyOffDiag.C.

18{
20 params.addClassDescription("This kernel calculates off-diagonal Jacobian of elastic energy in "
21 "AllenCahn with respect to displacements");
22 params.addCoupledVar("displacements",
23 "The vector of displacements suitable for the problem statement");
24 params.addParam<MaterialPropertyName>(
25 "F_name", "E_el", "Name of material property storing the elastic energy");
26 params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
27 return params;
28}
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
static InputParameters validParams()

Member Data Documentation

◆ _d2Fdcdstrain

const MaterialProperty<RankTwoTensor>& AllenCahnElasticEnergyOffDiag::_d2Fdcdstrain
protected

Free energy material properties and derivatives.

Definition at line 41 of file AllenCahnElasticEnergyOffDiag.h.

Referenced by computeQpOffDiagJacobian().

◆ _disp_map

JvarMap AllenCahnElasticEnergyOffDiag::_disp_map
protected

Displacement variables used for off-diagonal Jacobian.

Definition at line 38 of file AllenCahnElasticEnergyOffDiag.h.

Referenced by computeQpOffDiagJacobian().

◆ _L

const MaterialProperty<Real>& AllenCahnElasticEnergyOffDiag::_L
protected

Mobility.

Definition at line 35 of file AllenCahnElasticEnergyOffDiag.h.

Referenced by computeQpOffDiagJacobian().


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