www.mooseframework.org
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
SolidMechanics::SphericalR Class Reference

#include <SphericalR.h>

Inheritance diagram for SolidMechanics::SphericalR:
[legend]

Public Member Functions

 SphericalR (SolidModel &solid_model, const std::string &name, const InputParameters &parameters)
 
virtual ~SphericalR ()
 
virtual void init ()
 
virtual void computeDeformationGradient (unsigned int, ColumnMajorMatrix &)
 
virtual Real volumeRatioOld (unsigned) const
 
virtual void finalizeStress (std::vector< SymmTensor * > &)
 Rotate stress to current configuration. More...
 
void fillMatrix (unsigned int qp, const VariableGradient &grad_x, const VariableGradient &grad_y, const VariableGradient &grad_z, ColumnMajorMatrix &A)
 

Static Public Member Functions

static Real detMatrix (const ColumnMajorMatrix &A)
 
static void invertMatrix (const ColumnMajorMatrix &A, ColumnMajorMatrix &Ainv)
 
static void rotateSymmetricTensor (const ColumnMajorMatrix &R, const RealTensorValue &T, RealTensorValue &result)
 
static void rotateSymmetricTensor (const ColumnMajorMatrix &R, const SymmTensor &T, SymmTensor &result)
 
static void unrotateSymmetricTensor (const ColumnMajorMatrix &R, const SymmTensor &T, SymmTensor &result)
 
static void polarDecompositionEigen (const ColumnMajorMatrix &Fhat, ColumnMajorMatrix &Rhat, SymmTensor &strain_increment)
 

Protected Member Functions

virtual void computeStrain (const unsigned qp, const SymmTensor &total_strain_old, SymmTensor &total_strain_new, SymmTensor &strain_increment)
 
virtual unsigned int getNumKnownCrackDirs () const
 

Protected Attributes

const VariableValue & _disp_r
 
const bool _large_strain
 
const VariableGradient & _grad_disp_r
 
SolidModel_solid_model
 

Detailed Description

Definition at line 18 of file SphericalR.h.

Constructor & Destructor Documentation

SolidMechanics::SphericalR::SphericalR ( SolidModel solid_model,
const std::string &  name,
const InputParameters &  parameters 
)

Definition at line 15 of file SphericalR.C.

18  : Element(solid_model, name, parameters),
19  _disp_r(coupledValue("disp_r")),
20  _large_strain(solid_model.getParam<bool>("large_strain")),
21  _grad_disp_r(coupledGradient("disp_r"))
22 {
23 }
Element(SolidModel &solid_model, const std::string &name, const InputParameters &parameters)
Definition: Element.C:14
const VariableGradient & _grad_disp_r
Definition: SphericalR.h:38
const VariableValue & _disp_r
Definition: SphericalR.h:34
SolidMechanics::SphericalR::~SphericalR ( )
virtual

Definition at line 25 of file SphericalR.C.

25 {}

Member Function Documentation

virtual void SolidMechanics::Element::computeDeformationGradient ( unsigned int  ,
ColumnMajorMatrix &   
)
inlinevirtualinherited

Reimplemented in SolidMechanics::NonlinearPlaneStrain, SolidMechanics::Nonlinear3D, SolidMechanics::NonlinearRZ, and SolidMechanics::PlaneStrain.

Definition at line 48 of file Element.h.

Referenced by SolidModel::computeEshelby().

49  {
50  mooseError("computeDeformationGradient not defined for element type used");
51  }
void SolidMechanics::SphericalR::computeStrain ( const unsigned  qp,
const SymmTensor total_strain_old,
SymmTensor total_strain_new,
SymmTensor strain_increment 
)
protectedvirtual

Implements SolidMechanics::Element.

Definition at line 28 of file SphericalR.C.

32 {
33  strain_increment.xx() = _grad_disp_r[qp](0);
34  strain_increment.yy() =
35  (_solid_model.q_point(qp)(0) != 0.0 ? _disp_r[qp] / _solid_model.q_point(qp)(0) : 0.0);
36  strain_increment.zz() = strain_increment.yy();
37  if (_large_strain)
38  {
39  strain_increment.xx() += 0.5 * (_grad_disp_r[qp](0) * _grad_disp_r[qp](0));
40  strain_increment.yy() += 0.5 * (strain_increment.yy() * strain_increment.yy());
41  strain_increment.zz() += 0.5 * (strain_increment.zz() * strain_increment.zz());
42  }
43 
44  total_strain_new = strain_increment;
45 
46  strain_increment -= total_strain_old;
47 }
Real yy() const
Definition: SymmTensor.h:130
const Point & q_point(unsigned i) const
Definition: SolidModel.h:54
Real xx() const
Definition: SymmTensor.h:129
const VariableGradient & _grad_disp_r
Definition: SphericalR.h:38
Real zz() const
Definition: SymmTensor.h:131
SolidModel & _solid_model
Definition: Element.h:72
const VariableValue & _disp_r
Definition: SphericalR.h:34
Real SolidMechanics::Element::detMatrix ( const ColumnMajorMatrix &  A)
staticinherited

Definition at line 28 of file Element.C.

Referenced by SolidModel::computeEshelby(), SolidMechanics::Nonlinear3D::computeIncrementalDeformationGradient(), SolidMechanics::NonlinearRZ::computeIncrementalDeformationGradient(), SolidMechanics::NonlinearPlaneStrain::computeIncrementalDeformationGradient(), SolidMechanics::Element::invertMatrix(), SolidMechanics::Nonlinear3D::volumeRatioOld(), SolidMechanics::NonlinearRZ::volumeRatioOld(), and SolidMechanics::NonlinearPlaneStrain::volumeRatioOld().

29 {
30  mooseAssert(A.n() == 3 && A.m() == 3, "detMatrix requires 3x3 matrix");
31 
32  Real Axx = A(0, 0);
33  Real Axy = A(0, 1);
34  Real Axz = A(0, 2);
35  Real Ayx = A(1, 0);
36  Real Ayy = A(1, 1);
37  Real Ayz = A(1, 2);
38  Real Azx = A(2, 0);
39  Real Azy = A(2, 1);
40  Real Azz = A(2, 2);
41 
42  return Axx * Ayy * Azz + Axy * Ayz * Azx + Axz * Ayx * Azy - Azx * Ayy * Axz - Azy * Ayz * Axx -
43  Azz * Ayx * Axy;
44 }
void SolidMechanics::Element::fillMatrix ( unsigned int  qp,
const VariableGradient &  grad_x,
const VariableGradient &  grad_y,
const VariableGradient &  grad_z,
ColumnMajorMatrix &  A 
)
inherited

Definition at line 225 of file Element.C.

Referenced by SolidMechanics::Nonlinear3D::computeIncrementalDeformationGradient(), and SolidMechanics::Element::getNumKnownCrackDirs().

230 {
231  A(0, 0) = grad_x[qp](0);
232  A(0, 1) = grad_x[qp](1);
233  A(0, 2) = grad_x[qp](2);
234  A(1, 0) = grad_y[qp](0);
235  A(1, 1) = grad_y[qp](1);
236  A(1, 2) = grad_y[qp](2);
237  A(2, 0) = grad_z[qp](0);
238  A(2, 1) = grad_z[qp](1);
239  A(2, 2) = grad_z[qp](2);
240 }
virtual void SolidMechanics::Element::finalizeStress ( std::vector< SymmTensor * > &  )
inlinevirtualinherited

Rotate stress to current configuration.

Reimplemented in SolidMechanics::Nonlinear.

Definition at line 61 of file Element.h.

Referenced by SolidModel::finalizeStress().

61 {}
virtual unsigned int SolidMechanics::SphericalR::getNumKnownCrackDirs ( ) const
inlineprotectedvirtual

Reimplemented from SolidMechanics::Element.

Definition at line 32 of file SphericalR.h.

32 { return 2; }
virtual void SolidMechanics::Element::init ( )
inlinevirtualinherited

Reimplemented in SolidMechanics::Nonlinear.

Definition at line 46 of file Element.h.

Referenced by SolidModel::computeProperties().

46 {}
void SolidMechanics::Element::invertMatrix ( const ColumnMajorMatrix &  A,
ColumnMajorMatrix &  Ainv 
)
staticinherited

Definition at line 49 of file Element.C.

Referenced by SolidModel::computeEshelby(), SolidMechanics::Nonlinear3D::computeIncrementalDeformationGradient(), SolidMechanics::NonlinearRZ::computeIncrementalDeformationGradient(), SolidMechanics::NonlinearPlaneStrain::computeIncrementalDeformationGradient(), and SolidMechanics::Element::polarDecompositionEigen().

50 {
51  Real Axx = A(0, 0);
52  Real Axy = A(0, 1);
53  Real Axz = A(0, 2);
54  Real Ayx = A(1, 0);
55  Real Ayy = A(1, 1);
56  Real Ayz = A(1, 2);
57  Real Azx = A(2, 0);
58  Real Azy = A(2, 1);
59  Real Azz = A(2, 2);
60 
61  mooseAssert(detMatrix(A) > 0, "Matrix is not positive definite!");
62  Real detInv = 1 / detMatrix(A);
63 
64  Ainv(0, 0) = +(Ayy * Azz - Azy * Ayz) * detInv;
65  Ainv(0, 1) = -(Axy * Azz - Azy * Axz) * detInv;
66  Ainv(0, 2) = +(Axy * Ayz - Ayy * Axz) * detInv;
67  Ainv(1, 0) = -(Ayx * Azz - Azx * Ayz) * detInv;
68  Ainv(1, 1) = +(Axx * Azz - Azx * Axz) * detInv;
69  Ainv(1, 2) = -(Axx * Ayz - Ayx * Axz) * detInv;
70  Ainv(2, 0) = +(Ayx * Azy - Azx * Ayy) * detInv;
71  Ainv(2, 1) = -(Axx * Azy - Azx * Axy) * detInv;
72  Ainv(2, 2) = +(Axx * Ayy - Ayx * Axy) * detInv;
73 }
static Real detMatrix(const ColumnMajorMatrix &A)
Definition: Element.C:28
void SolidMechanics::Element::polarDecompositionEigen ( const ColumnMajorMatrix &  Fhat,
ColumnMajorMatrix &  Rhat,
SymmTensor strain_increment 
)
staticinherited

Definition at line 182 of file Element.C.

Referenced by SolidMechanics::Nonlinear::computeStrainAndRotationIncrement().

185 {
186  const int ND = 3;
187 
188  ColumnMajorMatrix eigen_value(ND, 1), eigen_vector(ND, ND);
189  ColumnMajorMatrix n1(ND, 1), n2(ND, 1), n3(ND, 1), N1(ND, 1), N2(ND, 1), N3(ND, 1);
190 
191  ColumnMajorMatrix Chat = Fhat.transpose() * Fhat;
192 
193  Chat.eigen(eigen_value, eigen_vector);
194 
195  for (int i = 0; i < ND; i++)
196  {
197  N1(i) = eigen_vector(i, 0);
198  N2(i) = eigen_vector(i, 1);
199  N3(i) = eigen_vector(i, 2);
200  }
201 
202  const Real lamda1 = std::sqrt(eigen_value(0));
203  const Real lamda2 = std::sqrt(eigen_value(1));
204  const Real lamda3 = std::sqrt(eigen_value(2));
205 
206  const Real log1 = std::log(lamda1);
207  const Real log2 = std::log(lamda2);
208  const Real log3 = std::log(lamda3);
209 
210  ColumnMajorMatrix Uhat =
211  N1 * N1.transpose() * lamda1 + N2 * N2.transpose() * lamda2 + N3 * N3.transpose() * lamda3;
212 
213  ColumnMajorMatrix invUhat(ND, ND);
214  invertMatrix(Uhat, invUhat);
215 
216  Rhat = Fhat * invUhat;
217 
218  strain_increment =
219  N1 * N1.transpose() * log1 + N2 * N2.transpose() * log2 + N3 * N3.transpose() * log3;
220 }
static void invertMatrix(const ColumnMajorMatrix &A, ColumnMajorMatrix &Ainv)
Definition: Element.C:49
void SolidMechanics::Element::rotateSymmetricTensor ( const ColumnMajorMatrix &  R,
const RealTensorValue &  T,
RealTensorValue &  result 
)
staticinherited

Definition at line 78 of file Element.C.

Referenced by SolidMechanics::Nonlinear::finalizeStress().

81 {
82 
83  // R T Rt
84  // 00 01 02 00 01 02 00 10 20
85  // 10 11 12 * 10 11 12 * 01 11 21
86  // 20 21 22 20 21 22 02 12 22
87  //
88  const Real T00 = R(0, 0) * T(0, 0) + R(0, 1) * T(1, 0) + R(0, 2) * T(2, 0);
89  const Real T01 = R(0, 0) * T(0, 1) + R(0, 1) * T(1, 1) + R(0, 2) * T(2, 1);
90  const Real T02 = R(0, 0) * T(0, 2) + R(0, 1) * T(1, 2) + R(0, 2) * T(2, 2);
91 
92  const Real T10 = R(1, 0) * T(0, 0) + R(1, 1) * T(1, 0) + R(1, 2) * T(2, 0);
93  const Real T11 = R(1, 0) * T(0, 1) + R(1, 1) * T(1, 1) + R(1, 2) * T(2, 1);
94  const Real T12 = R(1, 0) * T(0, 2) + R(1, 1) * T(1, 2) + R(1, 2) * T(2, 2);
95 
96  const Real T20 = R(2, 0) * T(0, 0) + R(2, 1) * T(1, 0) + R(2, 2) * T(2, 0);
97  const Real T21 = R(2, 0) * T(0, 1) + R(2, 1) * T(1, 1) + R(2, 2) * T(2, 1);
98  const Real T22 = R(2, 0) * T(0, 2) + R(2, 1) * T(1, 2) + R(2, 2) * T(2, 2);
99 
100  result = RealTensorValue(T00 * R(0, 0) + T01 * R(0, 1) + T02 * R(0, 2),
101  T00 * R(1, 0) + T01 * R(1, 1) + T02 * R(1, 2),
102  T00 * R(2, 0) + T01 * R(2, 1) + T02 * R(2, 2),
103 
104  T10 * R(0, 0) + T11 * R(0, 1) + T12 * R(0, 2),
105  T10 * R(1, 0) + T11 * R(1, 1) + T12 * R(1, 2),
106  T10 * R(2, 0) + T11 * R(2, 1) + T12 * R(2, 2),
107 
108  T20 * R(0, 0) + T21 * R(0, 1) + T22 * R(0, 2),
109  T20 * R(1, 0) + T21 * R(1, 1) + T22 * R(1, 2),
110  T20 * R(2, 0) + T21 * R(2, 1) + T22 * R(2, 2));
111 }
void SolidMechanics::Element::rotateSymmetricTensor ( const ColumnMajorMatrix &  R,
const SymmTensor T,
SymmTensor result 
)
staticinherited

Definition at line 116 of file Element.C.

119 {
120 
121  // R T Rt
122  // 00 01 02 00 01 02 00 10 20
123  // 10 11 12 * 10 11 12 * 01 11 21
124  // 20 21 22 20 21 22 02 12 22
125  //
126  const Real T00 = R(0, 0) * T.xx() + R(0, 1) * T.xy() + R(0, 2) * T.zx();
127  const Real T01 = R(0, 0) * T.xy() + R(0, 1) * T.yy() + R(0, 2) * T.yz();
128  const Real T02 = R(0, 0) * T.zx() + R(0, 1) * T.yz() + R(0, 2) * T.zz();
129 
130  const Real T10 = R(1, 0) * T.xx() + R(1, 1) * T.xy() + R(1, 2) * T.zx();
131  const Real T11 = R(1, 0) * T.xy() + R(1, 1) * T.yy() + R(1, 2) * T.yz();
132  const Real T12 = R(1, 0) * T.zx() + R(1, 1) * T.yz() + R(1, 2) * T.zz();
133 
134  const Real T20 = R(2, 0) * T.xx() + R(2, 1) * T.xy() + R(2, 2) * T.zx();
135  const Real T21 = R(2, 0) * T.xy() + R(2, 1) * T.yy() + R(2, 2) * T.yz();
136  const Real T22 = R(2, 0) * T.zx() + R(2, 1) * T.yz() + R(2, 2) * T.zz();
137 
138  result.xx(T00 * R(0, 0) + T01 * R(0, 1) + T02 * R(0, 2));
139  result.yy(T10 * R(1, 0) + T11 * R(1, 1) + T12 * R(1, 2));
140  result.zz(T20 * R(2, 0) + T21 * R(2, 1) + T22 * R(2, 2));
141  result.xy(T00 * R(1, 0) + T01 * R(1, 1) + T02 * R(1, 2));
142  result.yz(T10 * R(2, 0) + T11 * R(2, 1) + T12 * R(2, 2));
143  result.zx(T00 * R(2, 0) + T01 * R(2, 1) + T02 * R(2, 2));
144 }
Real yy() const
Definition: SymmTensor.h:130
Real xx() const
Definition: SymmTensor.h:129
Real zz() const
Definition: SymmTensor.h:131
Real xy() const
Definition: SymmTensor.h:132
Real yz() const
Definition: SymmTensor.h:133
Real zx() const
Definition: SymmTensor.h:134
void SolidMechanics::Element::unrotateSymmetricTensor ( const ColumnMajorMatrix &  R,
const SymmTensor T,
SymmTensor result 
)
staticinherited

Definition at line 149 of file Element.C.

152 {
153 
154  // Rt T R
155  // 00 10 20 00 01 02 00 01 02
156  // 01 11 21 * 10 11 12 * 10 11 12
157  // 02 12 22 20 21 22 20 21 22
158  //
159  const Real T00 = R(0, 0) * T.xx() + R(1, 0) * T.xy() + R(2, 0) * T.zx();
160  const Real T01 = R(0, 0) * T.xy() + R(1, 0) * T.yy() + R(2, 0) * T.yz();
161  const Real T02 = R(0, 0) * T.zx() + R(1, 0) * T.yz() + R(2, 0) * T.zz();
162 
163  const Real T10 = R(0, 1) * T.xx() + R(1, 1) * T.xy() + R(2, 1) * T.zx();
164  const Real T11 = R(0, 1) * T.xy() + R(1, 1) * T.yy() + R(2, 1) * T.yz();
165  const Real T12 = R(0, 1) * T.zx() + R(1, 1) * T.yz() + R(2, 1) * T.zz();
166 
167  const Real T20 = R(0, 2) * T.xx() + R(1, 2) * T.xy() + R(2, 2) * T.zx();
168  const Real T21 = R(0, 2) * T.xy() + R(1, 2) * T.yy() + R(2, 2) * T.yz();
169  const Real T22 = R(0, 2) * T.zx() + R(1, 2) * T.yz() + R(2, 2) * T.zz();
170 
171  result.xx(T00 * R(0, 0) + T01 * R(1, 0) + T02 * R(2, 0));
172  result.yy(T10 * R(0, 1) + T11 * R(1, 1) + T12 * R(2, 1));
173  result.zz(T20 * R(0, 2) + T21 * R(1, 2) + T22 * R(2, 2));
174  result.xy(T00 * R(0, 1) + T01 * R(1, 1) + T02 * R(2, 1));
175  result.yz(T10 * R(0, 2) + T11 * R(1, 2) + T12 * R(2, 2));
176  result.zx(T00 * R(0, 2) + T01 * R(1, 2) + T02 * R(2, 2));
177 }
Real yy() const
Definition: SymmTensor.h:130
Real xx() const
Definition: SymmTensor.h:129
Real zz() const
Definition: SymmTensor.h:131
Real xy() const
Definition: SymmTensor.h:132
Real yz() const
Definition: SymmTensor.h:133
Real zx() const
Definition: SymmTensor.h:134
virtual Real SolidMechanics::Element::volumeRatioOld ( unsigned  ) const
inlinevirtualinherited

Member Data Documentation

const VariableValue& SolidMechanics::SphericalR::_disp_r
protected

Definition at line 34 of file SphericalR.h.

Referenced by computeStrain().

const VariableGradient& SolidMechanics::SphericalR::_grad_disp_r
protected

Definition at line 38 of file SphericalR.h.

Referenced by computeStrain().

const bool SolidMechanics::SphericalR::_large_strain
protected

Definition at line 36 of file SphericalR.h.

Referenced by computeStrain().

SolidModel& SolidMechanics::Element::_solid_model
protectedinherited

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