www.mooseframework.org
ThermalFractureIntegral.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #include "RankTwoTensor.h"
12 
13 registerMooseObject("SolidMechanicsApp", ThermalFractureIntegral);
14 
17 {
19  params.addClassDescription(
20  "Calculates summation of the derivative of the eigenstrains with respect to temperature.");
21  params.addRequiredCoupledVar("temperature", "Coupled temperature");
22  params.addParam<std::vector<MaterialPropertyName>>(
23  "eigenstrain_names", {}, "List of eigenstrains to be applied in this strain calculation");
24  return params;
25 }
26 
29  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
30  _eigenstrain_names(getParam<std::vector<MaterialPropertyName>>("eigenstrain_names")),
31  _deigenstrain_dT(_eigenstrain_names.size()),
32  _total_deigenstrain_dT(declareProperty<RankTwoTensor>("total_deigenstrain_dT"))
33 {
34  // Get the materials containing the derivatives of the eigenstrains wrt temperature
35  VariableName temp_name = coupledName("temperature", 0);
36  if (_eigenstrain_names.size() == 0)
37  mooseWarning("No 'eigenstrain_names' specified for ThermalFractureIntegral when 'temperature' "
38  "is specified");
39 
40  for (unsigned int i = 0; i < _deigenstrain_dT.size(); ++i)
41  _deigenstrain_dT[i] = &getMaterialPropertyDerivative<RankTwoTensor>(
42  _base_name + _eigenstrain_names[i], temp_name);
43 }
44 
45 void
47 {
49  for (unsigned int i = 1; i < _deigenstrain_dT.size(); ++i)
51 }
MaterialProperty< RankTwoTensor > & _total_deigenstrain_dT
const std::string _base_name
Base name of the material system.
registerMooseObject("SolidMechanicsApp", ThermalFractureIntegral)
virtual void computeQpProperties() override
VariableName coupledName(const std::string &var_name, unsigned int comp=0) const
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const std::vector< MaterialPropertyName > _eigenstrain_names
static InputParameters validParams()
void mooseWarning(Args &&... args) const
static InputParameters validParams()
ThermalFractureIntegral computes the summation of the derivative of the eigenstrains with respect to ...
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
ThermalFractureIntegral(const InputParameters &parameters)
std::vector< const MaterialProperty< RankTwoTensor > * > _deigenstrain_dT