www.mooseframework.org
SolidMechanicsMaterial.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 
9 #include "Problem.h"
10 #include "VolumetricModel.h"
11 #include "MooseMesh.h"
12 
13 template <>
14 InputParameters
16 {
17  InputParameters params = validParams<Material>();
18  params.addParam<std::string>(
19  "appended_property_name", "", "Name appended to material properties to make them unique");
20  params.addRequiredCoupledVar("disp_x", "The x displacement");
21  params.addRequiredCoupledVar("disp_y", "The y displacement");
22  params.addCoupledVar("disp_z", "The z displacement");
23  params.addCoupledVar("temp", "The temperature if you want thermal expansion.");
24  params.addCoupledVar("c", "variable that zeros out the stiffness");
25 
26  return params;
27 }
28 
29 void
31 {
32 }
33 
34 SolidMechanicsMaterial::SolidMechanicsMaterial(const InputParameters & parameters)
35  : Material(parameters),
36  _appended_property_name(getParam<std::string>("appended_property_name")),
37  _grad_disp_x(coupledGradient("disp_x")),
38  _grad_disp_y(coupledGradient("disp_y")),
39  _grad_disp_z(_mesh.dimension() == 3 ? coupledGradient("disp_z") : _grad_zero),
40  _has_temp(isCoupled("temp")),
41  _temp(_has_temp ? coupledValue("temp") : _zero),
42  _has_c(isCoupled("c")),
43  _c(_has_c ? coupledValue("c") : _zero),
45  _stress(createProperty<SymmTensor>("stress")),
48  _d_strain_dT(),
49  _d_stress_dT(createProperty<SymmTensor>("d_stress_dT")),
50  _elastic_strain(createProperty<SymmTensor>("elastic_strain"))
51 {
52 }
This class defines a basic set of capabilities any elasticity tensor should have. ...
const VariableValue & _c
std::vector< VolumetricModel * > _volumetric_models
MaterialProperty< SymmTensor > & _elastic_strain
const VariableValue & _temp
InputParameters validParams< SolidMechanicsMaterial >()
const VariableGradient & _grad_disp_y
const VariableGradient & _grad_disp_x
MaterialProperty< SymmElasticityTensor > & _elasticity_tensor
SolidMechanicsMaterial(const InputParameters &parameters)
const std::string _appended_property_name
MaterialProperty< T > & createProperty(const std::string &prop_name)
MaterialProperty< SymmTensor > & _stress
virtual void initQpStatefulProperties() override
const VariableGradient & _grad_disp_z
MaterialProperty< SymmElasticityTensor > & _Jacobian_mult
MaterialProperty< SymmTensor > & _d_stress_dT