34 #ifndef OOMPH_POROELASTICITY_TENSOR_HEADER 35 #define OOMPH_POROELASTICITY_TENSOR_HEADER 39 #include <oomph-lib-config.h> 42 #include "../generic/oomph_utilities.h" 58 class ElasticityTensor
63 static const unsigned Index[3][3][3][3];
78 const unsigned &k,
const unsigned &l)
const 80 if((i > 2) || (j > 2) || (k> 2) || (l>2))
82 std::ostringstream error_message;
85 error_message <<
"Range Error : Index 1 " << i
86 <<
" is not in the range (0,2)";
90 error_message <<
"Range Error : Index 2 " << j
91 <<
" is not in the range (0,2)";
96 error_message <<
"Range Error : Index 2 " << k
97 <<
" is not in the range (0,2)";
102 error_message <<
"Range Error : Index 4 " << l
103 <<
" is not in the range (0,2)";
108 OOMPH_CURRENT_FUNCTION,
109 OOMPH_EXCEPTION_LOCATION);
127 const unsigned &k,
const unsigned &l)
const 154 static const unsigned StaticIndex[21];
168 double lambda=E*nu/((1.0+nu)*(1.0-2.0*nu));
169 double mu=E/(2.0*(1.0+nu));
170 this->set_lame_coefficients(lambda,mu);
183 double lambda=E*nu/((1.0+nu)*(1.0-2.0*nu));
184 double mu=E/(2.0*(1.0+nu));
185 this->set_lame_coefficients(lambda,mu);
195 this->set_lame_coefficients(lame[0],lame[1]);
201 {
return C[StaticIndex[
i]];}
209 C[1] = lambda + 2.0*mu;
239 static const unsigned StaticIndex[21];
252 double mu=E/(2.0*(1.0+nu));
253 this->set_lame_coefficients(lambda,mu);
266 double lambda=E*nu/((1.0+nu)*(1.0-2.0*nu));
267 double mu=E/(2.0*(1.0+nu));
268 this->set_lame_coefficients(lambda,mu);
281 double lambda=E*nu/((1.0+nu)*(1.0-2.0*nu));
282 double mu=E/(2.0*(1.0+nu));
283 this->set_lame_coefficients(lambda,mu);
293 this->set_lame_coefficients(lame[0],lame[1]);
299 {
return C[StaticIndex[
i]];}
308 const double &
mu()
const
double independent_component(const unsigned &i) const
Overload the independent coefficient function.
double independent_component(const unsigned &i) const
Overload the independent coefficient function.
ElasticityTensor()
Empty Constructor.
IsotropicElasticityTensor(const double &nu, const double &E)
Constructor. Passing in the values of the Poisson's ratio and Young's modulus (interpreted as the rat...
DeviatoricIsotropicElasticityTensor()
Constructor. For use with incompressibility. Requires no parameters since Poisson's ratio is fixed at...
DeviatoricIsotropicElasticityTensor(const double &nu, const double &E)
Constructor. Passing in the values of the Poisson's ratio and Young's modulus (interpreted as the rat...
double operator()(const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l) const
Return the appropriate independent component via the index translation scheme (const version)...
const double & lambda() const
Accessor function for the first lame parameter.
DeviatoricIsotropicElasticityTensor(const Vector< double > &lame)
Constructur. Passing in the values of the two lame coefficients directly (interpreted as the ratios o...
static const unsigned Index[3][3][3][3]
Translation table from the four indices to the corresponding independent component.
virtual ~ElasticityTensor()
Empty virtual Destructor.
IsotropicElasticityTensor(const Vector< double > &lame)
Constructur. Passing in the values of the two lame coefficients directly (interpreted as the ratios o...
void range_check(const unsigned &i, const unsigned &j, const unsigned &k, const unsigned &l) const
Helper range checking function (Note that this only captures over-runs in 3D but errors are likely to...
const double & mu() const
Accessor function for the second lame parameter.
void set_lame_coefficients(const double &lambda, const double &mu)
virtual double independent_component(const unsigned &i) const
DeviatoricIsotropicElasticityTensor(const double &nu)
Constructor. Passing in the value of the Poisson's ratio. Stresses and tractions in the governing equ...
void set_lame_coefficients(const double &lambda, const double &mu)
IsotropicElasticityTensor(const double &nu)
Constructor. Passing in the value of the Poisson's ratio. Stresses and tractions in the governing equ...