32 double conductivity_offset = 0.0)
33 : density_(density), specific_heat_capacity_(specific_heat_capacity), conductivity_offset_(conductivity_offset)
35 SLIC_ERROR_ROOT_IF(conductivity_offset_ < 0.0,
36 "Conductivity must be positive in the linear isotropic conductor material model.");
38 SLIC_ERROR_ROOT_IF(density_ < 0.0,
"Density must be positive in the linear isotropic conductor material model.");
40 SLIC_ERROR_ROOT_IF(specific_heat_capacity_ < 0.0,
41 "Specific heat capacity must be positive in the linear isotropic conductor material model.");
57 template <
typename T1,
typename T2,
typename T3,
typename T4>
59 const T4& parameter)
const
62 -1.0 * (conductivity_offset_ + get<0>(parameter)) * temperature_gradient};
77 double specific_heat_capacity_;
80 double conductivity_offset_;
95 double specific_heat_capacity = 1.0,
96 double conductivity_offset = 1.0,
97 double d_conductivity_d_temperature = 0.0)
99 specific_heat_capacity_(specific_heat_capacity),
100 conductivity_offset_(conductivity_offset),
101 d_conductivity_d_temperature_(d_conductivity_d_temperature)
103 SLIC_ERROR_ROOT_IF(density_ < 0.0,
"Density must be positive in the linear isotropic conductor material model.");
105 SLIC_ERROR_ROOT_IF(specific_heat_capacity_ < 0.0,
106 "Specific heat capacity must be positive in the linear isotropic conductor material model.");
122 template <
typename T1,
typename T2,
typename T3,
typename T4>
124 const T4& parameter)
const
126 const auto currentConductivity =
127 conductivity_offset_ + get<0>(parameter) + d_conductivity_d_temperature_ * temperature;
130 "Conductivity in the IsotropicConductorWithLinearConductivityVsTemperature model has gone negative.");
131 return smith::tuple{density_ * specific_heat_capacity_, -1.0 * currentConductivity * temperature_gradient};
146 double specific_heat_capacity_;
149 double conductivity_offset_;
152 double d_conductivity_d_temperature_;
170 template <
typename T1,
typename T2,
typename T3,
typename T4>
172 const T3& ,
const T4& parameter)
const
200 template <
typename T1,
typename T2,
typename T3,
typename T4>
202 const T3& ,
const T4& parameter)
const
#define SMITH_HOST_DEVICE
Macro that evaluates to __host__ __device__ when compiling with nvcc and does nothing on a host compi...
Linear isotropic conductor with a parameterized conductivity.
ParameterizedLinearIsotropicConductor(double density=1.0, double specific_heat_capacity=1.0, double conductivity_offset=0.0)
Construct a new Parameterized Linear Isotropic Conductor object.
SMITH_HOST_DEVICE auto operator()(const T1 &, const T2 &, const T3 &temperature_gradient, const T4 ¶meter) const
Thermal material response operator.
static constexpr int numParameters()
The number of parameters in the model.
HeatTransfer helper structs.
constexpr SMITH_HOST_DEVICE auto get_value(const T &arg)
return the "value" part from a given type. For non-dual types, this is just the identity function
Constant thermal flux boundary model.
static constexpr int numParameters()
The number of parameters in the model.
SMITH_HOST_DEVICE auto operator()(const T1 &, const T2 &, const double, const T3 &, const T4 ¶meter) const
Evaluation function for the thermal flux on a boundary.
double flux_offset_
The constant flux applied to the boundary.
Nonlinear isotropic heat transfer material model.
SMITH_HOST_DEVICE auto operator()(const T1 &, const T2 &temperature, const T3 &temperature_gradient, const T4 ¶meter) const
Material response call for a linear isotropic material with linear conductivity vs temperature.
static constexpr int numParameters()
The number of parameters in the model.
ParameterizedIsotropicConductorWithLinearConductivityVsTemperature(double density=1.0, double specific_heat_capacity=1.0, double conductivity_offset=1.0, double d_conductivity_d_temperature=0.0)
Construct a Parameterized Isotropic Conductor with Conductivity linear with Temparture object.
Parameterized thermal source model.
static constexpr int numParameters()
The number of parameters in the model.
double source_offset_
The constant source offset.
SMITH_HOST_DEVICE auto operator()(const T1 &, const double, const T2 &, const T3 &, const T4 ¶meter) const
Evaluation function for the constant thermal source model.
This is a class that mimics most of std::tuple's interface, except that it is usable in CUDA kernels ...
The material and load types for the thermal functional physics module.