54 template <
typename T1,
typename T2,
typename T3>
57 const double K =
E / (3.0 * (1.0 - 2.0 *
nu));
58 const double G = 0.5 *
E / (1.0 +
nu);
59 static constexpr
auto I = Identity<3>();
62 const auto trEg =
tr(Eg);
65 const auto S = 2.0 * G *
dev(Eg) + K * (trEg - 3.0 *
alpha * (theta -
theta_ref)) * I;
66 const auto P =
dot(F, S);
73 const auto q0 = -
k * grad_theta;
85 template <
typename T1,
typename T2>
88 const double K =
E / (3.0 * (1.0 - 2.0 *
nu));
89 const double G = 0.5 *
E / (1.0 +
nu);
91 auto trE =
tr(strain);
97 return psi_1 + psi_2 + psi_3;
136 template <
typename T1,
typename T2,
typename T3,
typename T4>
138 T4 thermal_expansion_scaling)
const
140 auto [scale, unused] = thermal_expansion_scaling;
141 const double K =
E / (3.0 * (1.0 - 2.0 *
nu));
142 const double G = 0.5 *
E / (1.0 +
nu);
143 static constexpr
auto I = Identity<3>();
146 const auto trEg =
tr(Eg);
147 auto alpha =
alpha0 * scale;
150 const auto S = 2.0 * G *
dev(Eg) + K * (trEg - 3.0 * alpha * (theta -
theta_ref)) * I;
151 const auto P =
dot(F, S);
155 const auto s0 = -3 * K * alpha * theta * (trEg - state.
strain_trace);
158 const auto q0 = -
k * grad_theta;
171 template <
typename T1,
typename T2,
typename T3>
174 auto [scale, unused] = thermal_expansion_scaling;
175 const double K =
E / (3.0 * (1.0 - 2.0 *
nu));
176 const double G = 0.5 *
E / (1.0 +
nu);
178 auto trE =
tr(strain);
179 const double alpha =
alpha0 * scale;
184 auto psi_3 = -3.0 * K * alpha * (theta -
theta_ref) * trE;
185 return psi_1 + psi_2 + psi_3;
Accelerator functionality.
constexpr SERAC_HOST_DEVICE auto tr(const isotropic_tensor< T, m, m > &I)
calculate the trace of an isotropic tensor
constexpr SERAC_HOST_DEVICE auto dot(const isotropic_tensor< S, m, m > &I, const tensor< T, m, n... > &A)
dot product between an isotropic and (nonisotropic) tensor
constexpr SERAC_HOST_DEVICE auto dev(const tensor< T, n, n > &A)
Calculates the deviator of a matrix (rank-2 tensor)
constexpr SERAC_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
auto greenStrain(const tensor< T, 3, 3 > &grad_u)
Compute Green's strain from the displacement gradient.
constexpr SERAC_HOST_DEVICE auto det(const isotropic_tensor< T, m, m > &I)
compute the determinant of an isotropic tensor
constexpr SERAC_HOST_DEVICE auto transpose(const isotropic_tensor< T, m, m > &I)
return the transpose of an isotropic tensor
constexpr SERAC_HOST_DEVICE auto squared_norm(const isotropic_tensor< T, m, m > &I)
compute the squared Frobenius norm (tr(dot(transpose(I), I))) of an isotropic tensor
SERAC_HOST_DEVICE auto log(dual< gradient_type > a)
implementation of the natural logarithm function for dual numbers
internal variables for the material model
double strain_trace
trace of Green-Saint Venant strain tensor
Green-Saint Venant isotropic thermoelastic model.
double C_v
volumetric heat capacity
auto calculateFreeEnergy(const tensor< T1, 3, 3 > &grad_u, T2 theta) const
evaluate free energy density
auto operator()(State &state, const tensor< T1, 3, 3 > &grad_u, T2 theta, const tensor< T3, 3 > &grad_theta) const
Evaluate constitutive variables for thermomechanics.
double k
thermal conductivity
double nu
Poisson's ratio.
double theta_ref
datum temperature for thermal expansion
double alpha
thermal expansion coefficient
internal variables for the material model
double strain_trace
trace of Green-Saint Venant strain tensor
Green-Saint Venant isotropic thermoelastic model.
double C_v
volumetric heat capacity
double nu
Poisson's ratio.
double alpha0
reference value of thermal expansion coefficient
double theta_ref
datum temperature for thermal expansion
auto calculateFreeEnergy(const tensor< T1, 3, 3 > &grad_u, T2 theta, T3 thermal_expansion_scaling) const
evaluate free energy density
double k
thermal conductivity
auto operator()(State &state, const tensor< T1, 3, 3 > &grad_u, T2 theta, const tensor< T3, 3 > &grad_theta, T4 thermal_expansion_scaling) const
Evaluate constitutive variables for thermomechanics.
Arbitrary-rank tensor class.
This is a class that mimics most of std::tuple's interface, except that it is usable in CUDA kernels ...
Implementation of the tensor class used by Functional.
Implements a std::tuple-like object that works in CUDA kernels.