34 #ifndef OOMPH_TIME_HARMONIC_ELASTICITY_TENSOR_HEADER 35 #define OOMPH_TIME_HARMONIC_ELASTICITY_TENSOR_HEADER 39 #include <oomph-lib-config.h> 42 #include "../generic/oomph_utilities.h" 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 155 static const unsigned StaticIndex[21];
170 double lambda=E*nu/((1.0+nu)*(1.0-2.0*nu));
171 double mu=E/(2.0*(1.0+nu));
172 this->set_lame_coefficients(lambda,mu);
186 double lambda=E*nu/((1.0+nu)*(1.0-2.0*nu));
187 double mu=E/(2.0*(1.0+nu));
188 this->set_lame_coefficients(lambda,mu);
201 double lambda=
E*nu/((1.0+nu)*(1.0-2.0*nu));
202 double mu=
E/(2.0*(1.0+nu));
203 this->set_lame_coefficients(lambda,mu);
209 {
return C[StaticIndex[
i]];}
217 C[1] = lambda + 2.0*mu;
virtual double independent_component(const unsigned &i) const
TimeHarmonicIsotropicElasticityTensor(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)
TimeHarmonicElasticityTensor()
Empty Constructor.
double independent_component(const unsigned &i) const
Overload the independent coefficient function.
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)...
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...
virtual ~TimeHarmonicElasticityTensor()
Empty virtual Destructor.
TimeHarmonicIsotropicElasticityTensor(const double &nu, const double &E)
Constructor. Passing in the values of the Poisson's ratio and Young's modulus (interpreted as the rat...
static const unsigned Index[3][3][3][3]
Translation table from the four indices to the corresponding independent component.
void update_constitutive_parameters(const double &nu, const double &E=1.0)
Update parameters: Specify values of the Poisson's ratio and (optionally) Young's modulus (interprete...