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 25 of file ACInterfaceKobayashi2.h.

Constructor & Destructor Documentation

ACInterfaceKobayashi2::ACInterfaceKobayashi2 ( const InputParameters &  parameters)

Definition at line 25 of file ACInterfaceKobayashi2.C.

26  : DerivativeMaterialInterface<JvarMapKernelInterface<KernelGrad>>(parameters),
27  _L(getMaterialProperty<Real>("mob_name")),
28  _dLdop(getMaterialPropertyDerivative<Real>("mob_name", _var.name())),
29  _eps(getMaterialProperty<Real>("eps_name")),
30  _depsdgrad_op(getMaterialProperty<RealGradient>("depsdgrad_op_name"))
31 {
32  // Get number of coupled variables
33  unsigned int nvar = _coupled_moose_vars.size();
34 
35  // reserve space for derivatives
36  _dLdarg.resize(nvar);
37  _depsdarg.resize(nvar);
38 
39  // Iterate over all coupled variables
40  for (unsigned int i = 0; i < nvar; ++i)
41  {
42  const VariableName iname = _coupled_moose_vars[i]->name();
43  _dLdarg[i] = &getMaterialPropertyDerivative<Real>("mob_name", iname);
44  _depsdarg[i] = &getMaterialPropertyDerivative<Real>("eps_name", iname);
45  }
46 }
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

Real ACInterfaceKobayashi2::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 67 of file ACInterfaceKobayashi2.C.

68 {
69  // get the coupled variable jvar is referring to
70  const unsigned int cvar = mapJvarToCvar(jvar);
71 
72  // Set off-diagonal jaocbian terms from mobility and epsilon dependence
73  Real dsum = _L[_qp] * 2.0 * _eps[_qp] * (*_depsdarg[cvar])[_qp] * _phi[_j][_qp] * _grad_u[_qp] *
74  _grad_test[_i][_qp];
75  dsum += _eps[_qp] * _eps[_qp] * (*_dLdarg[cvar])[_qp] * _phi[_j][_qp] * _grad_u[_qp] *
76  _grad_test[_i][_qp];
77 
78  return dsum;
79 }
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.
RealGradient ACInterfaceKobayashi2::precomputeQpJacobian ( )
protectedvirtual

Definition at line 56 of file ACInterfaceKobayashi2.C.

57 {
58  // Calculate depsdop_i
59  Real depsdop_i = _depsdgrad_op[_qp] * _grad_phi[_j][_qp];
60 
61  // Set Jacobian using product rule
62  return _L[_qp] *
63  (_eps[_qp] * _eps[_qp] * _grad_phi[_j][_qp] + 2.0 * _eps[_qp] * depsdop_i * _grad_u[_qp]);
64 }
const MaterialProperty< RealGradient > & _depsdgrad_op
const MaterialProperty< Real > & _L
Mobility.
const MaterialProperty< Real > & _eps
Interfacial parameter.
RealGradient ACInterfaceKobayashi2::precomputeQpResidual ( )
protectedvirtual

Definition at line 49 of file ACInterfaceKobayashi2.C.

50 {
51  // Set interfacial part of residual
52  return _eps[_qp] * _eps[_qp] * _L[_qp] * _grad_u[_qp];
53 }
const MaterialProperty< Real > & _L
Mobility.
const MaterialProperty< Real > & _eps
Interfacial parameter.

Member Data Documentation

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

Definition at line 45 of file ACInterfaceKobayashi2.h.

Referenced by ACInterfaceKobayashi2(), and computeQpOffDiagJacobian().

const MaterialProperty<RealGradient>& ACInterfaceKobayashi2::_depsdgrad_op
protected

Definition at line 41 of file ACInterfaceKobayashi2.h.

Referenced by precomputeQpJacobian().

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

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

Definition at line 44 of file ACInterfaceKobayashi2.h.

Referenced by ACInterfaceKobayashi2(), and computeQpOffDiagJacobian().

const MaterialProperty<Real>& ACInterfaceKobayashi2::_dLdop
protected

Definition at line 37 of file ACInterfaceKobayashi2.h.

const MaterialProperty<Real>& ACInterfaceKobayashi2::_eps
protected

Interfacial parameter.

Definition at line 40 of file ACInterfaceKobayashi2.h.

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

const MaterialProperty<Real>& ACInterfaceKobayashi2::_L
protected

Mobility.

Definition at line 36 of file ACInterfaceKobayashi2.h.

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


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