https://mooseframework.inl.gov
AsymptoticExpansionHomogenizationKernel.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 
11 
13 
16 {
18  params.addClassDescription("Kernel for asymptotic expansion homogenization for elasticity");
19  params.addRequiredRangeCheckedParam<unsigned int>("component",
20  "component >= 0 & component < 3",
21  "An integer corresponding to the direction "
22  "the variable this kernel acts in. (0 for x, "
23  "1 for y, 2 for z)");
24  MooseEnum column("xx yy zz yz xz xy");
25  params.addRequiredParam<MooseEnum>("column",
26  column,
27  "The column of the material matrix this kernel acts in. "
28  "(xx, yy, zz, yz, xz, or xy)");
29 
30  params.addParam<std::string>("base_name",
31  "Optional parameter that allows the user to define "
32  "multiple mechanics material systems on the same "
33  "block, i.e. for multiple phases");
34 
35  return params;
36 }
37 
39  const InputParameters & parameters)
40  : Kernel(parameters),
41 
42  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
43  _elasticity_tensor(getMaterialPropertyByName<RankFourTensor>(_base_name + "elasticity_tensor")),
44  _component(getParam<unsigned int>("component")),
45  _column(getParam<MooseEnum>("column")),
46  _k_index({{0, 1, 2, 1, 0, 0}}),
47  _l_index({{0, 1, 2, 2, 2, 1}}),
48  _k(_k_index[_column]),
49  _l(_l_index[_column])
50 {
51 }
52 
53 Real
55 {
56  Real value = 0;
57 
58  for (unsigned j = 0; j < 3; j++)
60 
61  return value;
62 }
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
const unsigned int _component
An integer corresponding to the direction this kernel acts in.
void addRequiredParam(const std::string &name, const std::string &doc_string)
AsymptoticExpansionHomogenizationKernel(const InputParameters &parameters)
unsigned int _i
virtual const OutputTools< Real >::VariableValue & value()
registerMooseObject("SolidMechanicsApp", AsymptoticExpansionHomogenizationKernel)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableTestGradient & _grad_test
void addClassDescription(const std::string &doc_string)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const MaterialProperty< RankFourTensor > & _elasticity_tensor
void ErrorVector unsigned int
unsigned int _qp