SpECTRE Documentation Coverage Report
Current view: top level - PointwiseFunctions/Elasticity/ConstitutiveRelations - IsotropicHomogeneous.hpp Hit Total Coverage
Commit: ebec864322c50bab8dca0a90baf8d01875114261 Lines: 7 31 22.6 %
Date: 2020-11-25 20:28:50
Legend: Lines: hit not hit

          Line data    Source code
       1           0 : // 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             : 
      10             : #include "DataStructures/Tensor/TypeAliases.hpp"
      11             : #include "Options/Options.hpp"
      12             : #include "Parallel/CharmPupable.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
      28             :  *
      29             :  * \f[
      30             :  * Y^{ijkl} = \lambda \delta^{ij}\delta^{kl} + \mu
      31             :  * \left(\delta^{ik}\delta^{jl} + \delta^{il}\delta^{jk}\right) \\
      32             :  * \implies \quad T^{ij} = -\lambda \mathrm{Tr}(S) \delta^{ij} - 2\mu S^{ij}
      33             :  * \f]
      34             :  *
      35             :  * with the _Lamé parameter_ \f$\lambda\f$ and the _shear modulus_ (or
      36             :  * _rigidity_) \f$\mu\f$. In the parametrization chosen in this implementation
      37             :  * we use the _bulk modulus_ (or _incompressibility_)
      38             :  *
      39             :  * \f[
      40             :  * K=\lambda + \frac{2}{3}\mu
      41             :  * \f]
      42             :  *
      43             :  * instead of the Lamé parameter. In this parametrization the
      44             :  * stress-strain relation
      45             :  *
      46             :  * \f[
      47             :  * T^{ij} = -K \mathrm{Tr}(S) \delta^{ij} - 2\mu\left(S^{ij} -
      48             :  * \frac{1}{3}\mathrm{Tr}(S)\delta^{ij}\right)
      49             :  * \f]
      50             :  *
      51             :  * decomposes into a scalar and a traceless part (Eq. 11.18 in
      52             :  * \cite ThorneBlandford2017). Parameters also often used in this context are
      53             :  * the _Young's modulus_
      54             :  *
      55             :  * \f[
      56             :  * E=\frac{9K\mu}{3K+\mu}=\frac{\mu(3\lambda+2\mu)}{\lambda+\mu}
      57             :  * \f]
      58             :  *
      59             :  * and the _Poisson ratio_
      60             :  *
      61             :  * \f[
      62             :  * \nu=\frac{3K-2\mu}{2(3K+\mu)}=\frac{\lambda}{2(\lambda+\mu)}\text{.}
      63             :  * \f]
      64             :  *
      65             :  * Inversely, these relations read:
      66             :  *
      67             :  * \f[
      68             :  * K =\frac{E}{3(1-2\nu)}, \quad
      69             :  * \lambda =\frac{E\nu}{(1+\nu)(1-2\nu)}, \quad
      70             :  * \mu =\frac{E}{2(1+\nu)}
      71             :  * \f]
      72             :  *
      73             :  * **In two dimensions** this implementation reduces to the plane-stress
      74             :  * approximation. We assume that all stresses apply in the plane of the
      75             :  * computational domain, which corresponds to scenarios of in-plane stretching
      76             :  * and shearing of thin slabs of material. Since orthogonal stresses vanish as
      77             :  * \f$T^{i3}=0=T^{3i}\f$ we find \f$\mathrm{Tr}(S)=\frac{2\mu}{\lambda +
      78             :  * 2\mu}\mathrm{Tr}^{(2)}(S)\f$, where \f$\mathrm{Tr}^{(2)}\f$ denotes that the
      79             :  * trace only applies to the two dimensions within the plane. The constitutive
      80             :  * relation thus reduces to
      81             :  *
      82             :  * \f{align}
      83             :  * T^{ij}=&-\frac{2\lambda\mu}{\lambda + 2\mu}\mathrm{Tr}^{(2)}(S)\delta^{ij} -
      84             :  * 2\mu S^{ij} \\
      85             :  * =&-\frac{E\nu}{1-\nu^2}\mathrm{Tr}^{(2)}(S)\delta^{ij} -
      86             :  * \frac{E}{1+\nu}S^{ij}
      87             :  * \f}
      88             :  *
      89             :  * which is non-zero only in the directions of the plane. Since the stresses
      90             :  * are also assumed to be constant along the thickness of the plane
      91             :  * \f$\partial_3T^{ij}=0\f$ the elasticity problem \f$-\partial_i T^{ij}=F^j\f$
      92             :  * reduces to two dimensions.
      93             :  */
      94             : template <size_t Dim>
      95           1 : class IsotropicHomogeneous : public ConstitutiveRelation<Dim> {
      96             :  public:
      97           0 :   static constexpr size_t volume_dim = Dim;
      98             : 
      99           0 :   struct BulkModulus {
     100           0 :     using type = double;
     101           0 :     static constexpr Options::String help = {
     102             :         "The incompressibility of the material"};
     103           0 :     static type lower_bound() noexcept { return 0.0; }
     104             :   };
     105             : 
     106           0 :   struct ShearModulus {
     107           0 :     using type = double;
     108           0 :     static constexpr Options::String help = {"The rigidity of the material"};
     109           0 :     static type lower_bound() noexcept { return 0.0; }
     110             :   };
     111             : 
     112           0 :   using options = tmpl::list<BulkModulus, ShearModulus>;
     113             : 
     114           0 :   static constexpr Options::String help = {
     115             :       "A constitutive relation that describes an isotropic, homogeneous "
     116             :       "material in terms of two elastic moduli. These bulk and shear moduli "
     117             :       "indicate the material's resistance to volume and shape changes, "
     118             :       "respectively. Both are measured in units of stress, typically Pascals."};
     119             : 
     120           0 :   IsotropicHomogeneous() = default;
     121           0 :   IsotropicHomogeneous(const IsotropicHomogeneous&) = default;
     122           0 :   IsotropicHomogeneous& operator=(const IsotropicHomogeneous&) = default;
     123           0 :   IsotropicHomogeneous(IsotropicHomogeneous&&) = default;
     124           0 :   IsotropicHomogeneous& operator=(IsotropicHomogeneous&&) = default;
     125           0 :   ~IsotropicHomogeneous() override = default;
     126             : 
     127           0 :   IsotropicHomogeneous(double bulk_modulus, double shear_modulus) noexcept;
     128             : 
     129             :   /// The constitutive relation that characterizes the elastic properties of a
     130             :   /// material
     131           1 :   tnsr::II<DataVector, Dim> stress(const tnsr::ii<DataVector, Dim>& strain,
     132             :                                    const tnsr::I<DataVector, Dim>& x) const
     133             :       noexcept override;
     134             : 
     135             :   /// The bulk modulus (or incompressibility) \f$K\f$
     136           1 :   double bulk_modulus() const noexcept;
     137             :   /// The shear modulus (or rigidity) \f$\mu\f$
     138           1 :   double shear_modulus() const noexcept;
     139             :   /// The Lamé parameter \f$\lambda\f$
     140           1 :   double lame_parameter() const noexcept;
     141             :   /// The Young's modulus \f$E\f$
     142           1 :   double youngs_modulus() const noexcept;
     143             :   /// The Poisson ratio \f$\nu\f$
     144           1 :   double poisson_ratio() const noexcept;
     145             : 
     146             :   // clang-tidy: no runtime references
     147           0 :   void pup(PUP::er& /*p*/) noexcept override;  //  NOLINT
     148             : 
     149           0 :   explicit IsotropicHomogeneous(CkMigrateMessage* /*unused*/) noexcept {}
     150             : 
     151           0 :   WRAPPED_PUPable_decl_base_template(  // NOLINT
     152             :       SINGLE_ARG(ConstitutiveRelation<Dim>), IsotropicHomogeneous);
     153             : 
     154             :  private:
     155           0 :   double bulk_modulus_ = std::numeric_limits<double>::signaling_NaN();
     156           0 :   double shear_modulus_ = std::numeric_limits<double>::signaling_NaN();
     157             : };
     158             : 
     159             : template <size_t Dim>
     160             : bool operator==(const IsotropicHomogeneous<Dim>& lhs,
     161             :                 const IsotropicHomogeneous<Dim>& rhs) noexcept;
     162             : template <size_t Dim>
     163             : bool operator!=(const IsotropicHomogeneous<Dim>& lhs,
     164             :                 const IsotropicHomogeneous<Dim>& rhs) noexcept;
     165             : 
     166             : /// \cond
     167             : template <size_t Dim>
     168             : PUP::able::PUP_ID IsotropicHomogeneous<Dim>::my_PUP_ID = 0;
     169             : /// \endcond
     170             : 
     171             : }  // namespace ConstitutiveRelations
     172             : }  // namespace Elasticity

Generated by: LCOV version 1.14