Loading...
Searching...
No Matches
materials.hh
Go to the documentation of this file.
//==============================================================================
//==============================================================================
#ifndef MATERIALS_HH_
#define MATERIALS_HH_
#include "material.hh"
namespace Opm::Elasticity {
class Isotropic : public Material
{
public:
Isotropic(int ID, double Emod, double Poisson, double rho_= 0.0)
: Material(ID,rho_)
{
E = Emod;
nu = Poisson;
}
~Isotropic() override {}
int numPar() const override
{
return 2;
}
double getPar(int ipar = 1) const override
{
return ipar == 1 ? E : nu;
}
void setE(double E_)
{
E = E_;
}
double getE() const
{
return E;
}
bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
bool invers = false) const override;
bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
bool invers = false) const override;
protected:
std::ostream& write(std::ostream& os) const override;
private:
double E;
double nu;
};
class OrthotropicD : public Material
{
public:
OrthotropicD(int ID, double Ex, double Ey, double Ez,
double Gxy, double Gxz = double(-1), double Gyz = double(-1));
~OrthotropicD() override {}
int numPar() const override
{
return 6;
}
double getPar(int ipar = 1) const override;
bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
bool invers = false) const override;
bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
bool invers = false) const override;
protected:
std::ostream& write(std::ostream& os) const override;
private:
double E[6];
};
class OrthotropicSym : public Material
{
public:
OrthotropicSym(int ID, const Dune::DynamicVector<double>& Cu);
~OrthotropicSym() override {}
int numPar() const override
{
return 21;
}
double getPar(int ipar = 1) const override;
bool getConstitutiveMatrix(Dune::FieldMatrix<double,6,6>& C,
bool invers = false) const override;
bool getConstitutiveMatrix(Dune::FieldMatrix<double,3,3>& C,
bool invers = false) const override;
protected:
std::ostream& write(std::ostream& os) const override;
private:
double Cupper[21];
};
} // namespace Opm::Elasticity
#endif
Opm::Elasticity::Isotropic::getConstitutiveMatrix
bool getConstitutiveMatrix(Dune::FieldMatrix< double, 6, 6 > &C, bool invers=false) const override
Establishes the full constitutive matrix for this material.
Definition materials.cpp:47
Opm::Elasticity::Isotropic::getPar
double getPar(int ipar=1) const override
Returns the ipar'th parameter describing this material.
Definition materials.hh:48
Opm::Elasticity::Isotropic::Isotropic
Isotropic(int ID, double Emod, double Poisson, double rho_=0.0)
Constructor creating a new isotropic material.
Definition materials.hh:31
Opm::Elasticity::Isotropic::write
std::ostream & write(std::ostream &os) const override
Prints the material properties to a stream.
Definition materials.cpp:20
Opm::Elasticity::Isotropic::numPar
int numPar() const override
Returns the number of parameters describing this material.
Definition materials.hh:42
Opm::Elasticity::Isotropic::getE
double getE() const
Returns the E modulus of the material.
Definition materials.hh:61
Opm::Elasticity::Isotropic::setE
void setE(double E_)
Set the E modulus of the material.
Definition materials.hh:55
Opm::Elasticity::Isotropic::~Isotropic
~Isotropic() override
Empty virtual destructor.
Definition materials.hh:39
Opm::Elasticity::Material::Material
Material(int ID=0, double density=0.0)
Default constructor creating an empty material.
Definition material.hh:35
Opm::Elasticity::OrthotropicD::OrthotropicD
OrthotropicD(int ID, double Ex, double Ey, double Ez, double Gxy, double Gxz=double(-1), double Gyz=double(-1))
Constructor creating a new material.
Definition materials.cpp:99
Opm::Elasticity::OrthotropicD::numPar
int numPar() const override
Returns the number of parameters describing this material.
Definition materials.hh:106
Opm::Elasticity::OrthotropicD::~OrthotropicD
~OrthotropicD() override
Empty virtual destructor.
Definition materials.hh:103
Opm::Elasticity::OrthotropicD::getPar
double getPar(int ipar=1) const override
Returns the ipar'th parameter describing this material.
Definition materials.cpp:123
Opm::Elasticity::OrthotropicD::write
std::ostream & write(std::ostream &os) const override
Prints the material properties to a stream.
Definition materials.cpp:111
Opm::Elasticity::OrthotropicD::getConstitutiveMatrix
bool getConstitutiveMatrix(Dune::FieldMatrix< double, 6, 6 > &C, bool invers=false) const override
Establishes the full constitutive matrix for this material.
Definition materials.cpp:139
Opm::Elasticity::OrthotropicSym::OrthotropicSym
OrthotropicSym(int ID, const Dune::DynamicVector< double > &Cu)
Constructor creating a new material.
Definition materials.cpp:155
Opm::Elasticity::OrthotropicSym::getPar
double getPar(int ipar=1) const override
Returns the ipar'th parameter describing this material.
Definition materials.cpp:176
Opm::Elasticity::OrthotropicSym::write
std::ostream & write(std::ostream &os) const override
Prints the material properties to a stream.
Definition materials.cpp:169
Opm::Elasticity::OrthotropicSym::getConstitutiveMatrix
bool getConstitutiveMatrix(Dune::FieldMatrix< double, 6, 6 > &C, bool invers=false) const override
Establishes the full constitutive matrix for this material.
Definition materials.cpp:196
Opm::Elasticity::OrthotropicSym::numPar
int numPar() const override
Returns the number of parameters describing this material.
Definition materials.hh:147
Opm::Elasticity::OrthotropicSym::~OrthotropicSym
~OrthotropicSym() override
Empty virtual destructor.
Definition materials.hh:144
material.hh
Material interface.