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

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

#include <ACInterfaceKobayashi1.h>

Inheritance diagram for ACInterfaceKobayashi1:
[legend]

Public Member Functions

 ACInterfaceKobayashi1 (const InputParameters &parameters)
 

Protected Member Functions

virtual RealGradient precomputeQpResidual ()
 Enum of computeDFDOP inputs. More...
 
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
 
const MaterialProperty< Real > & _deps
 
const MaterialProperty< RealGradient > & _depsdgrad_op
 
const MaterialProperty< RealGradient > & _ddepsdgrad_op
 
std::vector< const MaterialProperty< Real > * > _dLdarg
 Mobility derivative w.r.t. other coupled variables. More...
 
std::vector< const MaterialProperty< Real > * > _depsdarg
 
std::vector< const MaterialProperty< Real > * > _ddepsdarg
 

Detailed Description

Kernel 1 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 first two terms on the right side of eq. (3) of the paper.

Definition at line 28 of file ACInterfaceKobayashi1.h.

Constructor & Destructor Documentation

◆ ACInterfaceKobayashi1()

ACInterfaceKobayashi1::ACInterfaceKobayashi1 ( const InputParameters &  parameters)

Definition at line 36 of file ACInterfaceKobayashi1.C.

37  : DerivativeMaterialInterface<JvarMapKernelInterface<KernelGrad>>(parameters),
38  _L(getMaterialProperty<Real>("mob_name")),
39  _dLdop(getMaterialPropertyDerivative<Real>("mob_name", _var.name())),
40  _eps(getMaterialProperty<Real>("eps_name")),
41  _deps(getMaterialProperty<Real>("deps_name")),
42  _depsdgrad_op(getMaterialProperty<RealGradient>("depsdgrad_op_name")),
43  _ddepsdgrad_op(getMaterialProperty<RealGradient>("ddepsdgrad_op_name"))
44 {
45  // Get number of coupled variables
46  unsigned int nvar = _coupled_moose_vars.size();
47 
48  // reserve space for derivatives
49  _dLdarg.resize(nvar);
50  _depsdarg.resize(nvar);
51  _ddepsdarg.resize(nvar);
52 
53  // Iterate over all coupled variables
54  for (unsigned int i = 0; i < nvar; ++i)
55  {
56  const VariableName iname = _coupled_moose_vars[i]->name();
57  _dLdarg[i] = &getMaterialPropertyDerivative<Real>("mob_name", iname);
58  _depsdarg[i] = &getMaterialPropertyDerivative<Real>("eps_name", iname);
59  _ddepsdarg[i] = &getMaterialPropertyDerivative<Real>("deps_name", iname);
60  }
61 }
const MaterialProperty< Real > & _dLdop
std::vector< const MaterialProperty< Real > * > _depsdarg
const MaterialProperty< RealGradient > & _ddepsdgrad_op
const MaterialProperty< Real > & _eps
std::vector< const MaterialProperty< Real > * > _dLdarg
Mobility derivative w.r.t. other coupled variables.
const MaterialProperty< Real > & _deps
const MaterialProperty< Real > & _L
Mobility.
const MaterialProperty< RealGradient > & _depsdgrad_op
std::vector< const MaterialProperty< Real > * > _ddepsdarg

Member Function Documentation

◆ computeQpOffDiagJacobian()

Real ACInterfaceKobayashi1::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 96 of file ACInterfaceKobayashi1.C.

97 {
98  // get the coupled variable jvar is referring to
99  const unsigned int cvar = mapJvarToCvar(jvar);
100 
101  // Set modified gradient vector
102  const RealGradient v(-_grad_u[_qp](1), _grad_u[_qp](0), 0);
103 
104  // Set off-diagonal jaocbian terms from mobility dependence
105  Real dsum =
106  _L[_qp] * (_deps[_qp] * (*_depsdarg[cvar])[_qp] * _phi[_j][_qp] * v * _grad_test[_i][_qp]);
107  dsum +=
108  _L[_qp] * (_eps[_qp] * (*_ddepsdarg[cvar])[_qp] * _phi[_j][_qp] * v * _grad_test[_i][_qp]);
109  dsum += (*_dLdarg[cvar])[_qp] * _phi[_j][_qp] * _eps[_qp] * _deps[_qp] * v * _grad_test[_i][_qp];
110 
111  return dsum;
112 }
std::vector< const MaterialProperty< Real > * > _depsdarg
const MaterialProperty< Real > & _eps
std::vector< const MaterialProperty< Real > * > _dLdarg
Mobility derivative w.r.t. other coupled variables.
const MaterialProperty< Real > & _deps
const MaterialProperty< Real > & _L
Mobility.
std::vector< const MaterialProperty< Real > * > _ddepsdarg

◆ precomputeQpJacobian()

RealGradient ACInterfaceKobayashi1::precomputeQpJacobian ( )
protectedvirtual

Definition at line 74 of file ACInterfaceKobayashi1.C.

75 {
76  // Set modified gradient vector
77  const RealGradient v(-_grad_u[_qp](1), _grad_u[_qp](0), 0);
78 
79  // dvdgrad_op*_grad_phi
80  const RealGradient dv(-_grad_phi[_j][_qp](1), _grad_phi[_j][_qp](0), 0);
81 
82  // Derivative of epsilon wrt nodal op values
83  Real depsdop_i = _depsdgrad_op[_qp] * _grad_phi[_j][_qp];
84  Real ddepsdop_i = _ddepsdgrad_op[_qp] * _grad_phi[_j][_qp];
85  ;
86 
87  // Set the Jacobian
88  RealGradient jac1 = _eps[_qp] * _deps[_qp] * dv;
89  RealGradient jac2 = _deps[_qp] * depsdop_i * v;
90  RealGradient jac3 = _eps[_qp] * ddepsdop_i * v;
91 
92  return _L[_qp] * (jac1 + jac2 + jac3);
93 }
const MaterialProperty< RealGradient > & _ddepsdgrad_op
const MaterialProperty< Real > & _eps
const MaterialProperty< Real > & _deps
const MaterialProperty< Real > & _L
Mobility.
const MaterialProperty< RealGradient > & _depsdgrad_op

◆ precomputeQpResidual()

RealGradient ACInterfaceKobayashi1::precomputeQpResidual ( )
protectedvirtual

Enum of computeDFDOP inputs.

Definition at line 64 of file ACInterfaceKobayashi1.C.

65 {
66  // Set modified gradient vector
67  const RealGradient v(-_grad_u[_qp](1), _grad_u[_qp](0), 0);
68 
69  // Define anisotropic interface residual
70  return _eps[_qp] * _deps[_qp] * _L[_qp] * v;
71 }
const MaterialProperty< Real > & _eps
const MaterialProperty< Real > & _deps
const MaterialProperty< Real > & _L
Mobility.

Member Data Documentation

◆ _ddepsdarg

std::vector<const MaterialProperty<Real> *> ACInterfaceKobayashi1::_ddepsdarg
protected

Definition at line 50 of file ACInterfaceKobayashi1.h.

Referenced by ACInterfaceKobayashi1(), and computeQpOffDiagJacobian().

◆ _ddepsdgrad_op

const MaterialProperty<RealGradient>& ACInterfaceKobayashi1::_ddepsdgrad_op
protected

Definition at line 45 of file ACInterfaceKobayashi1.h.

Referenced by precomputeQpJacobian().

◆ _deps

const MaterialProperty<Real>& ACInterfaceKobayashi1::_deps
protected

◆ _depsdarg

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

Definition at line 49 of file ACInterfaceKobayashi1.h.

Referenced by ACInterfaceKobayashi1(), and computeQpOffDiagJacobian().

◆ _depsdgrad_op

const MaterialProperty<RealGradient>& ACInterfaceKobayashi1::_depsdgrad_op
protected

Definition at line 44 of file ACInterfaceKobayashi1.h.

Referenced by precomputeQpJacobian().

◆ _dLdarg

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

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

Definition at line 48 of file ACInterfaceKobayashi1.h.

Referenced by ACInterfaceKobayashi1(), and computeQpOffDiagJacobian().

◆ _dLdop

const MaterialProperty<Real>& ACInterfaceKobayashi1::_dLdop
protected

Definition at line 41 of file ACInterfaceKobayashi1.h.

◆ _eps

const MaterialProperty<Real>& ACInterfaceKobayashi1::_eps
protected

◆ _L

const MaterialProperty<Real>& ACInterfaceKobayashi1::_L
protected

Mobility.

Definition at line 40 of file ACInterfaceKobayashi1.h.

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


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