www.mooseframework.org
PFFractureBulkRate.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #include "PFFractureBulkRate.h"
8 #include "MooseVariable.h"
9 #include "RankTwoTensor.h"
10 #include "MathUtils.h"
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<PFFractureBulkRateBase>();
17  params.addClassDescription(
18  "Kernel to compute bulk energy contribution to damage order parameter residual equation");
19  return params;
20 }
21 
22 PFFractureBulkRate::PFFractureBulkRate(const InputParameters & parameters)
23  : PFFractureBulkRateBase(parameters), _second_u(second())
24 {
25 }
26 
27 Real
29 {
30  const Real & gc = _gc_prop[_qp];
31  const Real & c = _u[_qp];
32  const Real beta = _second_u[_qp].tr();
33  const Real x2 = 2.0 * (1.0 - c) * _G0_pos[_qp] / gc - c / _width;
34  const Real x1 = _width * beta;
35 
44  if (x1 + x2 > 0)
45  return -(-_width * _grad_u[_qp] * _grad_test[_i][_qp] + x2 * _test[_i][_qp]) / _viscosity;
46 
47  return 0.0;
48 }
49 
50 Real
52 {
53  const Real & gc = _gc_prop[_qp];
54  const Real & c = _u[_qp];
55  const Real beta = _second_u[_qp].tr();
56  const Real x = _width * beta + 2.0 * (1.0 - c) * _G0_pos[_qp] / gc - c / _width;
57 
58  if (x > 0)
59  {
60  const Real dx =
61  -_width * _grad_phi[_j][_qp] * _grad_test[_i][_qp] -
62  (2.0 * _phi[_j][_qp] * _G0_pos[_qp] / gc - _phi[_j][_qp] / _width) * _test[_i][_qp];
63 
64  return -dx / _viscosity;
65  }
66 
67  return 0.0;
68 }
69 
70 Real
72 {
73  // bail out early if no stress derivative has been provided
74  if (_dG0_pos_dstrain == NULL)
75  return 0.0;
76 
77  // displacement variables
78  unsigned int c_comp = 0;
79  for (; c_comp < _ndisp; ++c_comp)
80  if (jvar == _disp_var[c_comp])
81  break;
82 
83  // Contribution of displacements to off-diagonal Jacobian of c
84  if (c_comp < _ndisp)
85  {
86  const Real & c = _u[_qp];
87  const Real & gc = _gc_prop[_qp];
88  const Real beta = _second_u[_qp].tr();
89  const Real x1 = _width * beta;
90  const Real x2 = 2.0 * (1.0 - c) * _G0_pos[_qp] / gc - c / _width;
91  if (x1 + x2 > 0)
92  {
93  const Real xfac = -(-_width * _grad_u[_qp] * _grad_test[_i][_qp] + x2 * _test[_i][_qp]) /
94  _viscosity * 2.0 * (1.0 - c) / gc;
95 
96  Real val = 0.0;
97  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
98  val += ((*_dG0_pos_dstrain)[_qp](c_comp, i) + (*_dG0_pos_dstrain)[_qp](i, c_comp)) / 2.0 *
99  _grad_phi[_j][_qp](i);
100 
101  return xfac * val;
102  }
103  }
104 
105  return 0.0;
106 }
PFFractureBulkRate(const InputParameters &parameters)
Phase field based fracture model This kernel computes the residual and Jacobian for bulk free energy ...
const Real _width
Diffuse crack width, controls damage zone thickness.
InputParameters validParams< PFFractureBulkRateBase >()
const MaterialProperty< Real > & _G0_pos
Contribution of umdamaged strain energy to damage evolution.
std::vector< unsigned int > _disp_var
const MaterialProperty< Real > & _gc_prop
Critical energy release rate for fracture.
const unsigned int _ndisp
Coupled displacement variables.
const MaterialProperty< RankTwoTensor > * _dG0_pos_dstrain
Variation of undamaged strain energy driving damage evolution with strain.
virtual Real computeQpJacobian()
virtual Real computeQpResidual()
const VariableSecond & _second_u
second derivative of the kernel variable
const Real _viscosity
Viscosity parameter ( viscosity -> 0, rate independent )
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
InputParameters validParams< PFFractureBulkRate >()