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