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 23 of file InterfaceOrientationMaterial.h.

Constructor & Destructor Documentation

InterfaceOrientationMaterial::InterfaceOrientationMaterial ( const InputParameters &  parameters)

Definition at line 26 of file InterfaceOrientationMaterial.C.

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

Member Function Documentation

void InterfaceOrientationMaterial::computeQpProperties ( )
protectedvirtual

Definition at line 45 of file InterfaceOrientationMaterial.C.

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

Member Data Documentation

MaterialProperty<RealGradient>& InterfaceOrientationMaterial::_ddepsdgrad_op
private

Definition at line 40 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

Real InterfaceOrientationMaterial::_delta
private

Definition at line 32 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& InterfaceOrientationMaterial::_deps
private

Definition at line 38 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

MaterialProperty<RealGradient>& InterfaceOrientationMaterial::_depsdgrad_op
private

Definition at line 39 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

MaterialProperty<Real>& InterfaceOrientationMaterial::_eps
private

Definition at line 37 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

Real InterfaceOrientationMaterial::_eps_bar
private

Definition at line 35 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

const VariableGradient& InterfaceOrientationMaterial::_grad_op
private

Definition at line 43 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

unsigned int InterfaceOrientationMaterial::_j
private

Definition at line 33 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().

const VariableValue& InterfaceOrientationMaterial::_op
private

Definition at line 42 of file InterfaceOrientationMaterial.h.

Real InterfaceOrientationMaterial::_theta0
private

Definition at line 34 of file InterfaceOrientationMaterial.h.

Referenced by computeQpProperties().


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