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

Generated by: LCOV version 1.14