www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
ACGrGrElasticDrivingForce Class Referenceabstract

Calculates the porton of the Allen-Cahn equation that results from the deformation energy. More...

#include <ACGrGrElasticDrivingForce.h>

Inheritance diagram for ACGrGrElasticDrivingForce:
[legend]

Public Member Functions

 ACGrGrElasticDrivingForce (const InputParameters &parameters)
 
virtual void initialSetup ()
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Types

enum  PFFunctionType
 

Protected Member Functions

virtual Real computeDFDOP (PFFunctionType type)
 
virtual Real precomputeQpResidual ()
 
virtual Real precomputeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 
virtual Real computeDFDOP (PFFunctionType type)=0
 

Protected Attributes

const MaterialProperty< Real > & _L
 Mobility. More...
 
const MaterialProperty< Real > & _dLdop
 Mobility derivative w.r.t. order parameter. More...
 
std::vector< const MaterialProperty< Real > *> _dLdarg
 Mobility derivative w.r.t coupled variables. More...
 

Private Attributes

const MaterialProperty< RankFourTensor > & _D_elastic_tensor
 
const MaterialProperty< RankTwoTensor > & _elastic_strain
 

Detailed Description

Calculates the porton of the Allen-Cahn equation that results from the deformation energy.

Must access the elastic_strain stored as a material property Requires the name of the elastic tensor derivative as an input.

Definition at line 28 of file ACGrGrElasticDrivingForce.h.

Member Enumeration Documentation

◆ PFFunctionType

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 38 of file ACBulk.h.

Constructor & Destructor Documentation

◆ ACGrGrElasticDrivingForce()

ACGrGrElasticDrivingForce::ACGrGrElasticDrivingForce ( const InputParameters &  parameters)

Definition at line 29 of file ACGrGrElasticDrivingForce.C.

30  : ACBulk<Real>(parameters),
31  _D_elastic_tensor(getMaterialProperty<RankFourTensor>("D_tensor_name")),
32  _elastic_strain(getMaterialPropertyByName<RankTwoTensor>("elastic_strain"))
33 {
34 }
const MaterialProperty< RankFourTensor > & _D_elastic_tensor
const MaterialProperty< RankTwoTensor > & _elastic_strain

Member Function Documentation

◆ computeDFDOP() [1/2]

Real ACGrGrElasticDrivingForce::computeDFDOP ( PFFunctionType  type)
protectedvirtual

Definition at line 37 of file ACGrGrElasticDrivingForce.C.

38 {
39  // Access the heterogeneous strain calculated by the Solid Mechanics kernels
40  RankTwoTensor strain(_elastic_strain[_qp]);
41 
42  // Compute the partial derivative of the stress wrt the order parameter
43  RankTwoTensor D_stress = _D_elastic_tensor[_qp] * strain;
44 
45  switch (type)
46  {
47  case Residual:
48  return 0.5 *
49  D_stress.doubleContraction(strain); // Compute the deformation energy driving force
50 
51  case Jacobian:
52  return 0.0;
53  }
54 
55  mooseError("Invalid type passed in");
56 }
const MaterialProperty< RankFourTensor > & _D_elastic_tensor
const MaterialProperty< RankTwoTensor > & _elastic_strain

◆ computeDFDOP() [2/2]

virtual Real ACBulk< Real >::computeDFDOP ( PFFunctionType  type)
protectedpure virtualinherited

◆ computeQpOffDiagJacobian()

Real ACBulk< Real >::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtualinherited

Reimplemented in CoupledAllenCahn, AllenCahn, KKSACBulkC, KKSACBulkF, KKSMultiACBulkC, KKSMultiACBulkF, ACGrGrMulti, ACGrGrPoly, ACBarrierFunction, and ACGBPoly.

Definition at line 117 of file ACBulk.h.

118 {
119  // Get the coupled variable jvar is referring to
120  const unsigned int cvar = mapJvarToCvar(jvar);
121 
122  // Set off-diagonal Jacobian term from mobility derivatives
123  return (*_dLdarg[cvar])[_qp] * _phi[_j][_qp] * computeDFDOP(Residual) * _test[_i][_qp];
124 }
virtual Real computeDFDOP(PFFunctionType type)=0
std::vector< const MaterialProperty< Real > *> _dLdarg
Mobility derivative w.r.t coupled variables.
Definition: ACBulk.h:53

◆ initialSetup()

void ACBulk< Real >::initialSetup ( )
virtualinherited

Reimplemented in KKSMultiACBulkBase, CoupledAllenCahn, KKSACBulkBase, and AllenCahn.

Definition at line 86 of file ACBulk.h.

87 {
88  validateNonlinearCoupling<Real>("mob_name");
89 }

◆ precomputeQpJacobian()

Real ACBulk< Real >::precomputeQpJacobian ( )
protectedvirtualinherited

Definition at line 104 of file ACBulk.h.

105 {
106  // Get free energy derivative and Jacobian
107  Real dFdop = computeDFDOP(Residual);
108 
109  Real JdFdop = computeDFDOP(Jacobian);
110 
111  // Set Jacobian value using product rule
112  return _L[_qp] * JdFdop + _dLdop[_qp] * _phi[_j][_qp] * dFdop;
113 }
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:47
virtual Real computeDFDOP(PFFunctionType type)=0
const MaterialProperty< Real > & _dLdop
Mobility derivative w.r.t. order parameter.
Definition: ACBulk.h:50

◆ precomputeQpResidual()

Real ACBulk< Real >::precomputeQpResidual ( )
protectedvirtualinherited

Definition at line 93 of file ACBulk.h.

94 {
95  // Get free energy derivative from function
96  Real dFdop = computeDFDOP(Residual);
97 
98  // Set residual
99  return _L[_qp] * dFdop;
100 }
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:47
virtual Real computeDFDOP(PFFunctionType type)=0

◆ validParams()

InputParameters ACBulk< Real >::validParams ( )
staticinherited

Definition at line 75 of file ACBulk.h.

76 {
77  InputParameters params = ::validParams<KernelValue>();
78  params.addClassDescription("Allen-Cahn base Kernel");
79  params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
80  params.addCoupledVar("args", "Vector of arguments of the mobility");
81  return params;
82 }

Member Data Documentation

◆ _D_elastic_tensor

const MaterialProperty<RankFourTensor>& ACGrGrElasticDrivingForce::_D_elastic_tensor
private

Definition at line 37 of file ACGrGrElasticDrivingForce.h.

Referenced by computeDFDOP().

◆ _dLdarg

std::vector<const MaterialProperty<Real > *> ACBulk< Real >::_dLdarg
protectedinherited

Mobility derivative w.r.t coupled variables.

Definition at line 53 of file ACBulk.h.

◆ _dLdop

const MaterialProperty<Real >& ACBulk< Real >::_dLdop
protectedinherited

Mobility derivative w.r.t. order parameter.

Definition at line 50 of file ACBulk.h.

◆ _elastic_strain

const MaterialProperty<RankTwoTensor>& ACGrGrElasticDrivingForce::_elastic_strain
private

Definition at line 38 of file ACGrGrElasticDrivingForce.h.

Referenced by computeDFDOP().

◆ _L

const MaterialProperty<Real >& ACBulk< Real >::_L
protectedinherited

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