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

Defines an Axisymmetric Isotropic Elasticity Tensor. More...

#include <IsotropicElasticityTensorRZ.h>

Inheritance diagram for IsotropicElasticityTensorRZ:
[legend]

Public Member Functions

 IsotropicElasticityTensorRZ (const bool constant=true)
 
virtual ~IsotropicElasticityTensorRZ ()
 
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...
 
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 Axisymmetric 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 IsotropicElasticityTensorRZ.h.

Constructor & Destructor Documentation

IsotropicElasticityTensorRZ::IsotropicElasticityTensorRZ ( const bool  constant = true)

Definition at line 9 of file IsotropicElasticityTensorRZ.C.

10  : IsotropicElasticityTensor(constant)
11 {
12 }
IsotropicElasticityTensor(const bool constant=true)
virtual IsotropicElasticityTensorRZ::~IsotropicElasticityTensorRZ ( )
inlinevirtual

Definition at line 36 of file IsotropicElasticityTensorRZ.h.

36 {}

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 IsotropicElasticityTensorRZ::calculateEntries ( unsigned int  qp)
protectedvirtual

Fill in the matrix.

Reimplemented from IsotropicElasticityTensor.

Definition at line 36 of file IsotropicElasticityTensorRZ.C.

Referenced by ~IsotropicElasticityTensorRZ().

37 {
38 
40 
41  for (unsigned int q = 0; q < 81; ++q)
42  {
43  _values[q] = 0;
44  }
45 
46  const Real C0 = _E * (1 - _nu) / ((1 + _nu) * (1 - 2 * _nu));
47  const Real C1 = 1;
48  const Real C2 = _nu / (1 - _nu);
49  const Real C3 = (1 - 2 * _nu) / (2 * (1 - _nu));
50 
51  const int row(9);
52 
53  _values[0 * row + 0] = C0 * C1;
54  _values[0 * row + 4] = C0 * C2;
55  _values[0 * row + 8] = C0 * C2;
56 
57  _values[1 * row + 1] = C0 * C3;
58  _values[1 * row + 3] = C0 * C3;
59 
60  _values[3 * row + 1] = C0 * C3;
61  _values[3 * row + 3] = C0 * C3;
62 
63  _values[4 * row + 0] = C0 * C2;
64  _values[4 * row + 4] = C0 * C1;
65  _values[4 * row + 8] = C0 * C2;
66 
67  _values[8 * row + 0] = C0 * C2;
68  _values[8 * row + 4] = C0 * C2;
69  _values[8 * row + 8] = C0 * C1;
70 }
void calculateLameCoefficients()
Calculates lambda and mu based on what has been set.
void IsotropicElasticityTensorRZ::calculateLameCoefficients ( )
protected

Calculates lambda and mu based on what has been set.

These are based on Michael Tonks's's notes

Definition at line 15 of file IsotropicElasticityTensorRZ.C.

Referenced by calculateEntries(), and ~IsotropicElasticityTensorRZ().

16 {
18 
19  mooseAssert(_lambda_set && _mu_set, "Both lambda and mu must be set");
20 
21  // Calculate lambda, the shear modulus, and Young's modulus
22  if (!_nu_set)
23  {
24  _nu = _lambda / (2 * (_lambda + _mu));
25  }
26  if (!_E_set)
27  {
28  _E = _mu * (3 * _lambda + 2 * _mu) / (_lambda + _mu);
29  }
30 
31  _nu_set = true;
32  _E_set = true;
33 }
void calculateLameCoefficients()
Calculates lambda and mu based on what has been set.
Real IsotropicElasticityTensor::isotropicEntry ( const unsigned int  i,
const unsigned  j,
const unsigned  k,
const unsigned  l 
)
protectedinherited

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 IsotropicElasticityTensor::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)
inherited

Set the Bulk Modulus.

Definition at line 51 of file IsotropicElasticityTensor.C.

void IsotropicElasticityTensor::setLambda ( const Real  lambda)
inherited

Set the first Lame Coefficient.

Definition at line 23 of file IsotropicElasticityTensor.C.

void IsotropicElasticityTensor::setMu ( const Real  mu)
inherited

Set the second Lame Coefficient.

Definition at line 30 of file IsotropicElasticityTensor.C.

Referenced by IsotropicElasticityTensor::setShearModulus().

void IsotropicElasticityTensor::setPoissonsRatio ( const Real  nu)
inherited

Set Poissons Ratio.

Definition at line 44 of file IsotropicElasticityTensor.C.

void IsotropicElasticityTensor::setShearModulus ( const Real  k)
inherited

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)
inherited

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
protectedinherited
bool IsotropicElasticityTensor::_E_set
protectedinherited
Real IsotropicElasticityTensor::_k
protectedinherited
bool IsotropicElasticityTensor::_k_set
protectedinherited
Real IsotropicElasticityTensor::_lambda
protectedinherited
bool IsotropicElasticityTensor::_lambda_set
protectedinherited
Real IsotropicElasticityTensor::_mu
protectedinherited
bool IsotropicElasticityTensor::_mu_set
protectedinherited
Real IsotropicElasticityTensor::_nu
protectedinherited
bool IsotropicElasticityTensor::_nu_set
protectedinherited
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: