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 
18 namespace Opm {
19 namespace Elasticity {
20 
25 class Isotropic : public Material
26 {
27 public:
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;
79 protected:
81  virtual std::ostream& write(std::ostream& os) const;
82 
83 private:
84  double E;
85  double nu;
86 };
87 
89 class OrthotropicD : public Material
90 {
91 public:
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 
127 protected:
129  virtual std::ostream& write(std::ostream& os) const;
130 
131 private:
132  double E[6];
133 };
134 
136 class OrthotropicSym : public Material
137 {
138 public:
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;
167 protected:
169  virtual std::ostream& write(std::ostream& os) const;
170 
171 private:
172  double Cupper[21];
173 };
174 
175 }
176 }
177 
178 #endif
virtual double getPar(int ipar=1) const
Returns the ipar'th parameter describing this material.
std::vector< double > Emod
Definition: elasticity_upscale_impl.hpp:577
Orthotropic linear elastic material with diagonal constitutive matrix.
Definition: materials.hh:89
virtual std::ostream & write(std::ostream &os) const
Prints the material properties to a stream.
Isotropic linear elastic material.
Definition: materials.hh:25
Definition: applier.hpp:18
This is a base class for linear elastic materials.
Definition: material.hh:28
virtual ~OrthotropicSym()
Empty virtual destructor.
Definition: materials.hh:145
virtual bool getConstitutiveMatrix(Dune::FieldMatrix< double, 6, 6 > &C, bool invers=false) const
Establishes the full constitutive matrix for this material.
std::vector< double > rho
Definition: elasticity_upscale_impl.hpp:580
double getE() const
Returns the E modulus of the material.
Definition: materials.hh:63
virtual ~Isotropic()
Empty virtual destructor.
Definition: materials.hh:41
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 int numPar() const
Returns the number of parameters describing this material.
Definition: materials.hh:44
Orthotropic linear elastic material with symmetric constitutive matrix.
Definition: materials.hh:136
Isotropic(int ID, double Emod, double Poisson, double rho=0.0)
Constructor creating a new isotropic material.
Definition: materials.hh:33
virtual int numPar() const
Returns the number of parameters describing this material.
Definition: materials.hh:107
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.
void setE(double E_)
Set the E modulus of the material.
Definition: materials.hh:57
Material interface.
virtual double getPar(int ipar=1) const
Returns the ipar'th parameter describing this material.
Definition: materials.hh:50
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.
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 ~OrthotropicD()
Empty virtual destructor.
Definition: materials.hh:104
virtual std::ostream & write(std::ostream &os) const
Prints the material properties to a stream.