www.mooseframework.org
Linear.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #include "Linear.h"
9 #include "SolidModel.h"
10 #include "Problem.h"
11 #include "MooseMesh.h"
12 #include "libmesh/quadrature.h"
13 
14 namespace SolidMechanics
15 {
16 
17 Linear::Linear(SolidModel & solid_model,
18  const std::string & name,
19  const InputParameters & parameters)
20  : Element(solid_model, name, parameters),
21  _large_strain(solid_model.getParam<bool>("large_strain")),
22  _grad_disp_x(coupledGradient("disp_x")),
23  _grad_disp_y(coupledGradient("disp_y")),
24  _grad_disp_z(parameters.get<SubProblem *>("_subproblem")->mesh().dimension() == 3
25  ? coupledGradient("disp_z")
26  : _grad_zero),
27  _volumetric_locking_correction(solid_model.getParam<bool>("volumetric_locking_correction"))
28 {
29 }
30 
32 
33 void
34 Linear::computeStrain(const unsigned qp,
35  const SymmTensor & total_strain_old,
36  SymmTensor & total_strain_new,
37  SymmTensor & strain_increment)
38 {
39  strain_increment.xx(_grad_disp_x[qp](0));
40  strain_increment.yy(_grad_disp_y[qp](1));
41  strain_increment.zz(_grad_disp_z[qp](2));
42  strain_increment.xy(0.5 * (_grad_disp_x[qp](1) + _grad_disp_y[qp](0)));
43  strain_increment.yz(0.5 * (_grad_disp_y[qp](2) + _grad_disp_z[qp](1)));
44  strain_increment.zx(0.5 * (_grad_disp_z[qp](0) + _grad_disp_x[qp](2)));
45  if (_large_strain)
46  {
47  strain_increment.xx() += 0.5 * (_grad_disp_x[qp](0) * _grad_disp_x[qp](0) +
48  _grad_disp_y[qp](0) * _grad_disp_y[qp](0) +
49  _grad_disp_z[qp](0) * _grad_disp_z[qp](0));
50  strain_increment.yy() += 0.5 * (_grad_disp_x[qp](1) * _grad_disp_x[qp](1) +
51  _grad_disp_y[qp](1) * _grad_disp_y[qp](1) +
52  _grad_disp_z[qp](1) * _grad_disp_z[qp](1));
53  strain_increment.zz() += 0.5 * (_grad_disp_x[qp](2) * _grad_disp_x[qp](2) +
54  _grad_disp_y[qp](2) * _grad_disp_y[qp](2) +
55  _grad_disp_z[qp](2) * _grad_disp_z[qp](2));
56  strain_increment.xy() += 0.5 * (_grad_disp_x[qp](0) * _grad_disp_x[qp](1) +
57  _grad_disp_y[qp](0) * _grad_disp_y[qp](1) +
58  _grad_disp_z[qp](0) * _grad_disp_z[qp](1));
59  strain_increment.yz() += 0.5 * (_grad_disp_x[qp](1) * _grad_disp_x[qp](2) +
60  _grad_disp_y[qp](1) * _grad_disp_y[qp](2) +
61  _grad_disp_z[qp](1) * _grad_disp_z[qp](2));
62  strain_increment.zx() += 0.5 * (_grad_disp_x[qp](2) * _grad_disp_x[qp](0) +
63  _grad_disp_y[qp](2) * _grad_disp_y[qp](0) +
64  _grad_disp_z[qp](2) * _grad_disp_z[qp](0));
65  }
66 
68  {
69  // volumetric locking correction - averaging the volumertic strain over the element
70  Real volumetric_strain = 0.0;
71  Real volume = 0.0;
72  for (unsigned int qp_loop = 0; qp_loop < _solid_model.qrule()->n_points(); ++qp_loop)
73  {
74  volumetric_strain +=
75  (_grad_disp_x[qp_loop](0) + _grad_disp_y[qp_loop](1) + _grad_disp_z[qp_loop](2)) / 3.0 *
76  _solid_model.JxW(qp_loop);
77 
78  volume += _solid_model.JxW(qp_loop);
79 
80  if (_large_strain)
81  {
82  volumetric_strain += 0.5 * (_grad_disp_x[qp_loop](0) * _grad_disp_x[qp_loop](0) +
83  _grad_disp_y[qp_loop](0) * _grad_disp_y[qp_loop](0) +
84  _grad_disp_z[qp_loop](0) * _grad_disp_z[qp_loop](0)) /
85  3.0 * _solid_model.JxW(qp_loop);
86  volumetric_strain += 0.5 * (_grad_disp_x[qp_loop](1) * _grad_disp_x[qp_loop](1) +
87  _grad_disp_y[qp_loop](1) * _grad_disp_y[qp_loop](1) +
88  _grad_disp_z[qp_loop](1) * _grad_disp_z[qp_loop](1)) /
89  3.0 * _solid_model.JxW(qp_loop);
90  volumetric_strain += 0.5 * (_grad_disp_x[qp_loop](2) * _grad_disp_x[qp_loop](2) +
91  _grad_disp_y[qp_loop](2) * _grad_disp_y[qp_loop](2) +
92  _grad_disp_z[qp_loop](2) * _grad_disp_z[qp_loop](2)) /
93  3.0 * _solid_model.JxW(qp_loop);
94  }
95  }
96 
97  volumetric_strain /= volume; // average volumetric strain
98 
99  // strain increment at _qp
100  Real trace = strain_increment.trace();
101  strain_increment.xx() += volumetric_strain - trace / 3.0;
102  strain_increment.yy() += volumetric_strain - trace / 3.0;
103  strain_increment.zz() += volumetric_strain - trace / 3.0;
104  }
105 
106  total_strain_new = strain_increment;
107  strain_increment -= total_strain_old;
108 }
109 }
Real yy() const
Definition: SymmTensor.h:130
const bool _volumetric_locking_correction
Definition: Linear.h:35
virtual void computeStrain(const unsigned qp, const SymmTensor &total_strain_old, SymmTensor &total_strain_new, SymmTensor &strain_increment)
Definition: Linear.C:34
Element is the base class for all of this module&#39;s solid mechanics element formulations.
Definition: Element.h:23
const VariableGradient & _grad_disp_z
Definition: Linear.h:34
Real xx() const
Definition: SymmTensor.h:129
const VariableGradient & _grad_disp_x
Definition: Linear.h:32
const bool _large_strain
Definition: Linear.h:30
SolidModel is the base class for all this module&#39;s solid mechanics material models.
Definition: SolidModel.h:31
QBase * qrule()
Definition: SolidModel.h:53
Real zz() const
Definition: SymmTensor.h:131
Linear(SolidModel &solid_model, const std::string &name, const InputParameters &parameters)
Definition: Linear.C:17
Real trace() const
Definition: SymmTensor.h:95
Real JxW(unsigned i) const
Definition: SolidModel.h:55
Real xy() const
Definition: SymmTensor.h:132
SolidModel & _solid_model
Definition: Element.h:72
const VariableGradient & _grad_disp_y
Definition: Linear.h:33
Real yz() const
Definition: SymmTensor.h:133
Real zx() const
Definition: SymmTensor.h:134
virtual ~Linear()
Definition: Linear.C:31