CubicCrystal.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 
21 
22 /*!
23  * \brief A cubic crystalline material
24  *
25  * \details For a cubic crystalline material the Elasticity tensor in the linear
26  * constitutive relation \f$T^{ij}=-Y^{ijkl}S_{kl}\f$ reduces to
27  *
28  * \f[
29  * Y^{ijkl} =
30  * \begin{cases}
31  * c_{11} & \mathrm{for}\; i=j=k=l \\
32  * c_{12} & \mathrm{for}\; i=j,k=l,i \neq k \\
33  * c_{44} & \mathrm{for}\; i=k,j=l,i \neq j \;\mathrm{or}\; i=l,j=k,i\neq j \\
34  * \end{cases}
35  * \f]
36  *
37  * with the three independent parameters: the \f$\mathrm{Lam\acute{e}}\f$
38  * parameter \f$\lambda\f$, the Shear modulus \f$\mu\f$ and the %Poisson
39  * ratio \f$\nu\f$. In the parametrization chosen in this implementation we use
40  * the experimental group parameters \f$c_{11}\f$, \f$c_{12}\f$ and
41  * \f$c_{44}\f$, related by;
42  *
43  * \f[
44  * c_{11} = \frac{1 - \nu}{\nu} \lambda = \frac{(1 - \nu)E}{(1 + \nu)(1 -
45  * 2\nu)}, \quad
46  * c_{12} = \lambda = \frac{E\nu}{(1 + \nu)(1 - 2\nu)}, \quad
47  * c_{44} = \mu
48  * \f]
49  *
50  * and inversely;
51  *
52  * \f[
53  * E = \frac{(c_{11} + 2c_{12})(c_{11} - c_{12})}{c_{11} + c_{12}}, \quad
54  * \nu = \left(1 + \frac{c_{11}}{c_{12}}\right)^{-1}, \quad
55  * \mu = c_{44}
56  * \f]
57  *
58  * The stress-strain relation then reduces to
59  *
60  * \f[
61  * T^{ij} =
62  * \begin{cases}
63  * -(c_{11} - c_{12}) S^{ij} - c_{12} \mathrm{Tr}(S) & \mathrm{for}\; i=j \\
64  * -2 c_{44} S^{ij} & \mathrm{for}\; i \neq j \\
65  * \end{cases}
66  * \f]
67  *
68  * In the case where the shear modulus satisfies \f$c_{44} =
69  * \frac{c_{11}-c_{12}}{2}\f$ the constitutive relation is that of an isotropic
70  * material (see `Elasticity::ConstitutiveRelations::IsotropicHomogeneous`).
71  */
72 
74  public:
75  static constexpr size_t volume_dim = 3;
76 
77  struct C_11 {
78  using type = double;
79  static constexpr Options::String help = {
80  "c_11 parameter for a cubic crystal"};
81  static type lower_bound() noexcept { return 0.0; }
82  };
83 
84  struct C_12 {
85  using type = double;
86  static constexpr Options::String help = {
87  "c_12 parameter for a cubic crystal"};
88  static type lower_bound() noexcept { return 0.0; }
89  };
90 
91  struct C_44 {
92  using type = double;
93  static constexpr Options::String help = {
94  "c_44 parameter for a cubic crystal"};
95  static type lower_bound() noexcept { return 0.0; }
96  };
97 
98  using options = tmpl::list<C_11, C_12, C_44>;
99 
100  static constexpr Options::String help = {
101  "A constitutive relation that describes a cubic, crystalline material in "
102  "terms of the three independent group paremeters. The parameters "
103  "are measured in units of stress, typically Pascals."};
104 
105  CubicCrystal() = default;
106  CubicCrystal(const CubicCrystal&) = default;
107  CubicCrystal& operator=(const CubicCrystal&) = default;
108  CubicCrystal(CubicCrystal&&) = default;
109  CubicCrystal& operator=(CubicCrystal&&) = default;
110  ~CubicCrystal() override = default;
111 
112  CubicCrystal(double c_11, double c_12, double c_44) noexcept;
113 
114  /// The constitutive relation that characterizes the elastic properties of a
115  /// material
116  tnsr::II<DataVector, 3> stress(const tnsr::ii<DataVector, 3>& strain,
117  const tnsr::I<DataVector, 3>& x) const
118  noexcept override;
119 
120  /// The 1st group parameter \f$c_{11} = \frac{1 - \nu}{\nu} \lambda\f$
121  double c_11() const noexcept;
122  /// The 2nd group parameter; the \f$\mathrm{Lam\acute{e}}\f$ parameter
123  /// \f$c_{12} = \lambda\f$
124  double c_12() const noexcept;
125  /// The 3rd group parameter; the shear modulus (rigidity) \f$c_{44} = \mu\f$
126  double c_44() const noexcept;
127  /// The Young's modulus \f$E\f$
128  double youngs_modulus() const noexcept;
129  /// The %Poisson ratio \f$\nu\f$
130  double poisson_ratio() const noexcept;
131 
132  // clang-tidy: no runtime references
133  void pup(PUP::er& /*p*/) noexcept override; // NOLINT
134 
135  explicit CubicCrystal(CkMigrateMessage* /*unused*/) noexcept {}
136 
137  WRAPPED_PUPable_decl_base_template( // NOLINT
138  SINGLE_ARG(ConstitutiveRelation<3>), CubicCrystal);
139 
140  private:
144 }; // namespace ConstitutiveRelations
145 
146 bool operator==(const CubicCrystal& lhs, const CubicCrystal& rhs) noexcept;
147 bool operator!=(const CubicCrystal& lhs, const CubicCrystal& rhs) noexcept;
148 
149 } // namespace Elasticity::ConstitutiveRelations
Elasticity::ConstitutiveRelations::CubicCrystal::poisson_ratio
double poisson_ratio() const noexcept
The Poisson ratio .
Definition: CubicCrystal.cpp:58
CharmPupable.hpp
Elasticity::ConstitutiveRelations::CubicCrystal::c_11
double c_11() const noexcept
The 1st group parameter .
Definition: CubicCrystal.cpp:47
Options.hpp
Elasticity::ConstitutiveRelations::CubicCrystal::C_12
Definition: CubicCrystal.hpp:84
Elasticity::ConstitutiveRelations::CubicCrystal
A cubic crystalline material.
Definition: CubicCrystal.hpp:73
Elasticity::ConstitutiveRelations::CubicCrystal::c_12
double c_12() const noexcept
The 2nd group parameter; the parameter .
Definition: CubicCrystal.cpp:49
cstddef
Elasticity::ConstitutiveRelations::CubicCrystal::C_11
Definition: CubicCrystal.hpp:77
DataVector
Stores a collection of function values.
Definition: DataVector.hpp:42
std::numeric_limits::signaling_NaN
T signaling_NaN(T... args)
Elasticity::ConstitutiveRelations::CubicCrystal::youngs_modulus
double youngs_modulus() const noexcept
The Young's modulus .
Definition: CubicCrystal.cpp:54
Elasticity::ConstitutiveRelations::CubicCrystal::stress
tnsr::II< DataVector, 3 > stress(const tnsr::ii< DataVector, 3 > &strain, const tnsr::I< DataVector, 3 > &x) const noexcept override
The constitutive relation that characterizes the elastic properties of a material.
Definition: CubicCrystal.cpp:30
limits
TypeAliases.hpp
Options::String
const char *const String
The string used in option structs.
Definition: Options.hpp:32
Elasticity::ConstitutiveRelations::ConstitutiveRelation
Base class for constitutive (stress-strain) relations that characterize the elastic properties of a m...
Definition: ConstitutiveRelation.hpp:55
Elasticity::ConstitutiveRelations::CubicCrystal::C_44
Definition: CubicCrystal.hpp:91
Elasticity::ConstitutiveRelations
Constitutive (stress-strain) relations that characterize the elastic properties of a material.
Definition: ConstitutiveRelation.cpp:11
TMPL.hpp
Elasticity::ConstitutiveRelations::CubicCrystal::c_44
double c_44() const noexcept
The 3rd group parameter; the shear modulus (rigidity) .
Definition: CubicCrystal.cpp:51