https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
13registerMooseObjectAliased("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>(
22 "diffusion_coefficient", "thermal_conductivity", "Property name of the thermal conductivity");
23 params.deprecateParam("diffusion_coefficient", "thermal_conductivity", "07/01/2027");
24 params.addParam<MaterialPropertyName>(
25 "diffusion_coefficient_dT",
26 "thermal_conductivity_dT",
27 "Property name of the derivative of the thermal conductivity with respect to the variable");
28 params.deprecateParam("diffusion_coefficient_dT", "thermal_conductivity_dT", "07/01/2027");
29 params.set<bool>("use_displaced_mesh") = true;
30 return params;
31}
32
34 : Diffusion(parameters),
35 _thermal_conductivity(getMaterialProperty<Real>("thermal_conductivity")),
36 _thermal_conductivity_dT(hasMaterialProperty<Real>("thermal_conductivity_dT")
37 ? &getMaterialProperty<Real>("thermal_conductivity_dT")
38 : NULL)
39{
40}
41
42Real
47
48Real
50{
53 jac += (*_thermal_conductivity_dT)[_qp] * _phi[_j][_qp] * Diffusion::computeQpResidual();
54 return jac;
55}
registerMooseObjectAliased("HeatTransferApp", HeatConductionKernel, "HeatConduction")
virtual Real computeQpResidual() override
static InputParameters validParams()
virtual Real computeQpJacobian() override
Note: This class is named HeatConductionKernel instead of HeatConduction to avoid a clash with the He...
static InputParameters validParams()
virtual Real computeQpJacobian()
const MaterialProperty< Real > & _thermal_conductivity
virtual Real computeQpResidual()
HeatConductionKernel(const InputParameters &parameters)
const MaterialProperty< Real > *const _thermal_conductivity_dT
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void deprecateParam(const std::string &old_name, const std::string &new_name, const std::string &removal_date)
T & set(const std::string &name, bool quiet_mode=false)
unsigned int _qp
unsigned int _j
const VariablePhiValue & _phi