https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ComputeThermalExpansionEigenstrainBase.h
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
10#pragma once
11
15#include "ChainedReal.h"
16
18template <bool is_ad>
19using ValueAndDerivative = typename std::conditional<is_ad, ADReal, ChainedReal>::type;
20
25template <bool is_ad>
27 : public DerivativeMaterialInterface<ComputeEigenstrainBaseTempl<is_ad>>
28{
29public:
31
33
35 virtual void subdomainSetup() final;
36
38 virtual void computeProperties() final;
39
40 virtual void computeQpEigenstrain() override;
41
42protected:
57
63 const std::vector<ValueAndDerivative<is_ad>> & _temperature;
64
67
70
71 // this temperature derivative property is onlycreated and set for is_ad == false
73
75
76 using ComputeEigenstrainBaseTempl<is_ad>::_qp;
77 using ComputeEigenstrainBaseTempl<is_ad>::_eigenstrain;
78 using ComputeEigenstrainBaseTempl<is_ad>::_eigenstrain_name;
79
80private:
85 std::vector<ValueAndDerivative<is_ad>> _temperature_buffer;
86
89
92};
93
ComputeThermalExpansionEigenstrainBaseTempl< true > ADComputeThermalExpansionEigenstrainBase
ComputeThermalExpansionEigenstrainBaseTempl< false > ComputeThermalExpansionEigenstrainBase
typename std::conditional< is_ad, ADReal, ChainedReal >::type ValueAndDerivative
Return type with a single derivative.
Moose::GenericType< VariableValue, is_ad > GenericVariableValue
ComputeEigenstrainBase is the base class for eigenstrain tensors.
ComputeThermalExpansionEigenstrainBase is a base class for all models that compute eigenstrains due t...
const GenericVariableValue< is_ad > & _temperature_prop
current temperature
virtual void computeProperties() final
update _temperature_buffer
const std::vector< ValueAndDerivative< is_ad > > & _temperature
Temperature to use in the eigenstrain calculation (current value if _use_old_temperature=false,...
MaterialProperty< Real > * _mean_thermal_expansion_coefficient
mean coefficient of thermal expansion (for output verification)
std::vector< ValueAndDerivative< is_ad > > _temperature_buffer
Temperature used in the eigenstrain calculation (current value if _use_old_temperature=false,...
const VariableValue & _temperature_old
previous time step temperature
virtual ValueAndDerivative< is_ad > computeThermalStrain()=0
computeThermalStrain must be overridden in derived classes.
virtual void subdomainSetup() final
resize _temperature_buffer
VariableValueTempl< false > VariableValue