www.mooseframework.org
PFFracBulkRateMaterial.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 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<Material>();
14  params.addClassDescription(
15  "Material properties used in phase-field fracture damage evolution kernel");
16  params.addParam<FunctionName>(
17  "function", "Function describing energy release rate type parameter distribution");
18  params.addParam<Real>("gc", 1.0, "Energy release rate type parameter");
19 
20  return params;
21 }
22 
23 PFFracBulkRateMaterial::PFFracBulkRateMaterial(const InputParameters & parameters)
24  : Material(parameters),
25  _gc(getParam<Real>("gc")),
26  _gc_prop(declareProperty<Real>("gc_prop")),
27  _function_prop(isParamValid("function") ? &getFunction("function") : NULL)
28 {
29 }
30 
31 void
33 {
34  _gc_prop[_qp] = _gc;
35 }
36 
37 void
39 {
40  _gc_prop[_qp] = _gc;
45  getProp();
46 }
47 
48 void
50 {
51  if (_function_prop != NULL)
52  _gc_prop[_qp] = _function_prop->value(_t, _q_point[_qp]);
53 }
MaterialProperty< Real > & _gc_prop
Material property where the gc values are stored.
virtual void initQpStatefulProperties()
Function * _function_prop
Function to specify varying gc.
InputParameters validParams< PFFracBulkRateMaterial >()
Real _gc
Input parameter for homogeneous gc.
PFFracBulkRateMaterial(const InputParameters &parameters)
virtual void getProp()
This function obtains the value of gc Must be overidden by the user for heterogeneous gc...