https://mooseframework.inl.gov
AnisoHomogenizedHeatConduction.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 thermal "
19  "conductivity when anisotropic thermal conductivities are used");
20  params.addParam<MaterialPropertyName>("diffusion_coefficient",
21  "thermal_conductivity",
22  "The diffusion coefficient for the temperature gradient");
23  params.addRequiredParam<unsigned int>(
24  "component",
25  "An integer corresponding to the direction the variable this "
26  "kernel acts in. (0 for x, 1 for y, 2 for z)");
27  return params;
28 }
29 
31  : Kernel(parameters),
32  _diffusion_coefficient(getMaterialProperty<RankTwoTensor>("diffusion_coefficient")),
33  _component(getParam<unsigned int>("component"))
34 {
35  if (_component >= _mesh.dimension())
36  paramError("Value is too large for the mesh dimension: 0, 1, 2 for 1D, 2D, 3D.");
37 }
38 
39 Real
41 {
42  // This is the matrix-vector product of the diffusion coefficient tensor with
43  // the j-th unit vector
44  RealVectorValue d_times_ej(0, 0, 0);
45  for (unsigned int j = 0; j < _mesh.dimension(); ++j)
46  d_times_ej(j) = _diffusion_coefficient[_qp](j, _component);
47  return d_times_ej * _grad_test[_i][_qp];
48 }
MooseMesh & _mesh
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
AnisoHomogenizedHeatConduction(const InputParameters &parameters)
virtual unsigned int dimension() const
registerMooseObject("HeatTransferApp", AnisoHomogenizedHeatConduction)
const MaterialProperty< RankTwoTensor > & _diffusion_coefficient
the diffusion/thermal conductivity tensor
unsigned int _i
void paramError(const std::string &param, Args... args) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableTestGradient & _grad_test
Extension of HomogenizedHeatConduction to anisotropic thermal conductivities.
void addClassDescription(const std::string &doc_string)
static const std::complex< double > j(0, 1)
Complex number "j" (also known as "i")
const unsigned int _component
the component of the homogenization characteristic function that is computed
void ErrorVector unsigned int
unsigned int _qp