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

Material to compute the angular orientation of order parameter interfaces. More...

#include <InterfaceOrientationMaterial.h>

Inheritance diagram for InterfaceOrientationMaterial:
[legend]

Public Member Functions

 InterfaceOrientationMaterial (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeQpProperties ()
 

Private Attributes

Real _delta
 
unsigned int _j
 
Real _theta0
 
Real _eps_bar
 
MaterialProperty< Real > & _eps
 
MaterialProperty< Real > & _deps
 
MaterialProperty< RealGradient > & _depsdgrad_op
 
MaterialProperty< RealGradient > & _ddepsdgrad_op
 
const VariableValue & _op
 
const VariableGradient & _grad_op
 

Detailed Description

Material to compute the angular orientation of order parameter interfaces.

See R. Kobayashi, Physica D, 63, 410-423 (1993), final (non-numbered) equation on p. 412. doi:10.1016/0167-2789(93)90120-P

Definition at line 26 of file InterfaceOrientationMaterial.h.

Constructor & Destructor Documentation

◆ InterfaceOrientationMaterial()

InterfaceOrientationMaterial::InterfaceOrientationMaterial ( const InputParameters &  parameters)

Definition at line 30 of file InterfaceOrientationMaterial.C.

31  : Material(parameters),
32  _delta(getParam<Real>("anisotropy_strength")),
33  _j(getParam<unsigned int>("mode_number")),
34  _theta0(getParam<Real>("reference_angle")),
35  _eps_bar(getParam<Real>("eps_bar")),
36  _eps(declareProperty<Real>("eps")),
37  _deps(declareProperty<Real>("deps")),
38  _depsdgrad_op(declareProperty<RealGradient>("depsdgrad_op")),
39  _ddepsdgrad_op(declareProperty<RealGradient>("ddepsdgrad_op")),
40  _op(coupledValue("op")),
41  _grad_op(coupledGradient("op"))
42 {
43  // this currently only works in 2D simulations
44  if (_mesh.dimension() != 2)
45  mooseError("InterfaceOrientationMaterial requires a two-dimensional mesh.");
46 }
MaterialProperty< RealGradient > & _depsdgrad_op
MaterialProperty< RealGradient > & _ddepsdgrad_op

Member Function Documentation

◆ computeQpProperties()

void InterfaceOrientationMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 49 of file InterfaceOrientationMaterial.C.

50 {
51  const Real tol = 1e-9;
52  const Real cutoff = 1.0 - tol;
53 
54  // cosine of the gradient orientation angle
55  Real n = 0.0;
56  const Real nsq = _grad_op[_qp].norm_sq();
57  if (nsq > tol)
58  n = _grad_op[_qp](0) / std::sqrt(nsq);
59 
60  if (n > cutoff)
61  n = cutoff;
62 
63  if (n < -cutoff)
64  n = -cutoff;
65 
66  const Real angle = std::acos(n) * MathUtils::sign(_grad_op[_qp](1));
67 
68  // Compute derivative of angle wrt n
69  const Real dangledn = -MathUtils::sign(_grad_op[_qp](1)) / std::sqrt(1.0 - n * n);
70 
71  // Compute derivative of n with respect to grad_op
72  RealGradient dndgrad_op;
73  if (nsq > tol)
74  {
75  dndgrad_op(0) = _grad_op[_qp](1) * _grad_op[_qp](1);
76  dndgrad_op(1) = -_grad_op[_qp](0) * _grad_op[_qp](1);
77  dndgrad_op /= (_grad_op[_qp].norm_sq() * _grad_op[_qp].norm());
78  }
79 
80  // Calculate interfacial parameter epsilon and its derivatives
81  _eps[_qp] = _eps_bar * (_delta * std::cos(_j * (angle - _theta0 * libMesh::pi / 180.0)) + 1.0);
82  _deps[_qp] = -_eps_bar * _delta * _j * std::sin(_j * (angle - _theta0 * libMesh::pi / 180.0));
83  Real d2eps =
84  -_eps_bar * _delta * _j * _j * std::cos(_j * (angle - _theta0 * libMesh::pi / 180.0));
85 
86  // Compute derivatives of epsilon and its derivative wrt grad_op
87  _depsdgrad_op[_qp] = _deps[_qp] * dangledn * dndgrad_op;
88  _ddepsdgrad_op[_qp] = d2eps * dangledn * dndgrad_op;
89 }
MaterialProperty< RealGradient > & _depsdgrad_op
const double tol
Definition: Setup.h:19
MaterialProperty< RealGradient > & _ddepsdgrad_op

Member Data Documentation

◆ _ddepsdgrad_op

MaterialProperty<RealGradient>& InterfaceOrientationMaterial::_ddepsdgrad_op
private

Definition at line 43 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

◆ _delta

Real InterfaceOrientationMaterial::_delta
private

Definition at line 35 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

◆ _deps

MaterialProperty<Real>& InterfaceOrientationMaterial::_deps
private

Definition at line 41 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

◆ _depsdgrad_op

MaterialProperty<RealGradient>& InterfaceOrientationMaterial::_depsdgrad_op
private

Definition at line 42 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

◆ _eps

MaterialProperty<Real>& InterfaceOrientationMaterial::_eps
private

Definition at line 40 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

◆ _eps_bar

Real InterfaceOrientationMaterial::_eps_bar
private

Definition at line 38 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

◆ _grad_op

const VariableGradient& InterfaceOrientationMaterial::_grad_op
private

Definition at line 46 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

◆ _j

unsigned int InterfaceOrientationMaterial::_j
private

Definition at line 36 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

◆ _op

const VariableValue& InterfaceOrientationMaterial::_op
private

Definition at line 45 of file InterfaceOrientationMaterial.h.

◆ _theta0

Real InterfaceOrientationMaterial::_theta0
private

Definition at line 37 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().


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