www.mooseframework.org
OutOfPlaneStress.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 #include "OutOfPlaneStress.h"
11 
12 #include "Material.h"
13 #include "SymmElasticityTensor.h"
14 
15 registerMooseObjectDeprecated("SolidMechanicsApp", OutOfPlaneStress, "07/30/2020 24:00");
16 
17 template <>
18 InputParameters
20 {
21  InputParameters params = validParams<Kernel>();
22  params.addCoupledVar("disp_x", "The x displacement");
23  params.addCoupledVar("disp_y", "The y displacement");
24  params.addCoupledVar("temp", "The temperature");
25  params.addParam<std::string>(
26  "appended_property_name", "", "Name appended to material properties to make them unique");
27 
28  params.set<bool>("use_displaced_mesh") = true;
29 
30  return params;
31 }
32 
33 OutOfPlaneStress::OutOfPlaneStress(const InputParameters & parameters)
34  : Kernel(parameters),
35  _stress(getMaterialProperty<SymmTensor>("stress" +
36  getParam<std::string>("appended_property_name"))),
37  _Jacobian_mult(getMaterialProperty<SymmElasticityTensor>(
38  "Jacobian_mult" + getParam<std::string>("appended_property_name"))),
39  _d_stress_dT(getMaterialProperty<SymmTensor>("d_stress_dT" +
40  getParam<std::string>("appended_property_name"))),
41  _xdisp_coupled(isCoupled("disp_x")),
42  _ydisp_coupled(isCoupled("disp_y")),
43  _temp_coupled(isCoupled("temp")),
44  _xdisp_var(_xdisp_coupled ? coupled("disp_x") : 0),
45  _ydisp_var(_ydisp_coupled ? coupled("disp_y") : 0),
46  _temp_var(_temp_coupled ? coupled("temp") : 0)
47 {
48  mooseDeprecated(name(), ": OutOfPlaneStress is deprecated. \
49  The solid_mechanics module will be removed from MOOSE on July 31, 2020. \
50  Please update your input files to utilize the tensor_mechanics equivalents of \
51  models based on solid_mechanics. A detailed migration guide that was developed \
52  for BISON, but which is generally applicable to any MOOSE model is available at: \
53  https://mooseframework.org/bison/tutorials/mechanics_conversion/overview.html");
54 }
55 
56 Real
58 {
59  return _stress[_qp].component(2) * _test[_i][_qp];
60 }
61 
62 Real
64 {
65  Real C33 = _Jacobian_mult[_qp].valueAtIndex(11);
66  return C33 * _test[_i][_qp] * _phi[_j][_qp];
67 }
68 
69 Real
71 {
72  return 0;
73 }
SymmElasticityTensor.h
SymmElasticityTensor
This class defines a basic set of capabilities any elasticity tensor should have.
Definition: SymmElasticityTensor.h:55
OutOfPlaneStress
Definition: OutOfPlaneStress.h:22
OutOfPlaneStress::OutOfPlaneStress
OutOfPlaneStress(const InputParameters &parameters)
Definition: OutOfPlaneStress.C:33
name
const std::string name
Definition: Setup.h:21
OutOfPlaneStress::computeQpJacobian
virtual Real computeQpJacobian()
Definition: OutOfPlaneStress.C:63
OutOfPlaneStress::_stress
const MaterialProperty< SymmTensor > & _stress
Definition: OutOfPlaneStress.h:34
SymmTensor
Definition: SymmTensor.h:21
OutOfPlaneStress::computeQpResidual
virtual Real computeQpResidual()
Definition: OutOfPlaneStress.C:57
OutOfPlaneStress::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned int jvar)
Definition: OutOfPlaneStress.C:70
OutOfPlaneStress::_Jacobian_mult
const MaterialProperty< SymmElasticityTensor > & _Jacobian_mult
Definition: OutOfPlaneStress.h:35
registerMooseObjectDeprecated
registerMooseObjectDeprecated("SolidMechanicsApp", OutOfPlaneStress, "07/30/2020 24:00")
OutOfPlaneStress.h
validParams< OutOfPlaneStress >
InputParameters validParams< OutOfPlaneStress >()
Definition: OutOfPlaneStress.C:19