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

ComputeIsotropicElasticityTensor defines an elasticity tensor material for isotropic materials. More...

#include <ComputeIsotropicElasticityTensor.h>

Inheritance diagram for ComputeIsotropicElasticityTensor:
[legend]

Public Member Functions

 ComputeIsotropicElasticityTensor (const InputParameters &parameters)
 
bool hasGuarantee (const MaterialPropertyName &prop_name, Guarantee guarantee)
 

Static Public Member Functions

static InputParameters validParams ()
 

Protected Member Functions

virtual void computeQpElasticityTensor () override
 
virtual void computeQpProperties ()
 
void issueGuarantee (const MaterialPropertyName &prop_name, Guarantee guarantee)
 
void revokeGuarantee (const MaterialPropertyName &prop_name, Guarantee guarantee)
 

Protected Attributes

bool _bulk_modulus_set
 Elastic constants. More...
 
bool _lambda_set
 
bool _poissons_ratio_set
 
bool _shear_modulus_set
 
bool _youngs_modulus_set
 
Real _bulk_modulus
 
Real _lambda
 
Real _poissons_ratio
 
Real _shear_modulus
 
Real _youngs_modulus
 
RankFourTensor _Cijkl
 Individual elasticity tensor. More...
 
Real _effective_stiffness_local
 Effective stiffness of the element: function of material properties. More...
 
const std::string _base_name
 
std::string _elasticity_tensor_name
 
MaterialProperty< RankFourTensor > & _elasticity_tensor
 
MaterialProperty< Real > & _effective_stiffness
 
const Function *const _prefactor_function
 prefactor function to multiply the elasticity tensor with More...
 

Private Attributes

std::map< MaterialPropertyName, std::set< Guarantee > > _guarantees
 

Detailed Description

ComputeIsotropicElasticityTensor defines an elasticity tensor material for isotropic materials.

Definition at line 23 of file ComputeIsotropicElasticityTensor.h.

Constructor & Destructor Documentation

◆ ComputeIsotropicElasticityTensor()

ComputeIsotropicElasticityTensor::ComputeIsotropicElasticityTensor ( const InputParameters &  parameters)

Definition at line 29 of file ComputeIsotropicElasticityTensor.C.

31  : ComputeElasticityTensorBase(parameters),
32  _bulk_modulus_set(parameters.isParamValid("bulk_modulus")),
33  _lambda_set(parameters.isParamValid("lambda")),
34  _poissons_ratio_set(parameters.isParamValid("poissons_ratio")),
35  _shear_modulus_set(parameters.isParamValid("shear_modulus")),
36  _youngs_modulus_set(parameters.isParamValid("youngs_modulus")),
37  _bulk_modulus(_bulk_modulus_set ? getParam<Real>("bulk_modulus") : -1),
38  _lambda(_lambda_set ? getParam<Real>("lambda") : -1),
39  _poissons_ratio(_poissons_ratio_set ? getParam<Real>("poissons_ratio") : -1),
40  _shear_modulus(_shear_modulus_set ? getParam<Real>("shear_modulus") : -1),
41  _youngs_modulus(_youngs_modulus_set ? getParam<Real>("youngs_modulus") : -1),
42  _effective_stiffness_local(parameters.isParamValid("effective_stiffness_local"))
43 {
44  unsigned int num_elastic_constants = _bulk_modulus_set + _lambda_set + _poissons_ratio_set +
46  if (num_elastic_constants != 2)
47  mooseError("Exactly two elastic constants must be defined for material '" + name() + "'.");
48 
49  // all tensors created by this class are always isotropic
51  issueGuarantee("effective_stiffness", Guarantee::ISOTROPIC);
52  if (!isParamValid("elasticity_tensor_prefactor"))
54 
55  if (_bulk_modulus_set && _bulk_modulus <= 0.0)
56  mooseError("Bulk modulus must be positive in material '" + name() + "'.");
57 
58  if (_poissons_ratio_set && (_poissons_ratio <= -1.0 || _poissons_ratio >= 0.5))
59  mooseError("Poissons ratio must be greater than -1 and less than 0.5 in "
60  "material '" +
61  name() + "'.");
62 
64  mooseError("Shear modulus must not be negative in material '" + name() + "'.");
65 
67  mooseError("Youngs modulus must be positive in material '" + name() + "'.");
68 
69  std::vector<Real> iso_const(2);
70  Real elas_mod;
71  Real poiss_rat;
72 
74  {
75  _Cijkl.fillSymmetricIsotropicEandNu(_youngs_modulus, _poissons_ratio);
77  std::max(std::sqrt((_youngs_modulus * (1 - _poissons_ratio)) /
78  ((1 + _poissons_ratio) * (1 - 2 * _poissons_ratio))),
79  std::sqrt(_youngs_modulus / (2 * (1 + _poissons_ratio))));
80  return;
81  }
82 
84  {
85  iso_const[0] = _lambda;
86  iso_const[1] = _shear_modulus;
87  elas_mod = (_shear_modulus * (3 * _lambda + 2 * _shear_modulus)) / (_lambda + _shear_modulus);
88  poiss_rat = _lambda / (2 * (_lambda + _shear_modulus));
90  std::max(std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
91  std::sqrt(_shear_modulus));
92  }
94  {
95  iso_const[0] = _bulk_modulus - 2.0 / 3.0 * _shear_modulus;
96  iso_const[1] = _shear_modulus;
97  elas_mod = (9 * _bulk_modulus * _shear_modulus) / (3 * _bulk_modulus + _shear_modulus);
98  poiss_rat =
99  (3 * _bulk_modulus - 2 * _shear_modulus) / (2 * (3 * _bulk_modulus + _shear_modulus));
101  std::max(std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
102  std::sqrt(_shear_modulus));
103  }
105  {
106  iso_const[0] = 3.0 * _bulk_modulus * _poissons_ratio / (1.0 + _poissons_ratio);
107  iso_const[1] =
108  3.0 * _bulk_modulus * (1.0 - 2.0 * _poissons_ratio) / (2.0 * (1.0 + _poissons_ratio));
109  elas_mod = 3 * _bulk_modulus * (1 - 2 * _poissons_ratio);
110  poiss_rat = _poissons_ratio;
112  std::max(std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
113  std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
114  }
115  else if (_lambda_set && _bulk_modulus_set)
116  {
117  iso_const[0] = _lambda;
118  iso_const[1] = 3.0 * (_bulk_modulus - _lambda) / 2.0;
119  elas_mod = (9 * _bulk_modulus * (_bulk_modulus - _lambda)) / (3 * _bulk_modulus - _lambda);
120  poiss_rat = (_lambda) / ((3 * _bulk_modulus - _lambda));
122  std::max(std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
123  std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
124  }
126  {
127  iso_const[0] = _shear_modulus * (_youngs_modulus - 2.0 * _shear_modulus) /
129  iso_const[1] = _shear_modulus;
130  elas_mod = _youngs_modulus;
131  poiss_rat = (_youngs_modulus - 2 * _shear_modulus) / (2 * _shear_modulus);
133  std::max(std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
134  std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
135  }
137  {
138  iso_const[0] = 2.0 * _shear_modulus * _poissons_ratio / (1.0 - 2.0 * _poissons_ratio);
139  iso_const[1] = _shear_modulus;
140  elas_mod = (2 * _shear_modulus * (1 + _poissons_ratio));
141  poiss_rat = (_poissons_ratio);
143  std::max(std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
144  std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
145  }
147  {
148  iso_const[0] = 3.0 * _bulk_modulus * (3.0 * _bulk_modulus - _youngs_modulus) /
149  (9.0 * _bulk_modulus - _youngs_modulus);
150  iso_const[1] = 3.0 * _bulk_modulus * _youngs_modulus / (9.0 * _bulk_modulus - _youngs_modulus);
151  elas_mod = (_youngs_modulus);
152  poiss_rat = (3 * _bulk_modulus - _youngs_modulus) / (6 * _bulk_modulus);
154  std::max(std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
155  std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
156  }
157  else if (_lambda_set && _poissons_ratio_set)
158  {
159  iso_const[0] = _lambda;
160  iso_const[1] = _lambda * (1.0 - 2.0 * _poissons_ratio) / (2.0 * _poissons_ratio);
161  elas_mod = (_lambda * (1 + _poissons_ratio) * (1 - 2 * _poissons_ratio)) / (_poissons_ratio);
162  poiss_rat = (_poissons_ratio);
164  std::max(std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
165  std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
166  }
167  else if (_lambda_set && _youngs_modulus_set)
168  {
169  iso_const[0] = _lambda;
170  iso_const[1] = (_youngs_modulus - 3.0 * _lambda +
171  std::sqrt(_youngs_modulus * _youngs_modulus + 9.0 * _lambda * _lambda +
172  2.0 * _youngs_modulus * _lambda)) /
173  4.0;
174  elas_mod = (_youngs_modulus);
175  poiss_rat = (2 * _lambda) / (_youngs_modulus + _lambda +
176  std::sqrt(std::pow(_youngs_modulus, 2) + 9 * std::pow(_lambda, 2) +
177  2 * _youngs_modulus * _lambda));
179  std::max(std::sqrt((elas_mod * (1 - poiss_rat)) / ((1 + poiss_rat) * (1 - 2 * poiss_rat))),
180  std::sqrt(elas_mod / (2 * (1 + poiss_rat))));
181  }
182  else
183  mooseError("Incorrect combination of elastic properties in ComputeIsotropicElasticityTensor.");
184 
185  // Fill elasticity tensor
186  _Cijkl.fillFromInputVector(iso_const, RankFourTensor::symmetric_isotropic);
187 }

Member Function Documentation

◆ computeQpElasticityTensor()

void ComputeIsotropicElasticityTensor::computeQpElasticityTensor ( )
overrideprotectedvirtual

Implements ComputeElasticityTensorBase.

Definition at line 190 of file ComputeIsotropicElasticityTensor.C.

191 {
192  // Assign elasticity tensor at a given quad point
193  _elasticity_tensor[_qp] = _Cijkl;
194 
195  // Assign effective stiffness at a given quad point
197 }

◆ computeQpProperties()

void ComputeElasticityTensorBase::computeQpProperties ( )
protectedvirtualinherited

Definition at line 43 of file ComputeElasticityTensorBase.C.

44 {
45  _effective_stiffness[_qp] = 0; // Currently overriden by ComputeIsotropicElasticityTensor
47 
48  // Multiply by prefactor
50  {
51  _elasticity_tensor[_qp] *= _prefactor_function->value(_t, _q_point[_qp]);
52  _effective_stiffness[_qp] *= std::sqrt(_prefactor_function->value(_t, _q_point[_qp]));
53  }
54 }

◆ hasGuarantee()

bool GuaranteeProvider::hasGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
inherited

Definition at line 16 of file GuaranteeProvider.C.

17 {
18  auto it = _guarantees.find(prop_name);
19  if (it == _guarantees.end())
20  return false;
21 
22  auto it2 = it->second.find(guarantee);
23  return it2 != it->second.end();
24 }

◆ issueGuarantee()

void GuaranteeProvider::issueGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
protectedinherited

◆ revokeGuarantee()

void GuaranteeProvider::revokeGuarantee ( const MaterialPropertyName &  prop_name,
Guarantee  guarantee 
)
protectedinherited

Definition at line 34 of file GuaranteeProvider.C.

35 {
36  auto it = _guarantees.find(prop_name);
37  if (it != _guarantees.end())
38  it->second.erase(guarantee);
39 }

Referenced by ComputeElasticityTensorCP::ComputeElasticityTensorCP().

◆ validParams()

InputParameters ComputeIsotropicElasticityTensor::validParams ( )
static

Definition at line 17 of file ComputeIsotropicElasticityTensor.C.

18 {
19  InputParameters params = ComputeElasticityTensorBase::validParams();
20  params.addClassDescription("Compute a constant isotropic elasticity tensor.");
21  params.addParam<Real>("bulk_modulus", "The bulk modulus for the material.");
22  params.addParam<Real>("lambda", "Lame's first constant for the material.");
23  params.addParam<Real>("poissons_ratio", "Poisson's ratio for the material.");
24  params.addParam<Real>("shear_modulus", "The shear modulus of the material.");
25  params.addParam<Real>("youngs_modulus", "Young's modulus of the material.");
26  return params;
27 }

Member Data Documentation

◆ _base_name

const std::string ComputeElasticityTensorBase::_base_name
protectedinherited

◆ _bulk_modulus

Real ComputeIsotropicElasticityTensor::_bulk_modulus
protected

Definition at line 40 of file ComputeIsotropicElasticityTensor.h.

Referenced by ComputeIsotropicElasticityTensor().

◆ _bulk_modulus_set

bool ComputeIsotropicElasticityTensor::_bulk_modulus_set
protected

Elastic constants.

Definition at line 34 of file ComputeIsotropicElasticityTensor.h.

Referenced by ComputeIsotropicElasticityTensor().

◆ _Cijkl

RankFourTensor ComputeIsotropicElasticityTensor::_Cijkl
protected

◆ _effective_stiffness

MaterialProperty<Real>& ComputeElasticityTensorBase::_effective_stiffness
protectedinherited

◆ _effective_stiffness_local

Real ComputeIsotropicElasticityTensor::_effective_stiffness_local
protected

Effective stiffness of the element: function of material properties.

Definition at line 50 of file ComputeIsotropicElasticityTensor.h.

Referenced by ComputeIsotropicElasticityTensor(), and computeQpElasticityTensor().

◆ _elasticity_tensor

MaterialProperty<RankFourTensor>& ComputeElasticityTensorBase::_elasticity_tensor
protectedinherited

◆ _elasticity_tensor_name

std::string ComputeElasticityTensorBase::_elasticity_tensor_name
protectedinherited

◆ _guarantees

std::map<MaterialPropertyName, std::set<Guarantee> > GuaranteeProvider::_guarantees
privateinherited

◆ _lambda

Real ComputeIsotropicElasticityTensor::_lambda
protected

Definition at line 41 of file ComputeIsotropicElasticityTensor.h.

Referenced by ComputeIsotropicElasticityTensor().

◆ _lambda_set

bool ComputeIsotropicElasticityTensor::_lambda_set
protected

Definition at line 35 of file ComputeIsotropicElasticityTensor.h.

Referenced by ComputeIsotropicElasticityTensor().

◆ _poissons_ratio

Real ComputeIsotropicElasticityTensor::_poissons_ratio
protected

Definition at line 42 of file ComputeIsotropicElasticityTensor.h.

Referenced by ComputeIsotropicElasticityTensor().

◆ _poissons_ratio_set

bool ComputeIsotropicElasticityTensor::_poissons_ratio_set
protected

Definition at line 36 of file ComputeIsotropicElasticityTensor.h.

Referenced by ComputeIsotropicElasticityTensor().

◆ _prefactor_function

const Function* const ComputeElasticityTensorBase::_prefactor_function
protectedinherited

prefactor function to multiply the elasticity tensor with

Definition at line 44 of file ComputeElasticityTensorBase.h.

Referenced by ComputeLayeredCosseratElasticityTensor::computeQpElasticityTensor(), and ComputeElasticityTensorBase::computeQpProperties().

◆ _shear_modulus

Real ComputeIsotropicElasticityTensor::_shear_modulus
protected

Definition at line 43 of file ComputeIsotropicElasticityTensor.h.

Referenced by ComputeIsotropicElasticityTensor().

◆ _shear_modulus_set

bool ComputeIsotropicElasticityTensor::_shear_modulus_set
protected

Definition at line 37 of file ComputeIsotropicElasticityTensor.h.

Referenced by ComputeIsotropicElasticityTensor().

◆ _youngs_modulus

Real ComputeIsotropicElasticityTensor::_youngs_modulus
protected

Definition at line 44 of file ComputeIsotropicElasticityTensor.h.

Referenced by ComputeIsotropicElasticityTensor().

◆ _youngs_modulus_set

bool ComputeIsotropicElasticityTensor::_youngs_modulus_set
protected

Definition at line 38 of file ComputeIsotropicElasticityTensor.h.

Referenced by ComputeIsotropicElasticityTensor().


The documentation for this class was generated from the following files:
ComputeElasticityTensorBase::ComputeElasticityTensorBase
ComputeElasticityTensorBase(const InputParameters &parameters)
Definition: ComputeElasticityTensorBase.C:29
ComputeIsotropicElasticityTensor::_poissons_ratio_set
bool _poissons_ratio_set
Definition: ComputeIsotropicElasticityTensor.h:36
pow
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
Definition: ExpressionBuilder.h:673
ComputeIsotropicElasticityTensor::_lambda
Real _lambda
Definition: ComputeIsotropicElasticityTensor.h:41
ComputeElasticityTensorBase::_effective_stiffness
MaterialProperty< Real > & _effective_stiffness
Definition: ComputeElasticityTensorBase.h:41
GuaranteeProvider::_guarantees
std::map< MaterialPropertyName, std::set< Guarantee > > _guarantees
Definition: GuaranteeProvider.h:37
ComputeIsotropicElasticityTensor::_Cijkl
RankFourTensor _Cijkl
Individual elasticity tensor.
Definition: ComputeIsotropicElasticityTensor.h:47
ComputeIsotropicElasticityTensor::_bulk_modulus
Real _bulk_modulus
Definition: ComputeIsotropicElasticityTensor.h:40
ComputeIsotropicElasticityTensor::_poissons_ratio
Real _poissons_ratio
Definition: ComputeIsotropicElasticityTensor.h:42
GuaranteeProvider::issueGuarantee
void issueGuarantee(const MaterialPropertyName &prop_name, Guarantee guarantee)
Definition: GuaranteeProvider.C:27
Guarantee::CONSTANT_IN_TIME
ComputeElasticityTensorBase::computeQpElasticityTensor
virtual void computeQpElasticityTensor()=0
ComputeIsotropicElasticityTensor::_shear_modulus
Real _shear_modulus
Definition: ComputeIsotropicElasticityTensor.h:43
ComputeIsotropicElasticityTensor::_lambda_set
bool _lambda_set
Definition: ComputeIsotropicElasticityTensor.h:35
ComputeIsotropicElasticityTensor::_shear_modulus_set
bool _shear_modulus_set
Definition: ComputeIsotropicElasticityTensor.h:37
ComputeIsotropicElasticityTensor::_bulk_modulus_set
bool _bulk_modulus_set
Elastic constants.
Definition: ComputeIsotropicElasticityTensor.h:34
name
const std::string name
Definition: Setup.h:21
ComputeElasticityTensorBase::_elasticity_tensor
MaterialProperty< RankFourTensor > & _elasticity_tensor
Definition: ComputeElasticityTensorBase.h:40
ComputeIsotropicElasticityTensor::_youngs_modulus
Real _youngs_modulus
Definition: ComputeIsotropicElasticityTensor.h:44
ComputeIsotropicElasticityTensor::_youngs_modulus_set
bool _youngs_modulus_set
Definition: ComputeIsotropicElasticityTensor.h:38
ComputeElasticityTensorBase::validParams
static InputParameters validParams()
Definition: ComputeElasticityTensorBase.C:16
ComputeElasticityTensorBase::_elasticity_tensor_name
std::string _elasticity_tensor_name
Definition: ComputeElasticityTensorBase.h:38
ComputeElasticityTensorBase::_prefactor_function
const Function *const _prefactor_function
prefactor function to multiply the elasticity tensor with
Definition: ComputeElasticityTensorBase.h:44
ComputeIsotropicElasticityTensor::_effective_stiffness_local
Real _effective_stiffness_local
Effective stiffness of the element: function of material properties.
Definition: ComputeIsotropicElasticityTensor.h:50
Guarantee::ISOTROPIC