www.mooseframework.org
Public Types | Public Member Functions | Static 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 Types

typedef DerivativeMaterialPropertyNameInterface::SymbolName SymbolName
 

Public Member Functions

 ACInterfaceKobayashi1 (const InputParameters &parameters)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialProperty (const std::string &name)
 
const GenericMaterialProperty< U, is_ad > & getDefaultMaterialPropertyByName (const std::string &name)
 
void validateDerivativeMaterialPropertyBase (const std::string &base)
 
const MaterialPropertyName derivativePropertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName derivativePropertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName derivativePropertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName derivativePropertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
GenericMaterialProperty< U, is_ad > & declarePropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, const SymbolName &c1, unsigned int v2, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivative (const std::string &base, unsigned int v1, unsigned int v2=libMesh::invalid_uint, unsigned int v3=libMesh::invalid_uint)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< VariableName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const std::vector< SymbolName > &c)
 
const GenericMaterialProperty< U, is_ad > & getMaterialPropertyDerivativeByName (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2="", const SymbolName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateCoupling (const MaterialPropertyName &base, const std::vector< VariableName > &c, bool validate_aux=true)
 
void validateCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
void validateNonlinearCoupling (const MaterialPropertyName &base, const VariableName &c1="", const VariableName &c2="", const VariableName &c3="")
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyName (const MaterialPropertyName &base, const std::vector< SymbolName > &c) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameFirst (const MaterialPropertyName &base, const SymbolName &c1) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameSecond (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 
const MaterialPropertyName propertyNameThird (const MaterialPropertyName &base, const SymbolName &c1, const SymbolName &c2, const SymbolName &c3) const
 

Static Public Member Functions

static InputParameters validParams ()
 

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

Constructor & Destructor Documentation

◆ ACInterfaceKobayashi1()

ACInterfaceKobayashi1::ACInterfaceKobayashi1 ( const InputParameters parameters)

Definition at line 34 of file ACInterfaceKobayashi1.C.

36  _L(getMaterialProperty<Real>("mob_name")),
37  _dLdop(getMaterialPropertyDerivative<Real>("mob_name", _var.name())),
38  _eps(getMaterialProperty<Real>("eps_name")),
39  _deps(getMaterialProperty<Real>("deps_name")),
40  _depsdgrad_op(getMaterialProperty<RealGradient>("depsdgrad_op_name")),
41  _ddepsdgrad_op(getMaterialProperty<RealGradient>("ddepsdgrad_op_name"))
42 {
43  // reserve space for derivatives
44  _dLdarg.resize(_n_args);
45  _depsdarg.resize(_n_args);
46  _ddepsdarg.resize(_n_args);
47 
48  // Iterate over all coupled variables
49  for (unsigned int i = 0; i < _n_args; ++i)
50  {
51  _dLdarg[i] = &getMaterialPropertyDerivative<Real>("mob_name", i);
52  _depsdarg[i] = &getMaterialPropertyDerivative<Real>("eps_name", i);
53  _ddepsdarg[i] = &getMaterialPropertyDerivative<Real>("deps_name", i);
54  }
55 }
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 90 of file ACInterfaceKobayashi1.C.

91 {
92  // get the coupled variable jvar is referring to
93  const unsigned int cvar = mapJvarToCvar(jvar);
94 
95  // Set modified gradient vector
96  const RealGradient v(-_grad_u[_qp](1), _grad_u[_qp](0), 0);
97 
98  // Set off-diagonal jaocbian terms from mobility dependence
99  Real dsum =
100  _L[_qp] * (_deps[_qp] * (*_depsdarg[cvar])[_qp] * _phi[_j][_qp] * v * _grad_test[_i][_qp]);
101  dsum +=
102  _L[_qp] * (_eps[_qp] * (*_ddepsdarg[cvar])[_qp] * _phi[_j][_qp] * v * _grad_test[_i][_qp]);
103  dsum += (*_dLdarg[cvar])[_qp] * _phi[_j][_qp] * _eps[_qp] * _deps[_qp] * v * _grad_test[_i][_qp];
104 
105  return dsum;
106 }
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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string v
Definition: NS.h:82
std::vector< const MaterialProperty< Real > * > _ddepsdarg

◆ precomputeQpJacobian()

RealGradient ACInterfaceKobayashi1::precomputeQpJacobian ( )
protectedvirtual

Definition at line 68 of file ACInterfaceKobayashi1.C.

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

◆ precomputeQpResidual()

RealGradient ACInterfaceKobayashi1::precomputeQpResidual ( )
protectedvirtual

Enum of computeDFDOP inputs.

Definition at line 58 of file ACInterfaceKobayashi1.C.

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

◆ validParams()

InputParameters ACInterfaceKobayashi1::validParams ( )
static

Definition at line 15 of file ACInterfaceKobayashi1.C.

16 {
18  params.addClassDescription("Anisotropic gradient energy Allen-Cahn Kernel Part 1");
19  params.addParam<MaterialPropertyName>("mob_name", "L", "The mobility used with the kernel");
20  params.addParam<MaterialPropertyName>("eps_name", "eps", "The anisotropic interface parameter");
21  params.addParam<MaterialPropertyName>(
22  "deps_name",
23  "deps",
24  "The derivative of the anisotropic interface parameter with respect to angle");
25  params.addParam<MaterialPropertyName>(
26  "depsdgrad_op_name",
27  "depsdgrad_op",
28  "The derivative of the anisotropic interface parameter eps with respect to grad_op");
29  params.addParam<MaterialPropertyName>(
30  "ddepsdgrad_op_name", "ddepsdgrad_op", "The derivative of deps with respect to grad_op");
31  return params;
32 }
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)

Member Data Documentation

◆ _ddepsdarg

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

Definition at line 46 of file ACInterfaceKobayashi1.h.

Referenced by ACInterfaceKobayashi1(), and computeQpOffDiagJacobian().

◆ _ddepsdgrad_op

const MaterialProperty<RealGradient>& ACInterfaceKobayashi1::_ddepsdgrad_op
protected

Definition at line 41 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 45 of file ACInterfaceKobayashi1.h.

Referenced by ACInterfaceKobayashi1(), and computeQpOffDiagJacobian().

◆ _depsdgrad_op

const MaterialProperty<RealGradient>& ACInterfaceKobayashi1::_depsdgrad_op
protected

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

Referenced by ACInterfaceKobayashi1(), and computeQpOffDiagJacobian().

◆ _dLdop

const MaterialProperty<Real>& ACInterfaceKobayashi1::_dLdop
protected

Definition at line 37 of file ACInterfaceKobayashi1.h.

◆ _eps

const MaterialProperty<Real>& ACInterfaceKobayashi1::_eps
protected

◆ _L

const MaterialProperty<Real>& ACInterfaceKobayashi1::_L
protected

Mobility.

Definition at line 36 of file ACInterfaceKobayashi1.h.

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


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