https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ElasticityTensorTools.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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
10#pragma once
11
13
15{
16
21Real elasticJacobian(const RankFourTensor & r4t,
22 unsigned int i,
23 unsigned int k,
24 const RealGradient & grad_test,
25 const RealGradient & grad_phi);
26
32Real elasticJacobianWC(const RankFourTensor & r4t,
33 unsigned int i,
34 unsigned int k,
35 const RealGradient & grad_test,
36 Real phi);
37
42Real momentJacobian(const RankFourTensor & r4t,
43 unsigned int i,
44 unsigned int k,
45 Real test,
46 const RealGradient & grad_phi);
47
53Real
54momentJacobianWC(const RankFourTensor & r4t, unsigned int i, unsigned int k, Real test, Real phi);
55
60template <typename T>
61T
63{
64 return elasticity_tensor(0, 1, 0, 1);
65}
66
71template <typename T>
72T
74{
75 const T shear_modulus = getIsotropicShearModulus(elasticity_tensor);
76 // dilatational modulus is defined as lambda plus two mu
77 const T dilatational_modulus = elasticity_tensor(0, 0, 0, 0);
78 const T lambda = dilatational_modulus - 2.0 * shear_modulus;
79 const T bulk_modulus = lambda + 2.0 * shear_modulus / 3.0;
80 return bulk_modulus;
81}
82
87template <typename T>
88T
90{
91 const T shear_modulus = getIsotropicShearModulus(elasticity_tensor);
92 // dilatational modulus is defined as lambda plus two mu
93 const T dilatational_modulus = elasticity_tensor(0, 0, 0, 0);
94 const T lambda = dilatational_modulus - 2.0 * shear_modulus;
95 const T youngs_modulus =
96 shear_modulus * (3.0 * lambda + 2.0 * shear_modulus) / (lambda + shear_modulus);
97 return youngs_modulus;
98}
99
104template <typename T>
105T
107{
108 const T poissons_ratio = elasticity_tensor(1, 1, 0, 0) /
109 (elasticity_tensor(1, 1, 1, 1) + elasticity_tensor(1, 1, 0, 0));
110 return poissons_ratio;
111}
112
113void toVoigtNotationIndexConversion(int, int &, int &);
114
115template <bool is_ad>
116void
118 const GenericRankFourTensor<is_ad> & tensor)
119{
120 std::vector<int> index_vector = {0, 1, 2, 3, 4, 5};
121 int a = 0;
122 int b = 0;
123 int c = 0;
124 int d = 0;
125 for (int i : index_vector)
126 for (int j : index_vector)
127 {
130 voigt_matrix(i, j) = tensor(a, b, c, d);
131 }
132}
133
134void toMooseVoigtNotationIndexConversion(int, int &, int &);
135
136template <bool is_ad>
137void
139 const GenericRankFourTensor<is_ad> & tensor)
140{
141 static std::vector<int> index_vector = {0, 1, 2, 3, 4, 5};
142 int a = 0;
143 int b = 0;
144 int c = 0;
145 int d = 0;
146 for (int i : index_vector)
147 for (int j : index_vector)
148 {
151 voigt_matrix(i, j) = tensor(a, b, c, d);
152 }
153}
154}
const double T
Moose::GenericType< RankFourTensor, is_ad > GenericRankFourTensor
Moose::GenericType< DenseMatrix< Real >, is_ad > GenericDenseMatrix
void toVoigtNotationIndexConversion(int, int &, int &)
Real momentJacobian(const RankFourTensor &r4t, unsigned int i, unsigned int k, Real test, const RealGradient &grad_phi)
This is used for the moment-balancing kernel eps_ijk*stress_jk*test, when varied wrt u_k Jacobian ent...
T getIsotropicYoungsModulus(const RankFourTensorTempl< T > &elasticity_tensor)
Get the Young's modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must b...
Real elasticJacobianWC(const RankFourTensor &r4t, unsigned int i, unsigned int k, const RealGradient &grad_test, Real phi)
This is used for the standard kernel stress_ij*d(test)/dx_j, when varied wrt w_k (the cosserat rotati...
Real elasticJacobian(const RankFourTensor &r4t, unsigned int i, unsigned int k, const RealGradient &grad_test, const RealGradient &grad_phi)
This is used for the standard kernel stress_ij*d(test)/dx_j, when varied wrt u_k Jacobian entry: d(st...
T getIsotropicPoissonsRatio(const RankFourTensorTempl< T > &elasticity_tensor)
Get the Poisson's modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must...
Real momentJacobianWC(const RankFourTensor &r4t, unsigned int i, unsigned int k, Real test, Real phi)
This is used for the moment-balancing kernel eps_ijk*stress_jk*test, when varied wrt w_k (the cossera...
T getIsotropicBulkModulus(const RankFourTensorTempl< T > &elasticity_tensor)
Get the bulk modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must be i...
void toVoigtNotation(GenericDenseMatrix< is_ad > &voigt_matrix, const GenericRankFourTensor< is_ad > &tensor)
void toMooseVoigtNotationIndexConversion(int, int &, int &)
void toMooseVoigtNotation(GenericDenseMatrix< is_ad > &voigt_matrix, const GenericRankFourTensor< is_ad > &tensor)
T getIsotropicShearModulus(const RankFourTensorTempl< T > &elasticity_tensor)
Get the shear modulus for an isotropic elasticity tensor param elasticity_tensor the tensor (must be ...
Real elasticity_tensor(unsigned int i, unsigned int j, unsigned int k, unsigned int l)