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 31 of file ACGrGrElasticDrivingForce.h.

Member Enumeration Documentation

◆ PFFunctionType

enum ACBulk::PFFunctionType
protectedinherited

Definition at line 37 of file ACBulk.h.

38  {
39  Jacobian,
40  Residual
41  };

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 }

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 }

◆ 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 116 of file ACBulk.h.

117 {
118  // Get the coupled variable jvar is referring to
119  const unsigned int cvar = mapJvarToCvar(jvar);
120 
121  // Set off-diagonal Jacobian term from mobility derivatives
122  return (*_dLdarg[cvar])[_qp] * _phi[_j][_qp] * computeDFDOP(Residual) * _test[_i][_qp];
123 }

◆ initialSetup()

void ACBulk< Real >::initialSetup ( )
virtualinherited

Reimplemented in KKSMultiACBulkBase, CoupledAllenCahn, KKSACBulkBase, and AllenCahn.

Definition at line 85 of file ACBulk.h.

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

◆ precomputeQpJacobian()

Real ACBulk< Real >::precomputeQpJacobian ( )
protectedvirtualinherited

Definition at line 103 of file ACBulk.h.

104 {
105  // Get free energy derivative and Jacobian
106  Real dFdop = computeDFDOP(Residual);
107 
108  Real JdFdop = computeDFDOP(Jacobian);
109 
110  // Set Jacobian value using product rule
111  return _L[_qp] * JdFdop + _dLdop[_qp] * _phi[_j][_qp] * dFdop;
112 }

◆ precomputeQpResidual()

Real ACBulk< Real >::precomputeQpResidual ( )
protectedvirtualinherited

Definition at line 92 of file ACBulk.h.

93 {
94  // Get free energy derivative from function
95  Real dFdop = computeDFDOP(Residual);
96 
97  // Set residual
98  return _L[_qp] * dFdop;
99 }

◆ validParams()

InputParameters ACBulk< Real >::validParams ( )
staticinherited

Definition at line 74 of file ACBulk.h.

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

Member Data Documentation

◆ _D_elastic_tensor

const MaterialProperty<RankFourTensor>& ACGrGrElasticDrivingForce::_D_elastic_tensor
private

Definition at line 40 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 52 of file ACBulk.h.

◆ _dLdop

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

Mobility derivative w.r.t. order parameter.

Definition at line 49 of file ACBulk.h.

◆ _elastic_strain

const MaterialProperty<RankTwoTensor>& ACGrGrElasticDrivingForce::_elastic_strain
private

Definition at line 41 of file ACGrGrElasticDrivingForce.h.

Referenced by computeDFDOP().

◆ _L

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

Mobility.

Definition at line 46 of file ACBulk.h.


The documentation for this class was generated from the following files:
ACBulk< Real >::Residual
Definition: ACBulk.h:40
ACBulk< Real >
ACBulk< Real >::_dLdarg
std::vector< const MaterialProperty< Real > * > _dLdarg
Mobility derivative w.r.t coupled variables.
Definition: ACBulk.h:52
ACBulk< Real >::_dLdop
const MaterialProperty< Real > & _dLdop
Mobility derivative w.r.t. order parameter.
Definition: ACBulk.h:49
ACBulk< Real >::computeDFDOP
virtual Real computeDFDOP(PFFunctionType type)=0
ACBulk< Real >::Jacobian
Definition: ACBulk.h:39
ACGrGrElasticDrivingForce::_D_elastic_tensor
const MaterialProperty< RankFourTensor > & _D_elastic_tensor
Definition: ACGrGrElasticDrivingForce.h:40
RankTwoTensorTempl< Real >
ACGrGrElasticDrivingForce::_elastic_strain
const MaterialProperty< RankTwoTensor > & _elastic_strain
Definition: ACGrGrElasticDrivingForce.h:41
ACBulk< Real >::_L
const MaterialProperty< Real > & _L
Mobility.
Definition: ACBulk.h:46