IsotropicHomogeneous.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
6 #include <cstddef>
7 #include <limits>
8 #include <pup.h>
9 
11 #include "Options/Options.hpp"
13 #include "PointwiseFunctions/Elasticity/ConstitutiveRelations/ConstitutiveRelation.hpp" // IWYU pragma: keep
14 #include "Utilities/TMPL.hpp"
15 
16 /// \cond
17 class DataVector;
18 /// \endcond
19 
20 namespace Elasticity {
21 namespace ConstitutiveRelations {
22 
23 /*!
24  * \brief An isotropic and homogeneous material
25  *
26  * \details For an isotropic and homogeneous material the linear constitutive
27  * relation \f$T^{ij}=-Y^{ijkl}S_{kl}\f$ reduces to \f[
28  * Y^{ijkl} = \lambda \delta^{ij}\delta^{kl} + \mu
29  * \left(\delta^{ik}\delta^{jl} + \delta^{il}\delta^{jk}\right) \\
30  * \implies \quad T^{ij} = -\lambda \mathrm{Tr}(S) \delta^{ij} - 2\mu S^{ij}
31  * \f] with the _Lamé parameter_ \f$\lambda\f$ and the _shear modulus_ (or
32  * _rigidity_) \f$\mu\f$. In the parametrization chosen in this implementation
33  * we use the _bulk modulus_ (or _incompressibility_) \f[
34  * K=\lambda + \frac{2}{3}\mu
35  * \f] instead of the Lamé parameter. In this parametrization the
36  * stress-strain relation \f[
37  * T^{ij} = -K \mathrm{Tr}(S) \delta^{ij} - 2\mu\left(S^{ij} -
38  * \frac{1}{3}\mathrm{Tr}(S)\delta^{ij}\right) \f]
39  * decomposes into a scalar and a traceless part (Eq. 11.18 in
40  * \cite ThorneBlandford2017). Parameters also often used in this context are
41  * the _Young's modulus_ \f[
42  * E=\frac{9K\mu}{3K+\mu}=\frac{\mu(3\lambda+2\mu)}{\lambda+\mu}
43  * \f] and the _Poisson ratio_ \f[
44  * \nu=\frac{3K-2\mu}{2(3K+\mu)}=\frac{\lambda}{2(\lambda+\mu)}
45  * \f]. Inversely, these relations read: \f[
46  * K &=\frac{E}{3(1-2\nu)} \\
47  * \lambda &=\frac{E\nu}{(1+\nu)(1-2\nu)} \\
48  * \mu &=\frac{E}{2(1+\nu)}
49  * \f]
50  *
51  * **In two dimensions** this implementation reduces to the plane-stress
52  * approximation. We assume that all stresses apply in the plane of the
53  * computational domain, which corresponds to scenarios of in-plane stretching
54  * and shearing of thin slabs of material. Since orthogonal stresses vanish as
55  * \f$T^{i3}=0=T^{3i}\f$ we find \f$\mathrm{Tr}(S)=\frac{2\mu}{\lambda +
56  * 2\mu}\mathrm{Tr}^{(2)}(S)\f$, where \f$\mathrm{Tr}^{(2)}\f$ denotes that the
57  * trace only applies to the two dimensions within the plane. The constitutive
58  * relation thus reduces to \f[
59  * T^{ij}&=-\frac{2\lambda\mu}{\lambda + 2\mu}\mathrm{Tr}^{(2)}\delta^{ij} -
60  * 2\mu S^{ij} \\
61  * &=-\frac{E\nu}{1-\nu^2}\mathrm{Tr}^{(2)}\delta^{ij} - \frac{E}{1+\nu}S^{ij}
62  * \f] which is non-zero only in the directions of the plane. Since the stresses
63  * are also assumed to be constant along the thickness of the plane
64  * \f$\partial_3T^{ij}=0\f$ the elasticity problem \f$-\partial_i T^{ij}=F^j\f$
65  * reduces to two dimensions.
66  */
67 template <size_t Dim>
69  public:
70  struct BulkModulus {
71  using type = double;
72  static constexpr OptionString help = {
73  "The incompressibility of the material"};
74  static type lower_bound() noexcept { return 0.0; }
75  };
76 
77  struct ShearModulus {
78  using type = double;
79  static constexpr OptionString help = {"The rigidity of the material"};
80  static type lower_bound() noexcept { return 0.0; }
81  };
82 
83  using options = tmpl::list<BulkModulus, ShearModulus>;
84 
85  static constexpr OptionString help = {
86  "A constitutive relation that describes an isotropic, homogeneous "
87  "material."};
88 
89  IsotropicHomogeneous() = default;
91  IsotropicHomogeneous& operator=(const IsotropicHomogeneous&) = delete;
93  IsotropicHomogeneous& operator=(IsotropicHomogeneous&&) = default;
94  ~IsotropicHomogeneous() override = default;
95 
96  IsotropicHomogeneous(double bulk_modulus, double shear_modulus) noexcept;
97 
98  /// The constitutive relation that characterizes the elastic properties of a
99  /// material
100  tnsr::II<DataVector, Dim> stress(const tnsr::ii<DataVector, Dim>& strain,
101  const tnsr::I<DataVector, Dim>& x) const
102  noexcept override;
103 
104  /// The bulk modulus (or incompressibility) \f$K\f$
105  double bulk_modulus() const noexcept;
106  /// The shear modulus (or rigidity) \f$\mu\f$
107  double shear_modulus() const noexcept;
108  /// The Lamé parameter \f$\lambda\f$
109  double lame_parameter() const noexcept;
110  /// The Young's modulus \f$E\f$
111  double youngs_modulus() const noexcept;
112  /// The Poisson ratio \f$\nu\f$
113  double poisson_ratio() const noexcept;
114 
115  // clang-tidy: no runtime references
116  void pup(PUP::er& /*p*/) noexcept override; // NOLINT
117 
118  explicit IsotropicHomogeneous(CkMigrateMessage* /*unused*/) noexcept {}
119 
122 
123  private:
124  double bulk_modulus_ = std::numeric_limits<double>::signaling_NaN();
125  double shear_modulus_ = std::numeric_limits<double>::signaling_NaN();
126 };
127 
128 template <size_t Dim>
129 bool operator==(const IsotropicHomogeneous<Dim>& lhs,
130  const IsotropicHomogeneous<Dim>& rhs) noexcept;
131 template <size_t Dim>
132 bool operator!=(const IsotropicHomogeneous<Dim>& lhs,
133  const IsotropicHomogeneous<Dim>& rhs) noexcept;
134 
135 /// \cond
136 template <size_t Dim>
137 PUP::able::PUP_ID IsotropicHomogeneous<Dim>::my_PUP_ID = 0;
138 /// \endcond
139 
140 } // namespace ConstitutiveRelations
141 } // namespace Elasticity
double poisson_ratio() const noexcept
The Poisson ratio .
Definition: IsotropicHomogeneous.cpp:89
An isotropic and homogeneous material.
Definition: IsotropicHomogeneous.hpp:68
double youngs_modulus() const noexcept
The Young&#39;s modulus .
Definition: IsotropicHomogeneous.cpp:83
T signaling_NaN(T... args)
double lame_parameter() const noexcept
The Lamé parameter .
Definition: IsotropicHomogeneous.cpp:78
tnsr::II< DataVector, Dim > stress(const tnsr::ii< DataVector, Dim > &strain, const tnsr::I< DataVector, Dim > &x) const noexcept override
The constitutive relation that characterizes the elastic properties of a material.
Defines classes and functions for making classes creatable from input files.
Defines macros to allow serialization of abstract template base classes.
Items related to solving elasticity problems.
Definition: Tags.hpp:34
Base class for constitutive (stress-strain) relations that characterize the elastic properties of a m...
Definition: ConstitutiveRelation.hpp:47
const char *const OptionString
The string used in option structs.
Definition: Options.hpp:27
double bulk_modulus() const noexcept
The bulk modulus (or incompressibility) .
Definition: IsotropicHomogeneous.cpp:68
#define WRAPPED_PUPable_decl_base_template(baseClassName, className)
Mark derived template classes as serializable.
Definition: CharmPupable.hpp:32
Defines a list of useful type aliases for tensors.
double shear_modulus() const noexcept
The shear modulus (or rigidity) .
Definition: IsotropicHomogeneous.cpp:73
Stores a collection of function values.
Definition: DataVector.hpp:42
Wraps the template metaprogramming library used (brigand)