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

Compute the Allen-Cahn interface stress driving force contribution \( -\frac12L\left(\nabla \frac{\partial \sigma_{int}}{\partial\nabla\eta_i}:\epsilon, \psi_m \right) \). More...

#include <ACInterfaceStress.h>

Inheritance diagram for ACInterfaceStress:
[legend]

Public Member Functions

 ACInterfaceStress (const InputParameters &parameters)
 

Protected Member Functions

virtual Real computeQpResidual () override
 
virtual Real computeQpJacobian () override
 

Protected Attributes

const MaterialProperty< Real > & _L
 Mobility. More...
 
const Real _stress
 interface stress More...
 
RankThreeTensor _dS
 d sigma/d(grad eta), derivative of interface stress tensor with order parameter gradient More...
 
RankThreeTensor _ddS
 derivative of _dS w.r.t. the finite element coefficients for the Jacobian calculation More...
 
std::string _base_name
 Strain base name and property. More...
 
const MaterialProperty< RankTwoTensor > & _strain
 

Detailed Description

Compute the Allen-Cahn interface stress driving force contribution \( -\frac12L\left(\nabla \frac{\partial \sigma_{int}}{\partial\nabla\eta_i}:\epsilon, \psi_m \right) \).

Definition at line 24 of file ACInterfaceStress.h.

Constructor & Destructor Documentation

ACInterfaceStress::ACInterfaceStress ( const InputParameters &  parameters)

Definition at line 28 of file ACInterfaceStress.C.

29  : Kernel(parameters),
30  _L(getMaterialProperty<Real>("mob_name")),
31  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
32  _strain(getMaterialPropertyByName<RankTwoTensor>(_base_name + "elastic_strain")),
33  _stress(getParam<Real>("stress") / getParam<Real>("op_range"))
34 {
35 }
const MaterialProperty< Real > & _L
Mobility.
const Real _stress
interface stress
std::string _base_name
Strain base name and property.
const MaterialProperty< RankTwoTensor > & _strain

Member Function Documentation

Real ACInterfaceStress::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 85 of file ACInterfaceStress.C.

86 {
87  // no interface, return zero stress
88  const Real grad_norm_sq = _grad_u[_qp].norm_sq();
89  if (grad_norm_sq < libMesh::TOLERANCE)
90  return 0.0;
91 
92  const Real grad_norm = std::sqrt(grad_norm_sq);
93 
94  const Real nx = _grad_u[_qp](0);
95  const Real ny = _grad_u[_qp](1);
96  const Real nz = _grad_u[_qp](2);
97 
98  const Real px = _grad_phi[_j][_qp](0);
99  const Real py = _grad_phi[_j][_qp](1);
100  const Real pz = _grad_phi[_j][_qp](2);
101 
102  const Real s = _stress / grad_norm;
103  const Real ds = -_stress / (grad_norm * grad_norm_sq);
104  const Real dsx = ds * nx;
105  const Real dsy = ds * ny;
106  const Real dsz = ds * nz;
107 
108  const Real dus = ds * (nx * px + ny * py + pz * nz);
109 
110  const Real b = -3.0 * nx * px - 3.0 * ny * py - 3.0 * nz * pz;
111  const Real dudsx = ds * nx / grad_norm_sq * b + ds * px;
112  const Real dudsy = ds * ny / grad_norm_sq * b + ds * py;
113  const Real dudsz = ds * nz / grad_norm_sq * b + ds * pz;
114 
115  // d/du d/d(grad eta)_x
116  _ddS(0, 0, 0) = (2.0 * ny * py + 2.0 * nz * pz) * dsx + (ny * ny + nz * nz) * dudsx;
117  _ddS(0, 1, 0) = _ddS(0, 0, 1) =
118  -py * s - ny * dus - px * ny * dsx - nx * py * dsx - nx * ny * dudsx;
119  _ddS(0, 1, 1) = 2.0 * px * s + 2.0 * nx * dus + (2.0 * nx * px + 2.0 * nz * pz) * dsx +
120  (nx * nx + nz * nz) * dudsx;
121  _ddS(0, 2, 0) = _ddS(0, 0, 2) =
122  -pz * s - nz * dus - px * nz * dsx - nx * pz * dsx - nx * nz * dudsx;
123  _ddS(0, 2, 1) = _ddS(0, 1, 2) = -py * nz * dsx - ny * pz * dsx - ny * nz * dudsx;
124  _ddS(0, 2, 2) = 2.0 * px * s + 2.0 * nx * dus + (2.0 * nx * px + 2.0 * ny * py) * dsx +
125  (nx * nx + ny * ny) * dudsx;
126 
127  // d/du d/d(grad eta)_y
128  _ddS(1, 0, 0) = 2.0 * py * s + 2.0 * ny * dus + (2.0 * ny * py + 2.0 * nz * pz) * dsy +
129  (ny * ny + nz * nz) * dudsy;
130  _ddS(1, 1, 0) = _ddS(1, 0, 1) =
131  -px * s - nx * dus - px * ny * dsy - nx * py * dsy - nx * ny * dudsy;
132  _ddS(1, 1, 1) = (2.0 * nx * px + 2.0 * nz * pz) * dsy + (nx * nx + nz * nz) * dudsy;
133  _ddS(1, 2, 0) = _ddS(1, 0, 2) = -px * nz * dsy - nx * pz * dsy - nx * nz * dudsy;
134  _ddS(1, 2, 1) = _ddS(1, 1, 2) =
135  -pz * s - nz * dus - py * nz * dsy - ny * pz * dsy - ny * nz * dudsy;
136  _ddS(1, 2, 2) = 2.0 * py * s + 2.0 * ny * dus + (2.0 * nx * px + 2.0 * ny * py) * dsy +
137  (nx * nx + ny * ny) * dudsy;
138 
139  // d/du d/d(grad eta)_z
140  _ddS(2, 0, 0) = 2.0 * pz * s + 2.0 * nz * dus + (2.0 * ny * py + 2.0 * nz * pz) * dsz +
141  (ny * ny + nz * nz) * dudsz;
142  _ddS(2, 1, 0) = _ddS(2, 0, 1) = -px * ny * dsz - nx * py * dsz - nx * ny * dudsz;
143  _ddS(2, 1, 1) = 2.0 * pz * s + 2.0 * nz * dus + (2.0 * nx * px + 2.0 * nz * pz) * dsz +
144  (nx * nx + nz * nz) * dudsz;
145  _ddS(2, 2, 0) = _ddS(2, 0, 2) =
146  -px * s - nx * dus - px * nz * dsz - nx * pz * dsz - nx * nz * dudsz;
147  _ddS(2, 2, 1) = _ddS(2, 1, 2) =
148  -py * s - ny * dus - py * nz * dsz - ny * pz * dsz - ny * nz * dudsz;
149  _ddS(2, 2, 2) = (2.0 * nx * px + 2.0 * ny * py) * dsz + (nx * nx + ny * ny) * dudsz;
150 
151  return _L[_qp] * 0.5 * _ddS.doubleContraction(_strain[_qp]) * _grad_test[_i][_qp];
152 }
const MaterialProperty< Real > & _L
Mobility.
const Real _stress
interface stress
RankThreeTensor _ddS
derivative of _dS w.r.t. the finite element coefficients for the Jacobian calculation ...
const MaterialProperty< RankTwoTensor > & _strain
Real ACInterfaceStress::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 38 of file ACInterfaceStress.C.

39 {
40  // no interface, return zero stress
41  const Real grad_norm_sq = _grad_u[_qp].norm_sq();
42  if (grad_norm_sq < libMesh::TOLERANCE)
43  return 0.0;
44 
45  const Real grad_norm = std::sqrt(grad_norm_sq);
46 
47  const Real nx = _grad_u[_qp](0);
48  const Real ny = _grad_u[_qp](1);
49  const Real nz = _grad_u[_qp](2);
50 
51  const Real s = _stress / grad_norm;
52  const Real ds = -_stress / (grad_norm * grad_norm_sq);
53  const Real dsx = ds * nx;
54  const Real dsy = ds * ny;
55  const Real dsz = ds * nz;
56 
57  // d/d(grad eta)_x
58  _dS(0, 0, 0) = (ny * ny + nz * nz) * dsx; // (ny * ny + nz * nz) * s;
59  _dS(0, 1, 0) = _dS(0, 0, 1) = -ny * s - nx * ny * dsx; // -nx * ny * s;
60  _dS(0, 1, 1) = 2.0 * nx * s + (nx * nx + nz * nz) * dsx; // (nx * nx + nz * nz) * s;
61  _dS(0, 2, 0) = _dS(0, 0, 2) = -nz * s - nx * nz * dsx; // -nx * nz * s;
62  _dS(0, 2, 1) = _dS(0, 1, 2) = -ny * nz * dsx; // -ny * nz * s;
63  _dS(0, 2, 2) = 2.0 * nx * s + (nx * nx + ny * ny) * dsx; // (nx * nx + ny * ny) * s;
64 
65  // d/d(grad eta)_y
66  _dS(1, 0, 0) = 2.0 * ny * s + (ny * ny + nz * nz) * dsy; // (ny * ny + nz * nz) * s;
67  _dS(1, 1, 0) = _dS(1, 0, 1) = -nx * s - nx * ny * dsy; // -nx * ny * s;
68  _dS(1, 1, 1) = (nx * nx + nz * nz) * dsy; // (nx * nx + nz * nz) * s;
69  _dS(1, 2, 0) = _dS(1, 0, 2) = -nx * nz * dsy; // -nx * nz * s;
70  _dS(1, 2, 1) = _dS(1, 1, 2) = -nz * s - ny * nz * dsy; // -ny * nz * s;
71  _dS(1, 2, 2) = 2.0 * ny * s + (nx * nx + ny * ny) * dsy; // (nx * nx + ny * ny) * s;
72 
73  // d/d(grad eta)_z
74  _dS(2, 0, 0) = 2.0 * nz * s + (ny * ny + nz * nz) * dsz; // (ny * ny + nz * nz) * s;
75  _dS(2, 1, 0) = _dS(2, 0, 1) = -nx * ny * dsz; // -nx * ny * s;
76  _dS(2, 1, 1) = 2.0 * nz * s + (nx * nx + nz * nz) * dsz; // (nx * nx + nz * nz) * s;
77  _dS(2, 2, 0) = _dS(2, 0, 2) = -nx * s - nx * nz * dsz; // -nx * nz * s;
78  _dS(2, 2, 1) = _dS(2, 1, 2) = -ny * s - ny * nz * dsz; // -ny * nz * s;
79  _dS(2, 2, 2) = (nx * nx + ny * ny) * dsz; // (nx * nx + ny * ny) * s;
80 
81  return _L[_qp] * 0.5 * _dS.doubleContraction(_strain[_qp]) * _grad_test[_i][_qp];
82 }
const MaterialProperty< Real > & _L
Mobility.
RankThreeTensor _dS
d sigma/d(grad eta), derivative of interface stress tensor with order parameter gradient ...
const Real _stress
interface stress
const MaterialProperty< RankTwoTensor > & _strain

Member Data Documentation

std::string ACInterfaceStress::_base_name
protected

Strain base name and property.

Definition at line 37 of file ACInterfaceStress.h.

RankThreeTensor ACInterfaceStress::_ddS
protected

derivative of _dS w.r.t. the finite element coefficients for the Jacobian calculation

Definition at line 48 of file ACInterfaceStress.h.

Referenced by computeQpJacobian().

RankThreeTensor ACInterfaceStress::_dS
protected

d sigma/d(grad eta), derivative of interface stress tensor with order parameter gradient

Definition at line 45 of file ACInterfaceStress.h.

Referenced by computeQpResidual().

const MaterialProperty<Real>& ACInterfaceStress::_L
protected

Mobility.

Definition at line 34 of file ACInterfaceStress.h.

Referenced by computeQpJacobian(), and computeQpResidual().

const MaterialProperty<RankTwoTensor>& ACInterfaceStress::_strain
protected

Definition at line 38 of file ACInterfaceStress.h.

Referenced by computeQpJacobian(), and computeQpResidual().

const Real ACInterfaceStress::_stress
protected

interface stress

Definition at line 42 of file ACInterfaceStress.h.

Referenced by computeQpJacobian(), and computeQpResidual().


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