www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected 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 Member Functions

 AllenCahnElasticEnergyOffDiag (const InputParameters &parameters)
 

Protected Member Functions

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

Protected Attributes

const MaterialProperty< Real > & _L
 Mobility. More...
 
const MaterialProperty< RankTwoTensor > & _d2Fdcdstrain
 Free energy material properties and derivatives. More...
 
const unsigned int _ndisp
 Displacement variables used for off-diagonal Jacobian. More...
 
std::vector< unsigned int > _disp_var
 

Detailed Description

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

Definition at line 28 of file AllenCahnElasticEnergyOffDiag.h.

Constructor & Destructor Documentation

◆ AllenCahnElasticEnergyOffDiag()

AllenCahnElasticEnergyOffDiag::AllenCahnElasticEnergyOffDiag ( const InputParameters &  parameters)

Definition at line 31 of file AllenCahnElasticEnergyOffDiag.C.

32  : DerivativeMaterialInterface<JvarMapKernelInterface<Kernel>>(parameters),
33  _L(getMaterialProperty<Real>("mob_name")),
34  _ndisp(coupledComponents("displacements")),
36  _d2Fdcdstrain(getMaterialProperty<RankTwoTensor>("d2Fdcdstrain"))
37 {
38  for (unsigned int i = 0; i < _ndisp; ++i)
39  _disp_var[i] = coupled("displacements", i);
40 }
const MaterialProperty< RankTwoTensor > & _d2Fdcdstrain
Free energy material properties and derivatives.
const unsigned int _ndisp
Displacement variables used for off-diagonal Jacobian.
const MaterialProperty< Real > & _L
Mobility.

Member Function Documentation

◆ computeQpOffDiagJacobian()

Real AllenCahnElasticEnergyOffDiag::computeQpOffDiagJacobian ( unsigned int  jvar)
overrideprotectedvirtual

Definition at line 43 of file AllenCahnElasticEnergyOffDiag.C.

44 {
45  for (unsigned int c_comp = 0; c_comp < _ndisp; ++c_comp)
46  if (jvar == _disp_var[c_comp])
47  {
48  const Real dxddFdc = _L[_qp] * _test[_i][_qp];
49  const Real d2Fdcdstrain_comp =
50  (_d2Fdcdstrain[_qp].column(c_comp) + _d2Fdcdstrain[_qp].row(c_comp)) / 2.0 *
51  _grad_phi[_j][_qp];
52  return dxddFdc * d2Fdcdstrain_comp;
53  }
54 
55  return 0.0;
56 }
const MaterialProperty< RankTwoTensor > & _d2Fdcdstrain
Free energy material properties and derivatives.
const unsigned int _ndisp
Displacement variables used for off-diagonal Jacobian.
const MaterialProperty< Real > & _L
Mobility.

◆ computeQpResidual()

Real AllenCahnElasticEnergyOffDiag::computeQpResidual ( )
inlineoverrideprotected

Definition at line 35 of file AllenCahnElasticEnergyOffDiag.h.

35 { return 0.0; }

Member Data Documentation

◆ _d2Fdcdstrain

const MaterialProperty<RankTwoTensor>& AllenCahnElasticEnergyOffDiag::_d2Fdcdstrain
protected

Free energy material properties and derivatives.

Definition at line 48 of file AllenCahnElasticEnergyOffDiag.h.

Referenced by computeQpOffDiagJacobian().

◆ _disp_var

std::vector<unsigned int> AllenCahnElasticEnergyOffDiag::_disp_var
protected

◆ _L

const MaterialProperty<Real>& AllenCahnElasticEnergyOffDiag::_L
protected

Mobility.

Definition at line 40 of file AllenCahnElasticEnergyOffDiag.h.

Referenced by computeQpOffDiagJacobian().

◆ _ndisp

const unsigned int AllenCahnElasticEnergyOffDiag::_ndisp
protected

Displacement variables used for off-diagonal Jacobian.

Definition at line 43 of file AllenCahnElasticEnergyOffDiag.h.

Referenced by AllenCahnElasticEnergyOffDiag(), and computeQpOffDiagJacobian().


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