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 32 of file ACInterfaceStress.h.

Constructor & Destructor Documentation

◆ ACInterfaceStress()

ACInterfaceStress::ACInterfaceStress ( const InputParameters &  parameters)

Definition at line 34 of file ACInterfaceStress.C.

35  : Kernel(parameters),
36  _L(getMaterialProperty<Real>("mob_name")),
37  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
38  _strain(getMaterialPropertyByName<RankTwoTensor>(_base_name + "elastic_strain")),
39  _stress(getParam<Real>("stress") / getParam<Real>("op_range"))
40 {
41 }
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

◆ computeQpJacobian()

Real ACInterfaceStress::computeQpJacobian ( )
overrideprotectedvirtual

Definition at line 91 of file ACInterfaceStress.C.

92 {
93  // no interface, return zero stress
94  const Real grad_norm_sq = _grad_u[_qp].norm_sq();
95  if (grad_norm_sq < libMesh::TOLERANCE)
96  return 0.0;
97 
98  const Real grad_norm = std::sqrt(grad_norm_sq);
99 
100  const Real nx = _grad_u[_qp](0);
101  const Real ny = _grad_u[_qp](1);
102  const Real nz = _grad_u[_qp](2);
103 
104  const Real px = _grad_phi[_j][_qp](0);
105  const Real py = _grad_phi[_j][_qp](1);
106  const Real pz = _grad_phi[_j][_qp](2);
107 
108  const Real s = _stress / grad_norm;
109  const Real ds = -_stress / (grad_norm * grad_norm_sq);
110  const Real dsx = ds * nx;
111  const Real dsy = ds * ny;
112  const Real dsz = ds * nz;
113 
114  const Real dus = ds * (nx * px + ny * py + pz * nz);
115 
116  const Real b = -3.0 * nx * px - 3.0 * ny * py - 3.0 * nz * pz;
117  const Real dudsx = ds * nx / grad_norm_sq * b + ds * px;
118  const Real dudsy = ds * ny / grad_norm_sq * b + ds * py;
119  const Real dudsz = ds * nz / grad_norm_sq * b + ds * pz;
120 
121  // d/du d/d(grad eta)_x
122  _ddS(0, 0, 0) = (2.0 * ny * py + 2.0 * nz * pz) * dsx + (ny * ny + nz * nz) * dudsx;
123  _ddS(0, 1, 0) = _ddS(0, 0, 1) =
124  -py * s - ny * dus - px * ny * dsx - nx * py * dsx - nx * ny * dudsx;
125  _ddS(0, 1, 1) = 2.0 * px * s + 2.0 * nx * dus + (2.0 * nx * px + 2.0 * nz * pz) * dsx +
126  (nx * nx + nz * nz) * dudsx;
127  _ddS(0, 2, 0) = _ddS(0, 0, 2) =
128  -pz * s - nz * dus - px * nz * dsx - nx * pz * dsx - nx * nz * dudsx;
129  _ddS(0, 2, 1) = _ddS(0, 1, 2) = -py * nz * dsx - ny * pz * dsx - ny * nz * dudsx;
130  _ddS(0, 2, 2) = 2.0 * px * s + 2.0 * nx * dus + (2.0 * nx * px + 2.0 * ny * py) * dsx +
131  (nx * nx + ny * ny) * dudsx;
132 
133  // d/du d/d(grad eta)_y
134  _ddS(1, 0, 0) = 2.0 * py * s + 2.0 * ny * dus + (2.0 * ny * py + 2.0 * nz * pz) * dsy +
135  (ny * ny + nz * nz) * dudsy;
136  _ddS(1, 1, 0) = _ddS(1, 0, 1) =
137  -px * s - nx * dus - px * ny * dsy - nx * py * dsy - nx * ny * dudsy;
138  _ddS(1, 1, 1) = (2.0 * nx * px + 2.0 * nz * pz) * dsy + (nx * nx + nz * nz) * dudsy;
139  _ddS(1, 2, 0) = _ddS(1, 0, 2) = -px * nz * dsy - nx * pz * dsy - nx * nz * dudsy;
140  _ddS(1, 2, 1) = _ddS(1, 1, 2) =
141  -pz * s - nz * dus - py * nz * dsy - ny * pz * dsy - ny * nz * dudsy;
142  _ddS(1, 2, 2) = 2.0 * py * s + 2.0 * ny * dus + (2.0 * nx * px + 2.0 * ny * py) * dsy +
143  (nx * nx + ny * ny) * dudsy;
144 
145  // d/du d/d(grad eta)_z
146  _ddS(2, 0, 0) = 2.0 * pz * s + 2.0 * nz * dus + (2.0 * ny * py + 2.0 * nz * pz) * dsz +
147  (ny * ny + nz * nz) * dudsz;
148  _ddS(2, 1, 0) = _ddS(2, 0, 1) = -px * ny * dsz - nx * py * dsz - nx * ny * dudsz;
149  _ddS(2, 1, 1) = 2.0 * pz * s + 2.0 * nz * dus + (2.0 * nx * px + 2.0 * nz * pz) * dsz +
150  (nx * nx + nz * nz) * dudsz;
151  _ddS(2, 2, 0) = _ddS(2, 0, 2) =
152  -px * s - nx * dus - px * nz * dsz - nx * pz * dsz - nx * nz * dudsz;
153  _ddS(2, 2, 1) = _ddS(2, 1, 2) =
154  -py * s - ny * dus - py * nz * dsz - ny * pz * dsz - ny * nz * dudsz;
155  _ddS(2, 2, 2) = (2.0 * nx * px + 2.0 * ny * py) * dsz + (nx * nx + ny * ny) * dudsz;
156 
157  return _L[_qp] * 0.5 * _ddS.doubleContraction(_strain[_qp]) * _grad_test[_i][_qp];
158 }
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

◆ computeQpResidual()

Real ACInterfaceStress::computeQpResidual ( )
overrideprotectedvirtual

Definition at line 44 of file ACInterfaceStress.C.

45 {
46  // no interface, return zero stress
47  const Real grad_norm_sq = _grad_u[_qp].norm_sq();
48  if (grad_norm_sq < libMesh::TOLERANCE)
49  return 0.0;
50 
51  const Real grad_norm = std::sqrt(grad_norm_sq);
52 
53  const Real nx = _grad_u[_qp](0);
54  const Real ny = _grad_u[_qp](1);
55  const Real nz = _grad_u[_qp](2);
56 
57  const Real s = _stress / grad_norm;
58  const Real ds = -_stress / (grad_norm * grad_norm_sq);
59  const Real dsx = ds * nx;
60  const Real dsy = ds * ny;
61  const Real dsz = ds * nz;
62 
63  // d/d(grad eta)_x
64  _dS(0, 0, 0) = (ny * ny + nz * nz) * dsx; // (ny * ny + nz * nz) * s;
65  _dS(0, 1, 0) = _dS(0, 0, 1) = -ny * s - nx * ny * dsx; // -nx * ny * s;
66  _dS(0, 1, 1) = 2.0 * nx * s + (nx * nx + nz * nz) * dsx; // (nx * nx + nz * nz) * s;
67  _dS(0, 2, 0) = _dS(0, 0, 2) = -nz * s - nx * nz * dsx; // -nx * nz * s;
68  _dS(0, 2, 1) = _dS(0, 1, 2) = -ny * nz * dsx; // -ny * nz * s;
69  _dS(0, 2, 2) = 2.0 * nx * s + (nx * nx + ny * ny) * dsx; // (nx * nx + ny * ny) * s;
70 
71  // d/d(grad eta)_y
72  _dS(1, 0, 0) = 2.0 * ny * s + (ny * ny + nz * nz) * dsy; // (ny * ny + nz * nz) * s;
73  _dS(1, 1, 0) = _dS(1, 0, 1) = -nx * s - nx * ny * dsy; // -nx * ny * s;
74  _dS(1, 1, 1) = (nx * nx + nz * nz) * dsy; // (nx * nx + nz * nz) * s;
75  _dS(1, 2, 0) = _dS(1, 0, 2) = -nx * nz * dsy; // -nx * nz * s;
76  _dS(1, 2, 1) = _dS(1, 1, 2) = -nz * s - ny * nz * dsy; // -ny * nz * s;
77  _dS(1, 2, 2) = 2.0 * ny * s + (nx * nx + ny * ny) * dsy; // (nx * nx + ny * ny) * s;
78 
79  // d/d(grad eta)_z
80  _dS(2, 0, 0) = 2.0 * nz * s + (ny * ny + nz * nz) * dsz; // (ny * ny + nz * nz) * s;
81  _dS(2, 1, 0) = _dS(2, 0, 1) = -nx * ny * dsz; // -nx * ny * s;
82  _dS(2, 1, 1) = 2.0 * nz * s + (nx * nx + nz * nz) * dsz; // (nx * nx + nz * nz) * s;
83  _dS(2, 2, 0) = _dS(2, 0, 2) = -nx * s - nx * nz * dsz; // -nx * nz * s;
84  _dS(2, 2, 1) = _dS(2, 1, 2) = -ny * s - ny * nz * dsz; // -ny * nz * s;
85  _dS(2, 2, 2) = (nx * nx + ny * ny) * dsz; // (nx * nx + ny * ny) * s;
86 
87  return _L[_qp] * 0.5 * _dS.doubleContraction(_strain[_qp]) * _grad_test[_i][_qp];
88 }
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

◆ _base_name

std::string ACInterfaceStress::_base_name
protected

Strain base name and property.

Definition at line 45 of file ACInterfaceStress.h.

◆ _ddS

RankThreeTensor ACInterfaceStress::_ddS
protected

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

Definition at line 56 of file ACInterfaceStress.h.

Referenced by computeQpJacobian().

◆ _dS

RankThreeTensor ACInterfaceStress::_dS
protected

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

Definition at line 53 of file ACInterfaceStress.h.

Referenced by computeQpResidual().

◆ _L

const MaterialProperty<Real>& ACInterfaceStress::_L
protected

Mobility.

Definition at line 42 of file ACInterfaceStress.h.

Referenced by computeQpJacobian(), and computeQpResidual().

◆ _strain

const MaterialProperty<RankTwoTensor>& ACInterfaceStress::_strain
protected

Definition at line 46 of file ACInterfaceStress.h.

Referenced by computeQpJacobian(), and computeQpResidual().

◆ _stress

const Real ACInterfaceStress::_stress
protected

interface stress

Definition at line 50 of file ACInterfaceStress.h.

Referenced by computeQpJacobian(), and computeQpResidual().


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