www.mooseframework.org
PFFractureBulkRateBase.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 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<Kernel>();
15  params.addClassDescription(
16  "Kernel to compute bulk energy contribution to damage order parameter residual equation");
17  params.addRequiredParam<Real>("width", "Width of the smooth crack representation");
18  params.addRequiredParam<Real>(
19  "viscosity", "Viscosity parameter, which reflects the transition right at crack stress");
20  params.addRequiredParam<MaterialPropertyName>(
21  "gc", "Material property which provides the maximum stress/crack stress");
22  params.addRequiredParam<MaterialPropertyName>(
23  "G0", "Material property name with undamaged strain energy driving damage (G0_pos)");
24  params.addParam<MaterialPropertyName>(
25  "dG0_dstrain", "Material property name with derivative of G0_pos with strain");
26 
27  params.addCoupledVar(
28  "displacements",
29  "The displacements appropriate for the simulation geometry and coordinate system");
30  params.addParam<std::string>("base_name",
31  "Optional parameter that allows the user to define "
32  "multiple mechanics material systems on the same "
33  "block, i.e. for multiple phases");
34  return params;
35 }
36 
37 PFFractureBulkRateBase::PFFractureBulkRateBase(const InputParameters & parameters)
38  : Kernel(parameters),
39  _gc_prop(getMaterialProperty<Real>("gc")),
40  _G0_pos(getMaterialProperty<Real>("G0")),
41  _dG0_pos_dstrain(
42  isParamValid("dG0_dstrain") ? &getMaterialProperty<RankTwoTensor>("dG0_dstrain") : NULL),
43  _ndisp(coupledComponents("displacements")),
44  _disp_var(_ndisp),
45  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
46  _width(getParam<Real>("width")),
47  _viscosity(getParam<Real>("viscosity"))
48 {
49  for (unsigned int i = 0; i < _ndisp; ++i)
50  _disp_var[i] = coupled("displacements", i);
51 }
InputParameters validParams< PFFractureBulkRateBase >()
std::vector< unsigned int > _disp_var
PFFractureBulkRateBase(const InputParameters &parameters)
const unsigned int _ndisp
Coupled displacement variables.