www.mooseframework.org
HeatConduction.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 "HeatConduction.h"
11 #include "MooseMesh.h"
12 
13 registerMooseObjectAliased("HeatTransferApp", HeatConductionKernel, "HeatConduction");
14 
17 {
19  params.addClassDescription(
20  "Computes residual/Jacobian contribution for $(k \\nabla T, \\nabla \\psi)$ term.");
21  params.addParam<MaterialPropertyName>(
22  "diffusion_coefficient", "thermal_conductivity", "Property name of the diffusivity");
23  params.addParam<MaterialPropertyName>(
24  "diffusion_coefficient_dT",
25  "thermal_conductivity_dT",
26  "Property name of the derivative of the diffusivity with respect "
27  "to the variable (Default: thermal_conductivity_dT)");
28  params.set<bool>("use_displaced_mesh") = true;
29  return params;
30 }
31 
33  : Diffusion(parameters),
34  _diffusion_coefficient(getMaterialProperty<Real>("diffusion_coefficient")),
35  _diffusion_coefficient_dT(hasMaterialProperty<Real>("diffusion_coefficient_dT")
36  ? &getMaterialProperty<Real>("diffusion_coefficient_dT")
37  : NULL)
38 {
39 }
40 
41 Real
43 {
45 }
46 
47 Real
49 {
52  jac += (*_diffusion_coefficient_dT)[_qp] * _phi[_j][_qp] * Diffusion::computeQpResidual();
53  return jac;
54 }
registerMooseObjectAliased("HeatTransferApp", HeatConductionKernel, "HeatConduction")
HeatConductionKernel(const InputParameters &parameters)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
virtual Real computeQpResidual()
static InputParameters validParams()
T & set(const std::string &name, bool quiet_mode=false)
virtual Real computeQpJacobian() override
static InputParameters validParams()
virtual Real computeQpResidual() override
const MaterialProperty< Real > & _diffusion_coefficient
virtual Real computeQpJacobian()
unsigned int _j
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const MaterialProperty< Real > *const _diffusion_coefficient_dT
void addClassDescription(const std::string &doc_string)
const VariablePhiValue & _phi
Note: This class is named HeatConductionKernel instead of HeatConduction to avoid a clash with the He...
unsigned int _qp