11 #include "RankTwoTensor.h"
12 #include "MooseMesh.h"
22 params.addClassDescription(
"Computes the Eshelby tensor as a function of "
23 "strain energy density and the first "
24 "Piola-Kirchoff stress");
25 params.addRequiredCoupledVar(
27 "The displacements appropriate for the simulation geometry and coordinate system");
28 params.addParam<std::string>(
"base_name",
29 "Optional parameter that allows the user to define "
30 "multiple mechanics material systems on the same "
31 "block, i.e. for multiple phases");
32 params.addCoupledVar(
"temperature",
"Coupled temperature");
37 : DerivativeMaterialInterface<Material>(parameters),
38 _base_name(isParamValid(
"base_name") ? getParam<std::string>(
"base_name") +
"_" :
""),
39 _sed(getMaterialPropertyByName<Real>(_base_name +
"strain_energy_density")),
40 _eshelby_tensor(declareProperty<
RankTwoTensor>(_base_name +
"Eshelby_tensor")),
41 _stress(getMaterialProperty<
RankTwoTensor>(_base_name +
"stress")),
42 _stress_old(getMaterialPropertyOld<
RankTwoTensor>(_base_name +
"stress")),
44 _J_thermal_term_vec(declareProperty<RealVectorValue>(
"J_thermal_term_vec")),
45 _grad_temp(coupledGradient(
"temperature")),
46 _has_temp(isCoupled(
"temperature")),
47 _total_deigenstrain_dT(hasMaterialProperty<
RankTwoTensor>(
"total_deigenstrain_dT")
48 ? &getMaterialProperty<
RankTwoTensor>(
"total_deigenstrain_dT")
51 unsigned int ndisp = coupledComponents(
"displacements");
54 if (ndisp != _mesh.dimension())
56 "The number of variables supplied in 'displacements' must match the mesh dimension.");
59 for (
unsigned int i = 0; i < ndisp; ++i)
60 _grad_disp[i] = &coupledGradient(
"displacements", i);
63 for (
unsigned i = ndisp; i < 3; ++i)
67 mooseError(
"EshelbyTensor Error: To include thermal strain term in Fracture integral "
68 "calculation, must both couple temperature in DomainIntegral block and compute "
69 "total_deigenstrain_dT using ThermalFractureIntegral material model.");
96 WI *= (
_sed[_qp] * detF);