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
17
18namespace Opm {
19namespace Elasticity {
20
25class Isotropic : public Material
26{
27public:
33 Isotropic(int ID, double Emod, double Poisson, double rho_= 0.0)
34 : Material(ID,rho_)
35 {
36 E = Emod;
37 nu = Poisson;
38 }
39
41 virtual ~Isotropic() {}
42
44 virtual int numPar() const
45 {
46 return 2;
47 }
48
50 virtual double getPar(int ipar = 1) const
51 {
52 return ipar == 1 ? E : nu;
53 }
54
57 void setE(double E_)
58 {
59 E = E_;
60 }
61
63 double getE() const
64 {
65 return E;
66 }
67
71 virtual bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
72 bool invers = false) const;
73
77 virtual bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
78 bool invers = false) const;
79protected:
81 virtual std::ostream& write(std::ostream& os) const;
82
83private:
84 double E;
85 double nu;
86};
87
89class OrthotropicD : public Material
90{
91public:
100 OrthotropicD(int ID, double Ex, double Ey, double Ez,
101 double Gxy, double Gxz = double(-1), double Gyz = double(-1));
102
104 virtual ~OrthotropicD() {}
105
107 virtual int numPar() const
108 {
109 return 6;
110 }
111
113 virtual double getPar(int ipar = 1) const;
114
118 virtual bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
119 bool invers = false) const;
120
124 virtual bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
125 bool invers = false) const;
126
127protected:
129 virtual std::ostream& write(std::ostream& os) const;
130
131private:
132 double E[6];
133};
134
137{
138public:
142 OrthotropicSym(int ID, const Dune::DynamicVector<double>& Cu);
143
145 virtual ~OrthotropicSym() {}
146
148 virtual int numPar() const
149 {
150 return 21;
151 }
152
154 virtual double getPar(int ipar = 1) const;
155
159 virtual bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
160 bool invers = false) const;
161
165 virtual bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
166 bool invers = false) const;
167protected:
169 virtual std::ostream& write(std::ostream& os) const;
170
171private:
172 double Cupper[21];
173};
174
175}
176}
177
178#endif
Isotropic linear elastic material.
Definition: materials.hh:26
virtual bool getConstitutiveMatrix(Dune::FieldMatrix< double, 3, 3 > &C, bool invers=false) const
Establishes the full constitutive matrix for this material.
Isotropic(int ID, double Emod, double Poisson, double rho_=0.0)
Constructor creating a new isotropic material.
Definition: materials.hh:33
virtual std::ostream & write(std::ostream &os) const
Prints the material properties to a stream.
virtual int numPar() const
Returns the number of parameters describing this material.
Definition: materials.hh:44
double getE() const
Returns the E modulus of the material.
Definition: materials.hh:63
virtual ~Isotropic()
Empty virtual destructor.
Definition: materials.hh:41
virtual bool getConstitutiveMatrix(Dune::FieldMatrix< double, 6, 6 > &C, bool invers=false) const
Establishes the full constitutive matrix for this material.
virtual double getPar(int ipar=1) const
Returns the ipar'th parameter describing this material.
Definition: materials.hh:50
void setE(double E_)
Set the E modulus of the material.
Definition: materials.hh:57
This is a base class for linear elastic materials.
Definition: material.hh:33
Orthotropic linear elastic material with diagonal constitutive matrix.
Definition: materials.hh:90
OrthotropicD(int ID, double Ex, double Ey, double Ez, double Gxy, double Gxz=double(-1), double Gyz=double(-1))
Constructor creating a new material.
virtual bool getConstitutiveMatrix(Dune::FieldMatrix< double, 3, 3 > &C, bool invers=false) const
Establishes the full constitutive matrix for this material.
virtual ~OrthotropicD()
Empty virtual destructor.
Definition: materials.hh:104
virtual double getPar(int ipar=1) const
Returns the ipar'th parameter describing this material.
virtual bool getConstitutiveMatrix(Dune::FieldMatrix< double, 6, 6 > &C, bool invers=false) const
Establishes the full constitutive matrix for this material.
virtual int numPar() const
Returns the number of parameters describing this material.
Definition: materials.hh:107
virtual std::ostream & write(std::ostream &os) const
Prints the material properties to a stream.
Orthotropic linear elastic material with symmetric constitutive matrix.
Definition: materials.hh:137
virtual bool getConstitutiveMatrix(Dune::FieldMatrix< double, 3, 3 > &C, bool invers=false) const
Establishes the full constitutive matrix for this material.
virtual double getPar(int ipar=1) const
Returns the ipar'th parameter describing this material.
OrthotropicSym(int ID, const Dune::DynamicVector< double > &Cu)
Constructor creating a new material.
virtual bool getConstitutiveMatrix(Dune::FieldMatrix< double, 6, 6 > &C, bool invers=false) const
Establishes the full constitutive matrix for this material.
virtual std::ostream & write(std::ostream &os) const
Prints the material properties to a stream.
virtual int numPar() const
Returns the number of parameters describing this material.
Definition: materials.hh:148
virtual ~OrthotropicSym()
Empty virtual destructor.
Definition: materials.hh:145
Material interface.
std::vector< double > Emod
Definition: elasticity_upscale_impl.hpp:578
Definition: ImplicitAssembly.hpp:43