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 34 of file IsotropicElasticityTensor.h.

Constructor & Destructor Documentation

◆ IsotropicElasticityTensor()

IsotropicElasticityTensor::IsotropicElasticityTensor ( const bool  constant = true)

◆ ~IsotropicElasticityTensor()

virtual IsotropicElasticityTensor::~IsotropicElasticityTensor ( )
inlinevirtual

Definition at line 69 of file IsotropicElasticityTensor.h.

69 {}

Member Function Documentation

◆ calculate()

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 18 of file ElasticityTensor.C.

19 {
20  if (!_constant || !_values_computed)
21  {
22  calculateEntries(qp);
23  _values_computed = true;
24  }
25 }
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.

◆ calculateDerivative()

ColumnMajorMatrix ElasticityTensor::calculateDerivative ( unsigned int  qp,
unsigned int  i 
)
virtualinherited

Definition at line 28 of file ElasticityTensor.C.

29 {
30  ColumnMajorMatrix m(9, 9);
31  return m;
32 }

◆ calculateEntries()

void IsotropicElasticityTensor::calculateEntries ( unsigned int  qp)
protectedvirtual

Fill in the matrix.

Implements ElasticityTensor.

Reimplemented in IsotropicElasticityTensorRZ.

Definition at line 113 of file IsotropicElasticityTensor.C.

114 {
116 
117  unsigned int i, j, k, l;
118  i = j = k = l = 0;
119 
120  // Walk down the columns of the 9x9 matrix
121  for (unsigned int q = 0; q < 81; ++q)
122  {
123  // This algorithm was developed by Derek Gaston and Cody Permann
124  // it's based on page 29 of Michael Tonk's notes
125  j += i / 3;
126  k += j / 3;
127  l += k / 3;
128 
129  i %= 3;
130  j %= 3;
131  k %= 3;
132  l %= 3;
133 
134  _values[q] = isotropicEntry(i, j, k, l);
135 
136  ++i;
137  }
138 }
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.

◆ calculateLameCoefficients()

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 67 of file IsotropicElasticityTensor.C.

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

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

◆ isotropicEntry()

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 104 of file IsotropicElasticityTensor.C.

Referenced by calculateEntries().

108 {
109  return _lambda * (i == j) * (k == l) + _mu * ((i == k) * (j == l) + (i == l) * (j == k));
110 }

◆ setBulkModulus()

void IsotropicElasticityTensor::setBulkModulus ( const Real  k)

Set the Bulk Modulus.

Definition at line 54 of file IsotropicElasticityTensor.C.

◆ setLambda()

void IsotropicElasticityTensor::setLambda ( const Real  lambda)

Set the first Lame Coefficient.

Definition at line 26 of file IsotropicElasticityTensor.C.

◆ setMu()

void IsotropicElasticityTensor::setMu ( const Real  mu)

Set the second Lame Coefficient.

Definition at line 33 of file IsotropicElasticityTensor.C.

Referenced by setShearModulus().

◆ setPoissonsRatio()

void IsotropicElasticityTensor::setPoissonsRatio ( const Real  nu)

Set Poissons Ratio.

Definition at line 47 of file IsotropicElasticityTensor.C.

◆ setShearModulus()

void IsotropicElasticityTensor::setShearModulus ( const Real  k)

Set the shear modulus...

same thing as Mu

Definition at line 61 of file IsotropicElasticityTensor.C.

62 {
63  setMu(k);
64 }
void setMu(const Real mu)
Set the second Lame Coefficient.

◆ setYoungsModulus()

void IsotropicElasticityTensor::setYoungsModulus ( const Real  E)

Set the Young's Modulus.

Definition at line 40 of file IsotropicElasticityTensor.C.

Member Data Documentation

◆ _constant

bool ElasticityTensor::_constant
protectedinherited

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

Definition at line 49 of file ElasticityTensor.h.

Referenced by ElasticityTensor::calculate().

◆ _E

Real IsotropicElasticityTensor::_E
protected

◆ _E_set

bool IsotropicElasticityTensor::_E_set
protected

◆ _k

Real IsotropicElasticityTensor::_k
protected

Definition at line 74 of file IsotropicElasticityTensor.h.

Referenced by calculateLameCoefficients(), and setBulkModulus().

◆ _k_set

bool IsotropicElasticityTensor::_k_set
protected

Definition at line 72 of file IsotropicElasticityTensor.h.

Referenced by calculateLameCoefficients(), and setBulkModulus().

◆ _lambda

Real IsotropicElasticityTensor::_lambda
protected

◆ _lambda_set

bool IsotropicElasticityTensor::_lambda_set
protected

◆ _mu

Real IsotropicElasticityTensor::_mu
protected

◆ _mu_set

bool IsotropicElasticityTensor::_mu_set
protected

◆ _nu

Real IsotropicElasticityTensor::_nu
protected

◆ _nu_set

bool IsotropicElasticityTensor::_nu_set
protected

◆ _values_computed

bool ElasticityTensor::_values_computed
protectedinherited

Whether or not the values have been computed once.

Definition at line 54 of file ElasticityTensor.h.

Referenced by ElasticityTensor::calculate().


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