www.mooseframework.org
WeakPlaneStress.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 "WeakPlaneStress.h"
9 
10 #include "Material.h"
11 #include "RankTwoTensor.h"
12 #include "RankFourTensor.h"
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<Kernel>();
19  params.addClassDescription("Plane stress kernel to provide out-of-plane strain contribution");
20  params.addParam<std::string>("base_name", "Material property base name");
21 
22  MooseEnum direction("x y z", "z");
23  params.addParam<MooseEnum>("direction", direction, "The out of plane direction");
24 
25  params.set<bool>("use_displaced_mesh") = false;
26 
27  return params;
28 }
29 
30 WeakPlaneStress::WeakPlaneStress(const InputParameters & parameters)
31  : Kernel(parameters),
32  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
33  _stress(getMaterialProperty<RankTwoTensor>(_base_name + "stress")),
34  _Jacobian_mult(getMaterialProperty<RankFourTensor>(_base_name + "Jacobian_mult")),
35  _direction(parameters.get<MooseEnum>("direction"))
36 {
37 }
38 
39 Real
41 {
42  return _stress[_qp](_direction, _direction) * _test[_i][_qp];
43 }
44 
45 Real
47 {
48  return _Jacobian_mult[_qp](_direction, _direction, _direction, _direction) * _test[_i][_qp] *
49  _phi[_j][_qp];
50 }
51 
52 Real
54 {
55  return 0.0;
56 }
virtual Real computeQpJacobian() override
InputParameters validParams< WeakPlaneStress >()
const MaterialProperty< RankFourTensor > & _Jacobian_mult
WeakPlaneStress(const InputParameters &parameters)
const MaterialProperty< RankTwoTensor > & _stress
virtual Real computeQpOffDiagJacobian(unsigned int jvar) override
const unsigned int _direction
virtual Real computeQpResidual() override