www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
IsotropicElasticityTensor Class Reference

Defines an Isotropic Elasticity Tensor. More...

#include <IsotropicElasticityTensor.h>

Inheritance diagram for IsotropicElasticityTensor:
[legend]

Public Member Functions

 IsotropicElasticityTensor (const bool constant=true)
 
void setLambda (const Real lambda)
 Set the first Lame Coefficient. More...
 
void setMu (const Real mu)
 Set the second Lame Coefficient. More...
 
void setYoungsModulus (const Real E)
 Set the Young's Modulus. More...
 
void setPoissonsRatio (const Real nu)
 Set Poissons Ratio. More...
 
void setBulkModulus (const Real k)
 Set the Bulk Modulus. More...
 
void setShearModulus (const Real k)
 Set the shear modulus... More...
 
virtual ~IsotropicElasticityTensor ()
 
void calculate (unsigned int qp)
 Public function that will be called whenever the values for this matrix need to be filled in. More...
 
virtual ColumnMajorMatrix calculateDerivative (unsigned int qp, unsigned int i)
 

Protected Member Functions

virtual void calculateEntries (unsigned int qp)
 Fill in the matrix. More...
 
void calculateLameCoefficients ()
 Calculates lambda and mu based on what has been set. More...
 
Real isotropicEntry (const unsigned int i, const unsigned j, const unsigned k, const unsigned l)
 Computes a single entry of C_ijkl. More...
 

Protected Attributes

bool _lambda_set
 
bool _mu_set
 
bool _E_set
 
bool _nu_set
 
bool _k_set
 
Real _lambda
 
Real _mu
 
Real _E
 
Real _nu
 
Real _k
 
bool _constant
 Whether or not the matrix is constant for all of time and space. More...
 
bool _values_computed
 Whether or not the values have been computed once. More...
 

Detailed Description

Defines an Isotropic Elasticity Tensor.

The input is any two of the following:

Youngs Modulus Poissons Ration First and Second Lame Coefficients (lambda and mu) Bulk Modulus

Internally this class uses the Lame Coefficients. Everything is is transformed to these coefficients.

Note that by default this tensor is constant... meaning that it never changes after the first time it is computed.

If you want to modify this behavior you can pass in false to the constructor.

Definition at line 31 of file IsotropicElasticityTensor.h.

Constructor & Destructor Documentation

IsotropicElasticityTensor::IsotropicElasticityTensor ( const bool  constant = true)
virtual IsotropicElasticityTensor::~IsotropicElasticityTensor ( )
inlinevirtual

Definition at line 66 of file IsotropicElasticityTensor.h.

66 {}

Member Function Documentation

void ElasticityTensor::calculate ( unsigned int  qp)
inherited

Public function that will be called whenever the values for this matrix need to be filled in.

Definition at line 15 of file ElasticityTensor.C.

Referenced by ElasticityTensor::~ElasticityTensor().

16 {
17  if (!_constant || !_values_computed)
18  {
19  calculateEntries(qp);
20  _values_computed = true;
21  }
22 }
virtual void calculateEntries(unsigned int qp)=0
Pure virtual (must be overriden by derived class).
bool _values_computed
Whether or not the values have been computed once.
bool _constant
Whether or not the matrix is constant for all of time and space.
ColumnMajorMatrix ElasticityTensor::calculateDerivative ( unsigned int  qp,
unsigned int  i 
)
virtualinherited

Definition at line 25 of file ElasticityTensor.C.

Referenced by ElasticityTensor::~ElasticityTensor().

26 {
27  ColumnMajorMatrix m(9, 9);
28  return m;
29 }
void IsotropicElasticityTensor::calculateEntries ( unsigned int  qp)
protectedvirtual

Fill in the matrix.

Implements ElasticityTensor.

Reimplemented in IsotropicElasticityTensorRZ.

Definition at line 110 of file IsotropicElasticityTensor.C.

111 {
113 
114  unsigned int i, j, k, l;
115  i = j = k = l = 0;
116 
117  // Walk down the columns of the 9x9 matrix
118  for (unsigned int q = 0; q < 81; ++q)
119  {
120  // This algorithm was developed by Derek Gaston and Cody Permann
121  // it's based on page 29 of Michael Tonk's notes
122  j += i / 3;
123  k += j / 3;
124  l += k / 3;
125 
126  i %= 3;
127  j %= 3;
128  k %= 3;
129  l %= 3;
130 
131  _values[q] = isotropicEntry(i, j, k, l);
132 
133  ++i;
134  }
135 }
void calculateLameCoefficients()
Calculates lambda and mu based on what has been set.
Real isotropicEntry(const unsigned int i, const unsigned j, const unsigned k, const unsigned l)
Computes a single entry of C_ijkl.
void IsotropicElasticityTensor::calculateLameCoefficients ( )
protected

Calculates lambda and mu based on what has been set.

These are based on Michael Tonks's's notes

Definition at line 64 of file IsotropicElasticityTensor.C.

Referenced by calculateEntries(), and IsotropicElasticityTensorRZ::calculateLameCoefficients().

65 {
66  if (_lambda_set && _mu_set) // First and second Lame
67  return;
68  else if (_lambda_set && _nu_set)
69  _mu = (_lambda * (1.0 - 2.0 * _nu)) / (2.0 * _nu);
70  else if (_lambda_set && _k_set)
71  _mu = (3.0 * (_k - _lambda)) / 2.0;
72  else if (_lambda_set && _E_set)
73  _mu = ((_E - 3.0 * _lambda) / 4.0) +
74  (std::sqrt((_E - 3.0 * _lambda) * (_E - 3.0 * _lambda) + 8.0 * _lambda * _E) / 4.0);
75  else if (_mu_set && _nu_set)
76  _lambda = (2.0 * _mu * _nu) / (1.0 - 2.0 * _nu);
77  else if (_mu_set && _k_set)
78  _lambda = (3.0 * _k - 2.0 * _mu) / 3.0;
79  else if (_mu_set && _E_set)
80  _lambda = ((2.0 * _mu - _E) * _mu) / (_E - 3.0 * _mu);
81  else if (_nu_set && _k_set)
82  {
83  _lambda = (3.0 * _k * _nu) / (1.0 + _nu);
84  _mu = (3.0 * _k * (1.0 - 2.0 * _nu)) / (2.0 * (1.0 + _nu));
85  }
86  else if (_E_set && _nu_set) // Young's Modulus and Poisson's Ratio
87  {
88  _lambda = (_nu * _E) / ((1.0 + _nu) * (1 - 2.0 * _nu));
89  _mu = _E / (2.0 * (1.0 + _nu));
90  }
91  else if (_E_set && _k_set)
92  {
93  _lambda = (3.0 * _k * (3.0 * _k - _E)) / (9.0 * _k - _E);
94  _mu = (3.0 * _E * _k) / (9.0 * _k - _E);
95  }
96  _lambda_set = true;
97  _mu_set = true;
98 }
Real IsotropicElasticityTensor::isotropicEntry ( const unsigned int  i,
const unsigned  j,
const unsigned  k,
const unsigned  l 
)
protected

Computes a single entry of C_ijkl.

Note that the formula for this came from Michael Tonks on page 234 of his notes.

Definition at line 101 of file IsotropicElasticityTensor.C.

Referenced by calculateEntries().

105 {
106  return _lambda * (i == j) * (k == l) + _mu * ((i == k) * (j == l) + (i == l) * (j == k));
107 }
void IsotropicElasticityTensor::setBulkModulus ( const Real  k)

Set the Bulk Modulus.

Definition at line 51 of file IsotropicElasticityTensor.C.

void IsotropicElasticityTensor::setLambda ( const Real  lambda)

Set the first Lame Coefficient.

Definition at line 23 of file IsotropicElasticityTensor.C.

void IsotropicElasticityTensor::setMu ( const Real  mu)

Set the second Lame Coefficient.

Definition at line 30 of file IsotropicElasticityTensor.C.

Referenced by setShearModulus().

void IsotropicElasticityTensor::setPoissonsRatio ( const Real  nu)

Set Poissons Ratio.

Definition at line 44 of file IsotropicElasticityTensor.C.

void IsotropicElasticityTensor::setShearModulus ( const Real  k)

Set the shear modulus...

same thing as Mu

Definition at line 58 of file IsotropicElasticityTensor.C.

59 {
60  setMu(k);
61 }
void setMu(const Real mu)
Set the second Lame Coefficient.
void IsotropicElasticityTensor::setYoungsModulus ( const Real  E)

Set the Young's Modulus.

Definition at line 37 of file IsotropicElasticityTensor.C.

Member Data Documentation

bool ElasticityTensor::_constant
protectedinherited

Whether or not the matrix is constant for all of time and space.

Definition at line 46 of file ElasticityTensor.h.

Referenced by ElasticityTensor::calculate().

Real IsotropicElasticityTensor::_E
protected
bool IsotropicElasticityTensor::_E_set
protected
Real IsotropicElasticityTensor::_k
protected

Definition at line 71 of file IsotropicElasticityTensor.h.

Referenced by calculateLameCoefficients(), and setBulkModulus().

bool IsotropicElasticityTensor::_k_set
protected

Definition at line 69 of file IsotropicElasticityTensor.h.

Referenced by calculateLameCoefficients(), and setBulkModulus().

Real IsotropicElasticityTensor::_lambda
protected
bool IsotropicElasticityTensor::_lambda_set
protected
Real IsotropicElasticityTensor::_mu
protected
bool IsotropicElasticityTensor::_mu_set
protected
Real IsotropicElasticityTensor::_nu
protected
bool IsotropicElasticityTensor::_nu_set
protected
bool ElasticityTensor::_values_computed
protectedinherited

Whether or not the values have been computed once.

Definition at line 51 of file ElasticityTensor.h.

Referenced by ElasticityTensor::calculate().


The documentation for this class was generated from the following files: