www.mooseframework.org
ComputeThermalExpansionEigenstrainBase.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 
14 
15 InputParameters
17 {
18  InputParameters params = ComputeEigenstrainBase::validParams();
19  params.addCoupledVar("temperature", "Coupled temperature");
20  params.addRequiredCoupledVar("stress_free_temperature",
21  "Reference temperature at which there is no "
22  "thermal expansion for thermal eigenstrain "
23  "calculation");
24  return params;
25 }
26 
28  const InputParameters & parameters)
29  : DerivativeMaterialInterface<ComputeEigenstrainBase>(parameters),
30  _temperature(coupledValue("temperature")),
31  _deigenstrain_dT(declarePropertyDerivative<RankTwoTensor>(_eigenstrain_name,
32  getVar("temperature", 0)->name())),
33  _stress_free_temperature(coupledValue("stress_free_temperature"))
34 {
35 }
36 
37 void
39 {
40  Real thermal_strain = 0.0;
41 
42  // instantaneous_cte is just the derivative of thermal_strain with respect to temperature
43  Real instantaneous_cte = 0.0;
44 
45  computeThermalStrain(thermal_strain, instantaneous_cte);
46 
47  _eigenstrain[_qp].zero();
48  _eigenstrain[_qp].addIa(thermal_strain);
49 
50  _deigenstrain_dT[_qp].zero();
51  _deigenstrain_dT[_qp].addIa(instantaneous_cte);
52 }
defineLegacyParams
defineLegacyParams(ComputeThermalExpansionEigenstrainBase)
ComputeEigenstrainBase::validParams
static InputParameters validParams()
Definition: ComputeEigenstrainBase.C:17
ComputeThermalExpansionEigenstrainBase::computeThermalStrain
virtual void computeThermalStrain(Real &thermal_strain, Real &instantaneous_cte)=0
ComputeThermalExpansionEigenstrainBase::computeQpEigenstrain
virtual void computeQpEigenstrain() override
Definition: ComputeThermalExpansionEigenstrainBase.C:38
name
const std::string name
Definition: Setup.h:21
ComputeThermalExpansionEigenstrainBase::_deigenstrain_dT
MaterialProperty< RankTwoTensor > & _deigenstrain_dT
Definition: ComputeThermalExpansionEigenstrainBase.h:50
ComputeThermalExpansionEigenstrainBase::validParams
static InputParameters validParams()
Definition: ComputeThermalExpansionEigenstrainBase.C:16
ComputeEigenstrainBase
ComputeEigenstrainBase is the base class for eigenstrain tensors.
Definition: ComputeEigenstrainBase.h:26
RankTwoTensorTempl< Real >
ComputeThermalExpansionEigenstrainBase.h
ComputeThermalExpansionEigenstrainBase::ComputeThermalExpansionEigenstrainBase
ComputeThermalExpansionEigenstrainBase(const InputParameters &parameters)
Definition: ComputeThermalExpansionEigenstrainBase.C:27
ComputeThermalExpansionEigenstrainBase
ComputeThermalExpansionEigenstrainBase is a base class for all models that compute eigenstrains due t...
Definition: ComputeThermalExpansionEigenstrainBase.h:27