https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ThermalFractureIntegral.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#include "RankTwoTensor.h"
12
14
17{
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
45void
47{
48 _total_deigenstrain_dT[_qp] = ((*_deigenstrain_dT[0])[_qp]);
49 for (unsigned int i = 1; i < _deigenstrain_dT.size(); ++i)
51}
void mooseWarning(Args &&... args)
registerMooseObject("SolidMechanicsApp", ThermalFractureIntegral)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
ThermalFractureIntegral computes the summation of the derivative of the eigenstrains with respect to ...
virtual void computeQpProperties() override
ThermalFractureIntegral(const InputParameters &parameters)
MaterialProperty< RankTwoTensor > & _total_deigenstrain_dT
std::vector< const MaterialProperty< RankTwoTensor > * > _deigenstrain_dT
const std::vector< MaterialPropertyName > _eigenstrain_names
const std::string _base_name
Base name of the material system.
static InputParameters validParams()