www.mooseframework.org
ComputeThermalExpansionEigenstrainBase.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 #include "RankTwoTensor.h"
9 
10 template <>
11 InputParameters
13 {
14  InputParameters params = validParams<ComputeEigenstrainBase>();
15  params.addCoupledVar("temperature", "Coupled temperature");
16  params.addRequiredCoupledVar("stress_free_temperature",
17  "Reference temperature at which there is no "
18  "thermal expansion for thermal eigenstrain "
19  "calculation");
20  return params;
21 }
22 
24  const InputParameters & parameters)
25  : DerivativeMaterialInterface<ComputeEigenstrainBase>(parameters),
26  _temperature(coupledValue("temperature")),
27  _deigenstrain_dT(declarePropertyDerivative<RankTwoTensor>(_eigenstrain_name,
28  getVar("temperature", 0)->name())),
29  _stress_free_temperature(coupledValue("stress_free_temperature"))
30 {
31 }
32 
33 void
35 {
36  Real thermal_strain = 0.0;
37  Real instantaneous_cte = 0.0;
38 
39  computeThermalStrain(thermal_strain, instantaneous_cte);
40 
41  _eigenstrain[_qp].zero();
42  _eigenstrain[_qp].addIa(thermal_strain);
43 
44  _deigenstrain_dT[_qp].zero();
45  _deigenstrain_dT[_qp].addIa(instantaneous_cte);
46 }
InputParameters validParams< ComputeEigenstrainBase >()
virtual void computeThermalStrain(Real &thermal_strain, Real &instantaneous_cte)=0
InputParameters validParams< ComputeThermalExpansionEigenstrainBase >()
ComputeThermalExpansionEigenstrainBase(const InputParameters &parameters)
ComputeEigenstrainBase is the base class for eigenstrain tensors.