https://mooseframework.inl.gov
HeatConduction.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 
10 #include "HeatConduction.h"
11 #include "MooseMesh.h"
12 
13 registerMooseObjectAliased("HeatTransferApp", HeatConductionKernel, "HeatConduction");
14 
17 {
19  params.addClassDescription("Diffusive heat conduction term $-\\nabla\\cdot(k\\nabla T)$ of the "
20  "thermal energy conservation equation");
21  params.addParam<MaterialPropertyName>("diffusion_coefficient",
22  "thermal_conductivity",
23  "Property name of the diffusion coefficient");
24  params.addParam<MaterialPropertyName>(
25  "diffusion_coefficient_dT",
26  "thermal_conductivity_dT",
27  "Property name of the derivative of the diffusion coefficient with respect "
28  "to the variable");
29  params.set<bool>("use_displaced_mesh") = true;
30  return params;
31 }
32 
34  : Diffusion(parameters),
35  _diffusion_coefficient(getMaterialProperty<Real>("diffusion_coefficient")),
36  _diffusion_coefficient_dT(hasMaterialProperty<Real>("diffusion_coefficient_dT")
37  ? &getMaterialProperty<Real>("diffusion_coefficient_dT")
38  : NULL)
39 {
40 }
41 
42 Real
44 {
46 }
47 
48 Real
50 {
53  jac += (*_diffusion_coefficient_dT)[_qp] * _phi[_j][_qp] * Diffusion::computeQpResidual();
54  return jac;
55 }
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