www.mooseframework.org
SphericalR.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 #include "SphericalR.h"
8 
9 #include "Problem.h"
10 #include "SolidModel.h"
11 
12 namespace SolidMechanics
13 {
14 
16  const std::string & name,
17  const InputParameters & parameters)
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 }
24 
26 
27 void
28 SphericalR::computeStrain(const unsigned qp,
29  const SymmTensor & total_strain_old,
30  SymmTensor & total_strain_new,
31  SymmTensor & strain_increment)
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 }
48 }
Real yy() const
Definition: SymmTensor.h:130
Element is the base class for all of this module&#39;s solid mechanics element formulations.
Definition: Element.h:23
const Point & q_point(unsigned i) const
Definition: SolidModel.h:54
Real xx() const
Definition: SymmTensor.h:129
virtual void computeStrain(const unsigned qp, const SymmTensor &total_strain_old, SymmTensor &total_strain_new, SymmTensor &strain_increment)
Definition: SphericalR.C:28
SolidModel is the base class for all this module&#39;s solid mechanics material models.
Definition: SolidModel.h:31
const VariableGradient & _grad_disp_r
Definition: SphericalR.h:38
Real zz() const
Definition: SymmTensor.h:131
SphericalR(SolidModel &solid_model, const std::string &name, const InputParameters &parameters)
Definition: SphericalR.C:15
SolidModel & _solid_model
Definition: Element.h:72
const VariableValue & _disp_r
Definition: SphericalR.h:34