https://mooseframework.inl.gov
ComputePFFractureStressBase.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
14 {
16  params.addRequiredCoupledVar("c", "Name of damage variable");
17  params.addParam<bool>(
18  "use_current_history_variable", false, "Use the current value of the history variable.");
19  params.addParam<bool>("use_snes_vi_solver",
20  false,
21  "Use PETSc's SNES variational inequalities solver to enforce damage "
22  "irreversibility condition and restrict damage value <= 1.");
23  params.addParam<MaterialPropertyName>("barrier_energy",
24  "Name of material property for fracture energy barrier.");
25  params.addParam<MaterialPropertyName>(
26  "E_name", "elastic_energy", "Name of material property for elastic energy");
27  params.addParam<MaterialPropertyName>(
28  "D_name", "degradation", "Name of material property for energetic degradation function.");
29  params.addParam<MaterialPropertyName>(
30  "I_name", "indicator", "Name of material property for damage indicator function.");
31  params.addParam<MaterialPropertyName>(
32  "F_name",
33  "local_fracture_energy",
34  "Name of material property for local fracture energy function.");
35  return params;
36 }
37 
39  : ComputeStressBase(parameters),
40  _elasticity_tensor_name(_base_name + "elasticity_tensor"),
41  _elasticity_tensor(getMaterialPropertyByName<RankFourTensor>(_elasticity_tensor_name)),
42  _c(coupledValue("c")),
43  _l(getMaterialProperty<Real>("l")),
44  _gc(getMaterialProperty<Real>("gc_prop")),
45  _pressure(getDefaultMaterialProperty<Real>("fracture_pressure")),
46  _use_current_hist(getParam<bool>("use_current_history_variable")),
47  _use_snes_vi_solver(getParam<bool>("use_snes_vi_solver")),
48  _H(declareProperty<Real>("hist")),
49  _H_old(getMaterialPropertyOld<Real>("hist")),
50  _barrier(getDefaultMaterialProperty<Real>("barrier_energy")),
51  _E(declareProperty<Real>(getParam<MaterialPropertyName>("E_name"))),
52  _dEdc(declarePropertyDerivative<Real>(getParam<MaterialPropertyName>("E_name"),
53  coupledName("c", 0))),
54  _d2Ed2c(declarePropertyDerivative<Real>(
55  getParam<MaterialPropertyName>("E_name"), coupledName("c", 0), coupledName("c", 0))),
56  _dstress_dc(
57  declarePropertyDerivative<RankTwoTensor>(_base_name + "stress", coupledName("c", 0))),
58  _d2Fdcdstrain(declareProperty<RankTwoTensor>("d2Fdcdstrain")),
59  _D(getMaterialProperty<Real>("D_name")),
60  _dDdc(getMaterialPropertyDerivative<Real>("D_name", coupledName("c", 0))),
61  _d2Dd2c(
62  getMaterialPropertyDerivative<Real>("D_name", coupledName("c", 0), coupledName("c", 0))),
63  _I(getDefaultMaterialProperty<Real>("I_name")),
64  _dIdc(getMaterialPropertyDerivative<Real>("I_name", coupledName("c", 0))),
65  _d2Id2c(getMaterialPropertyDerivative<Real>("I_name", coupledName("c", 0), coupledName("c", 0)))
66 {
67 }
68 
69 void
71 {
72  _H[_qp] = 0.0;
73 }
MaterialProperty< Real > & _H
History variable that prevents crack healing, declared in this material.
virtual void initQpStatefulProperties() override
ComputeStressBase is the base class for stress tensors computed from MOOSE&#39;s strain calculators...
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static InputParameters validParams()
ComputePFFractureStressBase(const InputParameters &parameters)
static InputParameters validParams()
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real