www.mooseframework.org
SplitPFFractureBulkRate.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 /****************************************************************/
8 #include "RankTwoTensor.h"
9 #include "MathUtils.h"
10 
11 template <>
12 InputParameters
14 {
15  InputParameters params = validParams<PFFractureBulkRateBase>();
16  params.addClassDescription(
17  "Kernel to compute bulk energy contribution to damage order parameter residual equation");
18  params.addRequiredCoupledVar("beta", "Laplacian of the kernel variable");
19  return params;
20 }
21 
22 SplitPFFractureBulkRate::SplitPFFractureBulkRate(const InputParameters & parameters)
23  : PFFractureBulkRateBase(parameters), _beta(coupledValue("beta")), _beta_var(coupled("beta"))
24 {
25 }
26 
27 Real
29 {
30  const Real & gc = _gc_prop[_qp];
31  const Real & c = _u[_qp];
32  const Real x = _width * _beta[_qp] + 2.0 * (1.0 - c) * _G0_pos[_qp] / gc - c / _width;
33 
34  return -MathUtils::positivePart(x) / _viscosity * _test[_i][_qp];
35 }
36 
37 Real
39 {
40  const Real & gc = _gc_prop[_qp];
41  const Real & c = _u[_qp];
42  const Real x = _width * _beta[_qp] + 2.0 * (1.0 - c) * _G0_pos[_qp] / gc - c / _width;
43  const Real dx = -2.0 * _G0_pos[_qp] / gc - 1.0 / _width;
44 
45  return -MathUtils::heavyside(x) / _viscosity * dx * _phi[_j][_qp] * _test[_i][_qp];
46 }
47 
48 Real
50 {
51 
52  const Real & c = _u[_qp];
53  const Real & gc = _gc_prop[_qp];
54  const Real x = _width * _beta[_qp] + 2.0 * (1.0 - c) * (_G0_pos[_qp] / gc) - c / _width;
55 
56  // Contribution of Laplacian split variable
57  if (jvar == _beta_var)
58  {
59  const Real xfacbeta = -MathUtils::heavyside(x) / _viscosity * _width;
60  return xfacbeta * _phi[_j][_qp] * _test[_i][_qp];
61  }
62 
63  // bail out early if no stress derivative has been provided
64  if (_dG0_pos_dstrain == NULL)
65  return 0.0;
66 
67  // displacement variables
68  unsigned int c_comp = 0;
69  for (; c_comp < _ndisp; ++c_comp)
70  if (jvar == _disp_var[c_comp])
71  break;
72 
73  // Contribution of displacements to off-diagonal Jacobian of c
74  if (c_comp < _ndisp)
75  {
76  const Real xfac = -MathUtils::heavyside(x) / _viscosity * 2.0 * (1.0 - c) / gc;
77  Real val = 0.0;
78  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
79  val += ((*_dG0_pos_dstrain)[_qp](c_comp, i) + (*_dG0_pos_dstrain)[_qp](i, c_comp)) / 2.0 *
80  _grad_phi[_j][_qp](i);
81 
82  return xfac * val * _test[_i][_qp];
83  }
84 
85  return 0.0;
86 }
Real heavyside(Real x)
Definition: MathUtils.h:38
InputParameters validParams< SplitPFFractureBulkRate >()
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 computeQpOffDiagJacobian(unsigned int jvar)
const VariableValue & _beta
Auxiliary variable: beta = Laplacian of c.
Real positivePart(Real x)
Definition: MathUtils.h:43
const Real _viscosity
Viscosity parameter ( viscosity -> 0, rate independent )
SplitPFFractureBulkRate(const InputParameters &parameters)