Loading [MathJax]/extensions/tex2jax.js
www.mooseframework.org
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
IsotropicElasticityTensorRZ.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
13  : IsotropicElasticityTensor(constant)
14 {
15 }
16 
17 void
19 {
21 
22  mooseAssert(_lambda_set && _mu_set, "Both lambda and mu must be set");
23 
24  // Calculate lambda, the shear modulus, and Young's modulus
25  if (!_nu_set)
26  {
27  _nu = _lambda / (2 * (_lambda + _mu));
28  }
29  if (!_E_set)
30  {
31  _E = _mu * (3 * _lambda + 2 * _mu) / (_lambda + _mu);
32  }
33 
34  _nu_set = true;
35  _E_set = true;
36 }
37 
38 void
40 {
41 
43 
44  for (unsigned int q = 0; q < 81; ++q)
45  {
46  _values[q] = 0;
47  }
48 
49  const Real C0 = _E * (1 - _nu) / ((1 + _nu) * (1 - 2 * _nu));
50  const Real C1 = 1;
51  const Real C2 = _nu / (1 - _nu);
52  const Real C3 = (1 - 2 * _nu) / (2 * (1 - _nu));
53 
54  const int row(9);
55 
56  _values[0 * row + 0] = C0 * C1;
57  _values[0 * row + 4] = C0 * C2;
58  _values[0 * row + 8] = C0 * C2;
59 
60  _values[1 * row + 1] = C0 * C3;
61  _values[1 * row + 3] = C0 * C3;
62 
63  _values[3 * row + 1] = C0 * C3;
64  _values[3 * row + 3] = C0 * C3;
65 
66  _values[4 * row + 0] = C0 * C2;
67  _values[4 * row + 4] = C0 * C1;
68  _values[4 * row + 8] = C0 * C2;
69 
70  _values[8 * row + 0] = C0 * C2;
71  _values[8 * row + 4] = C0 * C2;
72  _values[8 * row + 8] = C0 * C1;
73 }
IsotropicElasticityTensor::_nu_set
bool _nu_set
Definition: IsotropicElasticityTensor.h:71
IsotropicElasticityTensor::_lambda_set
bool _lambda_set
Definition: IsotropicElasticityTensor.h:71
IsotropicElasticityTensor::_lambda
Real _lambda
Definition: IsotropicElasticityTensor.h:73
IsotropicElasticityTensorRZ.h
IsotropicElasticityTensor::_nu
Real _nu
Definition: IsotropicElasticityTensor.h:73
IsotropicElasticityTensor::_mu_set
bool _mu_set
Definition: IsotropicElasticityTensor.h:71
IsotropicElasticityTensorRZ::calculateLameCoefficients
void calculateLameCoefficients()
Calculates lambda and mu based on what has been set.
Definition: IsotropicElasticityTensorRZ.C:18
IsotropicElasticityTensor::_E
Real _E
Definition: IsotropicElasticityTensor.h:73
IsotropicElasticityTensor::calculateLameCoefficients
void calculateLameCoefficients()
Calculates lambda and mu based on what has been set.
Definition: IsotropicElasticityTensor.C:67
IsotropicElasticityTensorRZ::calculateEntries
virtual void calculateEntries(unsigned int qp)
Fill in the matrix.
Definition: IsotropicElasticityTensorRZ.C:39
IsotropicElasticityTensor::_mu
Real _mu
Definition: IsotropicElasticityTensor.h:73
IsotropicElasticityTensor
Defines an Isotropic Elasticity Tensor.
Definition: IsotropicElasticityTensor.h:33
IsotropicElasticityTensor::_E_set
bool _E_set
Definition: IsotropicElasticityTensor.h:71
IsotropicElasticityTensorRZ::IsotropicElasticityTensorRZ
IsotropicElasticityTensorRZ(const bool constant=true)
Definition: IsotropicElasticityTensorRZ.C:12