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

Constructor & Destructor Documentation

ACInterfaceKobayashi1::ACInterfaceKobayashi1 ( const InputParameters &  parameters)

Definition at line 31 of file ACInterfaceKobayashi1.C.

32  : DerivativeMaterialInterface<JvarMapKernelInterface<KernelGrad>>(parameters),
33  _L(getMaterialProperty<Real>("mob_name")),
34  _dLdop(getMaterialPropertyDerivative<Real>("mob_name", _var.name())),
35  _eps(getMaterialProperty<Real>("eps_name")),
36  _deps(getMaterialProperty<Real>("deps_name")),
37  _depsdgrad_op(getMaterialProperty<RealGradient>("depsdgrad_op_name")),
38  _ddepsdgrad_op(getMaterialProperty<RealGradient>("ddepsdgrad_op_name"))
39 {
40  // Get number of coupled variables
41  unsigned int nvar = _coupled_moose_vars.size();
42 
43  // reserve space for derivatives
44  _dLdarg.resize(nvar);
45  _depsdarg.resize(nvar);
46  _ddepsdarg.resize(nvar);
47 
48  // Iterate over all coupled variables
49  for (unsigned int i = 0; i < nvar; ++i)
50  {
51  const VariableName iname = _coupled_moose_vars[i]->name();
52  _dLdarg[i] = &getMaterialPropertyDerivative<Real>("mob_name", iname);
53  _depsdarg[i] = &getMaterialPropertyDerivative<Real>("eps_name", iname);
54  _ddepsdarg[i] = &getMaterialPropertyDerivative<Real>("deps_name", iname);
55  }
56 }
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

Real ACInterfaceKobayashi1::computeQpOffDiagJacobian ( unsigned int  jvar)
protectedvirtual

Definition at line 91 of file ACInterfaceKobayashi1.C.

92 {
93  // get the coupled variable jvar is referring to
94  const unsigned int cvar = mapJvarToCvar(jvar);
95 
96  // Set modified gradient vector
97  const RealGradient v(-_grad_u[_qp](1), _grad_u[_qp](0), 0);
98 
99  // Set off-diagonal jaocbian terms from mobility dependence
100  Real dsum =
101  _L[_qp] * (_deps[_qp] * (*_depsdarg[cvar])[_qp] * _phi[_j][_qp] * v * _grad_test[_i][_qp]);
102  dsum +=
103  _L[_qp] * (_eps[_qp] * (*_ddepsdarg[cvar])[_qp] * _phi[_j][_qp] * v * _grad_test[_i][_qp]);
104  dsum += (*_dLdarg[cvar])[_qp] * _phi[_j][_qp] * _eps[_qp] * _deps[_qp] * v * _grad_test[_i][_qp];
105 
106  return dsum;
107 }
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
RealGradient ACInterfaceKobayashi1::precomputeQpJacobian ( )
protectedvirtual

Definition at line 69 of file ACInterfaceKobayashi1.C.

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

Enum of computeDFDOP inputs.

Definition at line 59 of file ACInterfaceKobayashi1.C.

60 {
61  // Set modified gradient vector
62  const RealGradient v(-_grad_u[_qp](1), _grad_u[_qp](0), 0);
63 
64  // Define anisotropic interface residual
65  return _eps[_qp] * _deps[_qp] * _L[_qp] * v;
66 }
const MaterialProperty< Real > & _eps
const MaterialProperty< Real > & _deps
const MaterialProperty< Real > & _L
Mobility.

Member Data Documentation

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

Definition at line 47 of file ACInterfaceKobayashi1.h.

Referenced by ACInterfaceKobayashi1(), and computeQpOffDiagJacobian().

const MaterialProperty<RealGradient>& ACInterfaceKobayashi1::_ddepsdgrad_op
protected

Definition at line 42 of file ACInterfaceKobayashi1.h.

Referenced by precomputeQpJacobian().

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

Definition at line 46 of file ACInterfaceKobayashi1.h.

Referenced by ACInterfaceKobayashi1(), and computeQpOffDiagJacobian().

const MaterialProperty<RealGradient>& ACInterfaceKobayashi1::_depsdgrad_op
protected

Definition at line 41 of file ACInterfaceKobayashi1.h.

Referenced by precomputeQpJacobian().

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

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

Definition at line 45 of file ACInterfaceKobayashi1.h.

Referenced by ACInterfaceKobayashi1(), and computeQpOffDiagJacobian().

const MaterialProperty<Real>& ACInterfaceKobayashi1::_dLdop
protected

Definition at line 38 of file ACInterfaceKobayashi1.h.

const MaterialProperty<Real>& ACInterfaceKobayashi1::_eps
protected
const MaterialProperty<Real>& ACInterfaceKobayashi1::_L
protected

Mobility.

Definition at line 37 of file ACInterfaceKobayashi1.h.

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


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