www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ACInterfaceKobayashi2 Class Reference

Kernel 2 of 2 for interfacial energy anisotropy in the Allen-Cahn equation as implemented in R. More...

#include <ACInterfaceKobayashi2.h>

Inheritance diagram for ACInterfaceKobayashi2:
[legend]

Public Member Functions

 ACInterfaceKobayashi2 (const InputParameters &parameters)
 

Protected Member Functions

virtual RealGradient precomputeQpResidual ()
 
virtual RealGradient precomputeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned int jvar)
 

Protected Attributes

const MaterialProperty< Real > & _L
 Mobility. More...
 
const MaterialProperty< Real > & _dLdop
 
const MaterialProperty< Real > & _eps
 Interfacial parameter. More...
 
const MaterialProperty< RealGradient > & _depsdgrad_op
 
std::vector< const MaterialProperty< Real > * > _dLdarg
 Mobility derivative w.r.t. other coupled variables. More...
 
std::vector< const MaterialProperty< Real > * > _depsdarg
 

Detailed Description

Kernel 2 of 2 for interfacial energy anisotropy in the Allen-Cahn equation as implemented in R.

Kobayashi, Physica D, 63, 410-423 (1993). doi:10.1016/0167-2789(93)90120-P This kernel implements the third term on the right side of eq. (3) of the paper.

Definition at line 28 of file ACInterfaceKobayashi2.h.

Constructor & Destructor Documentation

◆ ACInterfaceKobayashi2()

ACInterfaceKobayashi2::ACInterfaceKobayashi2 ( const InputParameters &  parameters)

Definition at line 30 of file ACInterfaceKobayashi2.C.

31  : DerivativeMaterialInterface<JvarMapKernelInterface<KernelGrad>>(parameters),
32  _L(getMaterialProperty<Real>("mob_name")),
33  _dLdop(getMaterialPropertyDerivative<Real>("mob_name", _var.name())),
34  _eps(getMaterialProperty<Real>("eps_name")),
35  _depsdgrad_op(getMaterialProperty<RealGradient>("depsdgrad_op_name"))
36 {
37  // Get number of coupled variables
38  unsigned int nvar = _coupled_moose_vars.size();
39 
40  // reserve space for derivatives
41  _dLdarg.resize(nvar);
42  _depsdarg.resize(nvar);
43 
44  // Iterate over all coupled variables
45  for (unsigned int i = 0; i < nvar; ++i)
46  {
47  const VariableName iname = _coupled_moose_vars[i]->name();
48  _dLdarg[i] = &getMaterialPropertyDerivative<Real>("mob_name", iname);
49  _depsdarg[i] = &getMaterialPropertyDerivative<Real>("eps_name", iname);
50  }
51 }
const MaterialProperty< RealGradient > & _depsdgrad_op
const MaterialProperty< Real > & _L
Mobility.
const MaterialProperty< Real > & _eps
Interfacial parameter.
const MaterialProperty< Real > & _dLdop
std::vector< const MaterialProperty< Real > * > _depsdarg
std::vector< const MaterialProperty< Real > * > _dLdarg
Mobility derivative w.r.t. other coupled variables.

Member Function Documentation

◆ computeQpOffDiagJacobian()

Real ACInterfaceKobayashi2::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 72 of file ACInterfaceKobayashi2.C.

73 {
74  // get the coupled variable jvar is referring to
75  const unsigned int cvar = mapJvarToCvar(jvar);
76 
77  // Set off-diagonal jaocbian terms from mobility and epsilon dependence
78  Real dsum = _L[_qp] * 2.0 * _eps[_qp] * (*_depsdarg[cvar])[_qp] * _phi[_j][_qp] * _grad_u[_qp] *
79  _grad_test[_i][_qp];
80  dsum += _eps[_qp] * _eps[_qp] * (*_dLdarg[cvar])[_qp] * _phi[_j][_qp] * _grad_u[_qp] *
81  _grad_test[_i][_qp];
82 
83  return dsum;
84 }
const MaterialProperty< Real > & _L
Mobility.
const MaterialProperty< Real > & _eps
Interfacial parameter.
std::vector< const MaterialProperty< Real > * > _depsdarg
std::vector< const MaterialProperty< Real > * > _dLdarg
Mobility derivative w.r.t. other coupled variables.

◆ precomputeQpJacobian()

RealGradient ACInterfaceKobayashi2::precomputeQpJacobian ( )
protectedvirtual

Definition at line 61 of file ACInterfaceKobayashi2.C.

62 {
63  // Calculate depsdop_i
64  Real depsdop_i = _depsdgrad_op[_qp] * _grad_phi[_j][_qp];
65 
66  // Set Jacobian using product rule
67  return _L[_qp] *
68  (_eps[_qp] * _eps[_qp] * _grad_phi[_j][_qp] + 2.0 * _eps[_qp] * depsdop_i * _grad_u[_qp]);
69 }
const MaterialProperty< RealGradient > & _depsdgrad_op
const MaterialProperty< Real > & _L
Mobility.
const MaterialProperty< Real > & _eps
Interfacial parameter.

◆ precomputeQpResidual()

RealGradient ACInterfaceKobayashi2::precomputeQpResidual ( )
protectedvirtual

Definition at line 54 of file ACInterfaceKobayashi2.C.

55 {
56  // Set interfacial part of residual
57  return _eps[_qp] * _eps[_qp] * _L[_qp] * _grad_u[_qp];
58 }
const MaterialProperty< Real > & _L
Mobility.
const MaterialProperty< Real > & _eps
Interfacial parameter.

Member Data Documentation

◆ _depsdarg

std::vector<const MaterialProperty<Real> *> ACInterfaceKobayashi2::_depsdarg
protected

Definition at line 48 of file ACInterfaceKobayashi2.h.

Referenced by ACInterfaceKobayashi2(), and computeQpOffDiagJacobian().

◆ _depsdgrad_op

const MaterialProperty<RealGradient>& ACInterfaceKobayashi2::_depsdgrad_op
protected

Definition at line 44 of file ACInterfaceKobayashi2.h.

Referenced by precomputeQpJacobian().

◆ _dLdarg

std::vector<const MaterialProperty<Real> *> ACInterfaceKobayashi2::_dLdarg
protected

Mobility derivative w.r.t. other coupled variables.

Definition at line 47 of file ACInterfaceKobayashi2.h.

Referenced by ACInterfaceKobayashi2(), and computeQpOffDiagJacobian().

◆ _dLdop

const MaterialProperty<Real>& ACInterfaceKobayashi2::_dLdop
protected

Definition at line 40 of file ACInterfaceKobayashi2.h.

◆ _eps

const MaterialProperty<Real>& ACInterfaceKobayashi2::_eps
protected

Interfacial parameter.

Definition at line 43 of file ACInterfaceKobayashi2.h.

Referenced by computeQpOffDiagJacobian(), precomputeQpJacobian(), and precomputeQpResidual().

◆ _L

const MaterialProperty<Real>& ACInterfaceKobayashi2::_L
protected

Mobility.

Definition at line 39 of file ACInterfaceKobayashi2.h.

Referenced by computeQpOffDiagJacobian(), precomputeQpJacobian(), and precomputeQpResidual().


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