materials.hh
Go to the documentation of this file.
1//==============================================================================
11//==============================================================================
12#ifndef MATERIALS_HH_
13#define MATERIALS_HH_
14
15#include "material.hh"
16
17namespace Opm::Elasticity {
18
23class Isotropic : public Material
24{
25public:
31 Isotropic(int ID, double Emod, double Poisson, double rho_= 0.0)
32 : Material(ID,rho_)
33 {
34 E = Emod;
35 nu = Poisson;
36 }
37
39 ~Isotropic() override {}
40
42 int numPar() const override
43 {
44 return 2;
45 }
46
48 double getPar(int ipar = 1) const override
49 {
50 return ipar == 1 ? E : nu;
51 }
52
55 void setE(double E_)
56 {
57 E = E_;
58 }
59
61 double getE() const
62 {
63 return E;
64 }
65
69 bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
70 bool invers = false) const override;
71
75 bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
76 bool invers = false) const override;
77
78protected:
80 std::ostream& write(std::ostream& os) const override;
81
82private:
83 double E;
84 double nu;
85};
86
88class OrthotropicD : public Material
89{
90public:
99 OrthotropicD(int ID, double Ex, double Ey, double Ez,
100 double Gxy, double Gxz = double(-1), double Gyz = double(-1));
101
103 ~OrthotropicD() override {}
104
106 int numPar() const override
107 {
108 return 6;
109 }
110
112 double getPar(int ipar = 1) const override;
113
117 bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
118 bool invers = false) const override;
119
123 bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
124 bool invers = false) const override;
125
126protected:
128 std::ostream& write(std::ostream& os) const override;
129
130private:
131 double E[6];
132};
133
136{
137public:
141 OrthotropicSym(int ID, const Dune::DynamicVector<double>& Cu);
142
144 ~OrthotropicSym() override {}
145
147 int numPar() const override
148 {
149 return 21;
150 }
151
153 double getPar(int ipar = 1) const override;
154
158 bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
159 bool invers = false) const override;
160
164 bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
165 bool invers = false) const override;
166
167protected:
169 std::ostream& write(std::ostream& os) const override;
170
171private:
172 double Cupper[21];
173};
174
175} // namespace Opm::Elasticity
176
177#endif
Isotropic linear elastic material.
Definition: materials.hh:24
bool getConstitutiveMatrix(Dune::FieldMatrix< double, 6, 6 > &C, bool invers=false) const override
Establishes the full constitutive matrix for this material.
double getPar(int ipar=1) const override
Returns the ipar'th parameter describing this material.
Definition: materials.hh:48
Isotropic(int ID, double Emod, double Poisson, double rho_=0.0)
Constructor creating a new isotropic material.
Definition: materials.hh:31
std::ostream & write(std::ostream &os) const override
Prints the material properties to a stream.
int numPar() const override
Returns the number of parameters describing this material.
Definition: materials.hh:42
double getE() const
Returns the E modulus of the material.
Definition: materials.hh:61
bool getConstitutiveMatrix(Dune::FieldMatrix< double, 3, 3 > &C, bool invers=false) const override
Establishes the full constitutive matrix for this material.
void setE(double E_)
Set the E modulus of the material.
Definition: materials.hh:55
~Isotropic() override
Empty virtual destructor.
Definition: materials.hh:39
This is a base class for linear elastic materials.
Definition: material.hh:32
Orthotropic linear elastic material with diagonal constitutive matrix.
Definition: materials.hh:89
OrthotropicD(int ID, double Ex, double Ey, double Ez, double Gxy, double Gxz=double(-1), double Gyz=double(-1))
Constructor creating a new material.
int numPar() const override
Returns the number of parameters describing this material.
Definition: materials.hh:106
bool getConstitutiveMatrix(Dune::FieldMatrix< double, 3, 3 > &C, bool invers=false) const override
Establishes the full constitutive matrix for this material.
~OrthotropicD() override
Empty virtual destructor.
Definition: materials.hh:103
double getPar(int ipar=1) const override
Returns the ipar'th parameter describing this material.
std::ostream & write(std::ostream &os) const override
Prints the material properties to a stream.
bool getConstitutiveMatrix(Dune::FieldMatrix< double, 6, 6 > &C, bool invers=false) const override
Establishes the full constitutive matrix for this material.
Orthotropic linear elastic material with symmetric constitutive matrix.
Definition: materials.hh:136
OrthotropicSym(int ID, const Dune::DynamicVector< double > &Cu)
Constructor creating a new material.
double getPar(int ipar=1) const override
Returns the ipar'th parameter describing this material.
std::ostream & write(std::ostream &os) const override
Prints the material properties to a stream.
bool getConstitutiveMatrix(Dune::FieldMatrix< double, 6, 6 > &C, bool invers=false) const override
Establishes the full constitutive matrix for this material.
int numPar() const override
Returns the number of parameters describing this material.
Definition: materials.hh:147
~OrthotropicSym() override
Empty virtual destructor.
Definition: materials.hh:144
bool getConstitutiveMatrix(Dune::FieldMatrix< double, 3, 3 > &C, bool invers=false) const override
Establishes the full constitutive matrix for this material.
Material interface.
Definition: applier.hpp:19
std::vector< double > Emod
Definition: elasticity_upscale_impl.hpp:578