Line data Source code
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 "AnisoHeatConduction.h" 11 : 12 : registerMooseObject("HeatTransferApp", AnisoHeatConduction); 13 : 14 : InputParameters 15 216 : AnisoHeatConduction::validParams() 16 : { 17 216 : InputParameters params = DerivativeMaterialInterface<Kernel>::validParams(); 18 216 : params.addClassDescription("Anisotropic diffusive heat conduction term $\\nabla \\cdot " 19 : "-\\mathbf{k} \\nabla T$ of the thermal energy conservation equation"); 20 432 : params.addParam<MaterialPropertyName>( 21 : "thermal_conductivity", 22 : "thermal_conductivity", 23 : "Material property providing thermal conductivity of the material."); 24 : 25 216 : return params; 26 0 : } 27 : 28 116 : AnisoHeatConduction::AnisoHeatConduction(const InputParameters & parameters) 29 : : DerivativeMaterialInterface<Kernel>(parameters), 30 116 : _k(getMaterialProperty<RankTwoTensor>("thermal_conductivity")), 31 232 : _dk_dT(getMaterialPropertyDerivative<RankTwoTensor>("thermal_conductivity", _var.name())) 32 : { 33 116 : } 34 : 35 : Real 36 525600 : AnisoHeatConduction::computeQpResidual() 37 : { 38 525600 : return _k[_qp] * _grad_u[_qp] * _grad_test[_i][_qp]; 39 : } 40 : 41 : Real 42 1260288 : AnisoHeatConduction::computeQpJacobian() 43 : { 44 1260288 : return _k[_qp] * _grad_phi[_j][_qp] * _grad_test[_i][_qp] + 45 1260288 : _dk_dT[_qp] * _phi[_j][_qp] * _grad_u[_qp] * _grad_test[_i][_qp]; 46 : }