38 template <
typename T,
int dim>
41 auto I = Identity<dim>();
42 auto lambda =
K - (2.0 / 3.0) *
G;
43 auto epsilon = 0.5 * (
transpose(du_dX) + du_dX);
44 return lambda *
tr(epsilon) * I + 2.0 *
G * epsilon;
55 template <
typename T,
int dim>
74 template <
typename T,
int dim>
77 static constexpr
auto I = Identity<dim>();
82 const auto S =
K *
tr(E) * I + 2.0 *
G *
dev(E);
83 const auto P =
dot(F, S);
112 template <
typename T,
int dim>
116 constexpr
auto I = Identity<dim>();
117 auto lambda =
K - (2.0 / 3.0) *
G;
120 auto J = J_minus_1 + 1;
121 return (lambda *
log1p(J_minus_1) * I +
G * B_minus_I) / J;
144 template <
typename T>
148 return sigma_y *
pow(1.0 + accumulated_plastic_strain /
eps0, 1.0 /
n);
169 template <
typename T>
178 template <
typename HardeningType>
180 static constexpr
int dim = 3;
181 static constexpr
double tol = 1e-10;
195 template <
typename T>
199 constexpr
auto I = Identity<dim>();
200 const double K =
E / (3.0 * (1.0 - 2.0 *
nu));
201 const double G = 0.5 *
E / (1.0 +
nu);
205 auto p = K *
tr(el_strain);
206 auto s = 2.0 * G *
dev(el_strain);
211 auto residual = [eqps_old, G, *
this](
auto delta_eqps,
auto trial_mises) {
212 return trial_mises - 3.0 * G * delta_eqps - this->
hardening(eqps_old + delta_eqps);
221 double lower_bound = 0.0;
225 auto Np = 1.5 * s / q;
227 s = s - 2.0 * G * delta_eqps * Np;
239 static constexpr
int dim = 3;
256 template <
typename T>
260 constexpr
auto I = Identity<3>();
261 const double K =
E / (3.0 * (1.0 - 2.0 *
nu));
262 const double G = 0.5 *
E / (1.0 +
nu);
271 auto p = K *
tr(el_strain);
272 auto s = 2.0 * G *
dev(el_strain);
273 auto eta = s - state.
beta;
274 auto q =
sqrt(3.0 / 2.0) *
norm(eta);
280 auto plastic_strain_inc = phi / (3 * G +
Hk +
Hi);
287 s = s -
sqrt(6.0) * G * plastic_strain_inc * eta;
308 template <
typename T1,
typename T2,
int dim>
311 return transpose(
dot(
inv(displacement_gradient + Identity<dim>()), kirchhoff_stress));
325 template <
typename T1,
typename T2,
int dim>
328 auto kirchhoff_stress =
det(displacement_gradient + Identity<dim>()) * cauchy_stress;
345 template <
typename T>
364 template <
typename T>
#define SERAC_HOST_DEVICE
Macro that evaluates to __host__ __device__ when compiling with nvcc and does nothing on a host compi...
Implementation of the quadrature-function-based functional enabling rapid development of FEM formulat...
SolidMechanics helper data types.
auto CauchyToPiola(const tensor< T1, dim, dim > &cauchy_stress, const tensor< T2, dim, dim > &displacement_gradient)
Transform the Cauchy stress to the Piola stress.
auto KirchhoffToPiola(const tensor< T1, dim, dim > &kirchhoff_stress, const tensor< T2, dim, dim > &displacement_gradient)
Transform the Kirchhoff stress to the Piola stress.
auto greenStrain(const tensor< T, dim, dim > &grad_u)
Compute Green's strain from the displacement gradient.
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 detApIm1(const tensor< T, 2, 2 > &A)
computes det(A + I) - 1, where precision is not lost when the entries A_{ij} << 1
SERAC_HOST_DEVICE auto pow(dual< gradient_type > a, dual< gradient_type > b)
implementation of a (dual) raised to the b (dual) power
constexpr SERAC_HOST_DEVICE auto sym(const isotropic_tensor< T, m, m > &I)
return the symmetric part of an isotropic tensor
SERAC_HOST_DEVICE auto sqrt(dual< gradient_type > x)
implementation of square root for dual numbers
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
constexpr SERAC_HOST_DEVICE auto det(const isotropic_tensor< T, m, m > &I)
compute the determinant of an isotropic tensor
auto solve_scalar_equation(function &&f, double x0, double lower_bound, double upper_bound, ScalarSolverOptions options, ParamTypes... params)
Solves a nonlinear scalar-valued equation and gives derivatives of solution to parameters.
constexpr SERAC_HOST_DEVICE auto norm(const isotropic_tensor< T, m, m > &I)
compute the Frobenius norm (sqrt(tr(dot(transpose(I), I)))) of an isotropic tensor
constexpr SERAC_HOST_DEVICE auto inv(const isotropic_tensor< T, m, m > &I)
return the inverse of an isotropic tensor
constexpr SERAC_HOST_DEVICE auto transpose(const isotropic_tensor< T, m, m > &I)
return the transpose of an isotropic tensor
SERAC_HOST_DEVICE auto normalize(const tensor< T, n... > &A)
Normalizes the tensor Each element is divided by the Frobenius norm of the tensor,...
SERAC_HOST_DEVICE auto log1p(dual< gradient_type > a)
implementation of the natural logarithm of one plus the argument function for dual numbers
SERAC_HOST_DEVICE auto exp(dual< gradient_type > a)
implementation of exponential function for dual numbers
see Nothing for a complete description of this class and when to use it
Settings for solve_scalar_equation.
double xtol
absolute tolerance on Newton correction
Constant body force model.
SERAC_HOST_DEVICE tensor< double, dim > operator()(const tensor< T, dim > &, const double) const
Evaluation function for the constant body force model.
tensor< double, dim > force_
The constant body force.
Constant traction boundary condition model.
SERAC_HOST_DEVICE tensor< double, dim > operator()(const tensor< T, dim > &, const tensor< T, dim > &, const double) const
Evaluation function for the constant traction model.
tensor< double, dim > traction_
The constant traction.
variables required to characterize the hysteresis response
tensor< double, dim, dim > plastic_strain
plastic strain
double accumulated_plastic_strain
uniaxial equivalent plastic strain
J2 material with nonlinear isotropic hardening.
auto operator()(State &state, const T du_dX) const
calculate the Cauchy stress, given the displacement gradient and previous material state
static constexpr int dim
spatial dimension
double density
mass density
HardeningType hardening
Flow stress hardening model.
double nu
Poisson's ratio.
static constexpr double tol
relative tolerance on residual mag to judge convergence of return map
variables required to characterize the hysteresis response
tensor< double, dim, dim > plastic_strain
plastic strain
tensor< double, dim, dim > beta
back-stress tensor
double accumulated_plastic_strain
incremental plastic strain
a 3D constitutive model for a J2 material with linear isotropic and kinematic hardening.
auto operator()(State &state, const T du_dX) const
calculate the Cauchy stress, given the displacement gradient and previous material state
double density
mass density
double Hi
isotropic hardening constant
double sigma_y
yield stress
double Hk
kinematic hardening constant
static constexpr int dim
this material is written for 3D
double nu
Poisson's ratio.
Linear isotropic elasticity material model.
SERAC_HOST_DEVICE auto operator()(State &, const tensor< T, dim, dim > &du_dX) const
stress calculation for a linear isotropic material model
double density
mass density
Neo-Hookean material model.
SERAC_HOST_DEVICE auto operator()(State &, const tensor< T, dim, dim > &du_dX) const
stress calculation for a NeoHookean material model
double density
mass density
Power-law isotropic hardening law.
auto operator()(const T accumulated_plastic_strain) const
Computes the flow stress.
double sigma_y
yield strength
double n
hardening index in reciprocal form
double eps0
reference value of accumulated plastic strain
St. Venant Kirchhoff hyperelastic model.
auto operator()(State &, const tensor< T, dim, dim > &grad_u) const
stress calculation for a St. Venant Kirchhoff material model
Voce's isotropic hardening law.
double sigma_sat
saturation value of flow strength
double sigma_y
yield strength
double strain_constant
The constant dictating how fast the exponential decays.
auto operator()(const T accumulated_plastic_strain) const
Computes the flow stress.
Arbitrary-rank tensor class.