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

LinearIsotropic material for use in simple applications that don't need material properties. More...

#include <LinearAnisotropicMaterial.h>

Inheritance diagram for LinearAnisotropicMaterial:
[legend]

Public Member Functions

 LinearAnisotropicMaterial (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeProperties ()
 
virtual void computeStress (const SymmTensor &strain, SymmTensor &stress)
 
virtual void computeStrain (const SymmTensor &total_strain, SymmTensor &elastic_strain)
 Will always be passed to full symmetric strain tensor. More...
 
virtual Real computeAlpha ()
 
virtual void initQpStatefulProperties () override
 
template<typename T >
MaterialProperty< T > & createProperty (const std::string &prop_name)
 
template<typename T >
const MaterialProperty< T > & getPropertyOld (const std::string &prop_name)
 

Protected Attributes

Real _material_constant_c11
 
Real _material_constant_c12
 
Real _material_constant_c44
 
Real _euler_angle_1
 
Real _euler_angle_2
 
Real _euler_angle_3
 
Real _youngs_modulus
 
Real _poissons_ratio
 
Real _t_ref
 
Real _alpha
 
SymmElasticityTensor_local_elasticity_tensor
 
Real _pi
 
Real _tol
 
const std::string _appended_property_name
 
const VariableGradient & _grad_disp_x
 
const VariableGradient & _grad_disp_y
 
const VariableGradient & _grad_disp_z
 
bool _has_temp
 
const VariableValue & _temp
 
bool _has_c
 
const VariableValue & _c
 
std::vector< VolumetricModel * > _volumetric_models
 
MaterialProperty< SymmTensor > & _stress
 
MaterialProperty< SymmElasticityTensor > & _elasticity_tensor
 
MaterialProperty< SymmElasticityTensor > & _Jacobian_mult
 
SymmTensor _d_strain_dT
 
MaterialProperty< SymmTensor > & _d_stress_dT
 
MaterialProperty< SymmTensor > & _elastic_strain
 

Detailed Description

LinearIsotropic material for use in simple applications that don't need material properties.

Definition at line 25 of file LinearAnisotropicMaterial.h.

Constructor & Destructor Documentation

◆ LinearAnisotropicMaterial()

LinearAnisotropicMaterial::LinearAnisotropicMaterial ( const InputParameters &  parameters)

Definition at line 30 of file LinearAnisotropicMaterial.C.

31  : LinearIsotropicMaterial(parameters),
32  _material_constant_c11(getParam<Real>("material_constant_c11")),
33  _material_constant_c12(getParam<Real>("material_constant_c12")),
34  _material_constant_c44(getParam<Real>("material_constant_c44")),
35  _euler_angle_1(getParam<Real>("euler_angle_1")),
36  _euler_angle_2(getParam<Real>("euler_angle_2")),
37  _euler_angle_3(getParam<Real>("euler_angle_3"))
38 {
40  aniso_elasticity_tensor->setMaterialConstantc11(_material_constant_c11);
41  aniso_elasticity_tensor->setMaterialConstantc12(_material_constant_c12);
42  aniso_elasticity_tensor->setMaterialConstantc44(_material_constant_c44);
43 
44  /* AMJ: I believe I have identified a logic bug with using inherited classes (e.g.,
45  LinearAnisotropicMaterial and non-zero Euler angles in conjunction with/inheriting from
46  LinearIsotropicMaterial. When using Euler angles = 0.0, no problem occurs. However,
47  using Euler angles != zero causes the _elasticity_tensor[_qp]=*_local_elasticity_tensor
48  to rotate with every single quadrature point, every time the Material class is
49  computed. This is due to the _local_elasticity_tensor->calculate(_qp) call. Because
50  we are dereferencing the _local_elasticity_tensor, we are actually changing the
51  original elasticity tensor that is supplied (from the input or material class
52  construction, etc). I've attempted to fix this by moving the relevant information
53  into a local copy_local_tensor variable, but (perhaps because I don't know enough
54  C++) I cannot get this to work in LinearIsotropicMaterial for an arbitrary derived class that
55  may use different derived kinds of Symm***ElasticityTensors. So... good luck, Chuck.
56  I might not be able to fix the problem, but I think I've identified it correctly. */
57 
58  aniso_elasticity_tensor->setFirstEulerAngle(_euler_angle_1);
59  aniso_elasticity_tensor->setSecondEulerAngle(_euler_angle_2);
60  aniso_elasticity_tensor->setThirdEulerAngle(_euler_angle_3);
61 
63  _local_elasticity_tensor = aniso_elasticity_tensor;
64 }
void setMaterialConstantc11(const Real c11)
Set the material constant c11; assumes cubic material.
void setMaterialConstantc44(const Real c44)
Set the material constant c44; assumes cubic material.
LinearIsotropicMaterial(const InputParameters &parameters)
void setThirdEulerAngle(const Real a3)
Set the third euler angle.
void setSecondEulerAngle(const Real a2)
Set the second euler angle.
void setFirstEulerAngle(const Real a1)
Set the first euler angle.
void setMaterialConstantc12(const Real c12)
Set the material constant c22; assumes cubic material.
SymmElasticityTensor * _local_elasticity_tensor

Member Function Documentation

◆ computeAlpha()

Real LinearIsotropicMaterial::computeAlpha ( )
protectedvirtualinherited

Definition at line 143 of file LinearIsotropicMaterial.C.

Referenced by LinearIsotropicMaterial::computeProperties().

144 {
145  return _alpha;
146 }

◆ computeProperties()

void LinearIsotropicMaterial::computeProperties ( )
protectedvirtualinherited

Definition at line 54 of file LinearIsotropicMaterial.C.

55 {
56  for (_qp = 0; _qp < _qrule->n_points(); ++_qp)
57  {
58  Real alpha = computeAlpha();
59 
61 
63 
64  SymmTensor strn(_grad_disp_x[_qp](0),
65  _grad_disp_y[_qp](1),
66  _grad_disp_z[_qp](2),
67  0.5 * (_grad_disp_x[_qp](1) + _grad_disp_y[_qp](0)),
68  0.5 * (_grad_disp_y[_qp](2) + _grad_disp_z[_qp](1)),
69  0.5 * (_grad_disp_z[_qp](0) + _grad_disp_x[_qp](2)));
70 
71  // Add in Isotropic Thermal Strain
72  if (_has_temp)
73  {
74  Real isotropic_strain = alpha * (_temp[_qp] - _t_ref);
75 
76  strn.addDiag(-isotropic_strain);
77 
79  _d_strain_dT.addDiag(-alpha);
80  }
81 
82  SymmTensor strain(strn);
83 
84  computeStress(strain, _stress[_qp]);
85  }
86 }
const VariableValue & _temp
const VariableGradient & _grad_disp_y
const VariableGradient & _grad_disp_x
MaterialProperty< SymmElasticityTensor > & _elasticity_tensor
void zero()
Definition: SymmTensor.h:276
void calculate(unsigned int qp)
Public function that will be called whenever the values for this matrix need to be filled in...
MaterialProperty< SymmTensor > & _stress
const VariableGradient & _grad_disp_z
void addDiag(Real value)
Definition: SymmTensor.h:282
SymmElasticityTensor * _local_elasticity_tensor
virtual void computeStress(const SymmTensor &strain, SymmTensor &stress)

◆ computeStrain()

void LinearIsotropicMaterial::computeStrain ( const SymmTensor total_strain,
SymmTensor elastic_strain 
)
protectedvirtualinherited

Will always be passed to full symmetric strain tensor.

What should come out is a modified strain tensor.

Definition at line 117 of file LinearIsotropicMaterial.C.

Referenced by LinearIsotropicMaterial::computeStress().

118 {
119 
120  // Multiplier that zeros out stiffness
121  // Real h = (1.0 - _c[_qp]*_c[_qp]);
122  /*Real vl = -0.05 + _c[_qp]*1.1;
123  if (vl < 0.0)
124  vl = 0.0;
125  if (vl > 1.0)
126  vl = 1.0;*/
127 
128  Real h = (1.0 + std::cos(_pi * _c[_qp])) / 2.0;
129  if (h < _tol)
130  h = _tol;
131 
132  elastic_strain = total_strain;
133  // Jacobian multiplier of the stress
135 
137  // d_stress_dT *= _dt;
138  d_stress_dT *= h;
139  _d_stress_dT[_qp] = d_stress_dT;
140 }
const VariableValue & _c
MaterialProperty< SymmElasticityTensor > & _Jacobian_mult
SymmElasticityTensor * _local_elasticity_tensor
MaterialProperty< SymmTensor > & _d_stress_dT

◆ computeStress()

void LinearIsotropicMaterial::computeStress ( const SymmTensor strain,
SymmTensor stress 
)
protectedvirtualinherited

Definition at line 89 of file LinearIsotropicMaterial.C.

Referenced by LinearIsotropicMaterial::computeProperties().

90 {
91  // Add in any extra strain components
92  SymmTensor elastic_strain;
93 
94  computeStrain(strain, elastic_strain);
95 
96  // Multiplier that zeros out stiffness
97  // Real h = (1.0 - _c[_qp]*_c[_qp]);
98  /*Real vl = -0.05 + _c[_qp]*1.1;
99  if (vl < 0.0)
100  vl = 0.0;
101  if (vl > 1.0)
102  vl = 1.0;*/
103 
104  Real h = (1.0 + std::cos(_pi * _c[_qp])) / 2.0;
105  if (h < _tol)
106  h = _tol;
107 
108  // Save that off as the elastic strain
109  _elastic_strain[_qp] = elastic_strain;
110 
111  // Create column vector
112  // C * e
113  stress = (*_local_elasticity_tensor) * h * elastic_strain;
114 }
const VariableValue & _c
MaterialProperty< SymmTensor > & _elastic_strain
virtual void computeStrain(const SymmTensor &total_strain, SymmTensor &elastic_strain)
Will always be passed to full symmetric strain tensor.

◆ createProperty()

template<typename T >
MaterialProperty<T>& SolidMechanicsMaterial::createProperty ( const std::string &  prop_name)
inlineprotectedinherited

Definition at line 59 of file SolidMechanicsMaterial.h.

60  {
61  std::string name(prop_name + _appended_property_name);
62  return declareProperty<T>(name);
63  }
const std::string name
Definition: Setup.h:22
const std::string _appended_property_name

◆ getPropertyOld()

template<typename T >
const MaterialProperty<T>& SolidMechanicsMaterial::getPropertyOld ( const std::string &  prop_name)
inlineprotectedinherited

Definition at line 66 of file SolidMechanicsMaterial.h.

67  {
68  std::string name(prop_name + _appended_property_name);
69  return getMaterialPropertyOld<T>(name);
70  }
const std::string name
Definition: Setup.h:22
const std::string _appended_property_name

◆ initQpStatefulProperties()

void SolidMechanicsMaterial::initQpStatefulProperties ( )
overrideprotectedvirtualinherited

Definition at line 32 of file SolidMechanicsMaterial.C.

33 {
34 }

Member Data Documentation

◆ _alpha

Real LinearIsotropicMaterial::_alpha
protectedinherited

Definition at line 49 of file LinearIsotropicMaterial.h.

Referenced by LinearIsotropicMaterial::computeAlpha().

◆ _appended_property_name

const std::string SolidMechanicsMaterial::_appended_property_name
protectedinherited

◆ _c

const VariableValue& SolidMechanicsMaterial::_c
protectedinherited

◆ _d_strain_dT

SymmTensor SolidMechanicsMaterial::_d_strain_dT
protectedinherited

◆ _d_stress_dT

MaterialProperty<SymmTensor>& SolidMechanicsMaterial::_d_stress_dT
protectedinherited

Definition at line 54 of file SolidMechanicsMaterial.h.

Referenced by LinearIsotropicMaterial::computeStrain().

◆ _elastic_strain

MaterialProperty<SymmTensor>& SolidMechanicsMaterial::_elastic_strain
protectedinherited

◆ _elasticity_tensor

MaterialProperty<SymmElasticityTensor>& SolidMechanicsMaterial::_elasticity_tensor
protectedinherited

◆ _euler_angle_1

Real LinearAnisotropicMaterial::_euler_angle_1
protected

Definition at line 34 of file LinearAnisotropicMaterial.h.

Referenced by LinearAnisotropicMaterial().

◆ _euler_angle_2

Real LinearAnisotropicMaterial::_euler_angle_2
protected

Definition at line 35 of file LinearAnisotropicMaterial.h.

Referenced by LinearAnisotropicMaterial().

◆ _euler_angle_3

Real LinearAnisotropicMaterial::_euler_angle_3
protected

Definition at line 36 of file LinearAnisotropicMaterial.h.

Referenced by LinearAnisotropicMaterial().

◆ _grad_disp_x

const VariableGradient& SolidMechanicsMaterial::_grad_disp_x
protectedinherited

◆ _grad_disp_y

const VariableGradient& SolidMechanicsMaterial::_grad_disp_y
protectedinherited

◆ _grad_disp_z

const VariableGradient& SolidMechanicsMaterial::_grad_disp_z
protectedinherited

◆ _has_c

bool SolidMechanicsMaterial::_has_c
protectedinherited

Definition at line 41 of file SolidMechanicsMaterial.h.

◆ _has_temp

bool SolidMechanicsMaterial::_has_temp
protectedinherited

Definition at line 38 of file SolidMechanicsMaterial.h.

Referenced by LinearIsotropicMaterial::computeProperties().

◆ _Jacobian_mult

MaterialProperty<SymmElasticityTensor>& SolidMechanicsMaterial::_Jacobian_mult
protectedinherited

◆ _local_elasticity_tensor

SymmElasticityTensor* LinearIsotropicMaterial::_local_elasticity_tensor
protectedinherited

◆ _material_constant_c11

Real LinearAnisotropicMaterial::_material_constant_c11
protected

Definition at line 31 of file LinearAnisotropicMaterial.h.

Referenced by LinearAnisotropicMaterial().

◆ _material_constant_c12

Real LinearAnisotropicMaterial::_material_constant_c12
protected

Definition at line 32 of file LinearAnisotropicMaterial.h.

Referenced by LinearAnisotropicMaterial().

◆ _material_constant_c44

Real LinearAnisotropicMaterial::_material_constant_c44
protected

Definition at line 33 of file LinearAnisotropicMaterial.h.

Referenced by LinearAnisotropicMaterial().

◆ _pi

Real LinearIsotropicMaterial::_pi
protectedinherited

◆ _poissons_ratio

Real LinearIsotropicMaterial::_poissons_ratio
protectedinherited

◆ _stress

MaterialProperty<SymmTensor>& SolidMechanicsMaterial::_stress
protectedinherited

◆ _t_ref

Real LinearIsotropicMaterial::_t_ref
protectedinherited

◆ _temp

const VariableValue& SolidMechanicsMaterial::_temp
protectedinherited

Definition at line 39 of file SolidMechanicsMaterial.h.

Referenced by LinearIsotropicMaterial::computeProperties().

◆ _tol

Real LinearIsotropicMaterial::_tol
protectedinherited

◆ _volumetric_models

std::vector<VolumetricModel *> SolidMechanicsMaterial::_volumetric_models
protectedinherited

Definition at line 44 of file SolidMechanicsMaterial.h.

◆ _youngs_modulus

Real LinearIsotropicMaterial::_youngs_modulus
protectedinherited

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