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 "HomogenizedHeatConduction.h" 11 : 12 : registerMooseObject("HeatTransferApp", HomogenizedHeatConduction); 13 : 14 : InputParameters 15 175 : HomogenizedHeatConduction::validParams() 16 : { 17 175 : InputParameters params = Kernel::validParams(); 18 175 : params.addClassDescription( 19 : "Kernel for asymptotic expansion homogenization for thermal conductivity"); 20 350 : params.addParam<MaterialPropertyName>("diffusion_coefficient", 21 : "thermal_conductivity", 22 : "The diffusion coefficient for the temperature gradient"); 23 350 : params.addRequiredRangeCheckedParam<unsigned int>( 24 : "component", 25 : "component < 3", 26 : "An integer corresponding to the direction the variable this " 27 : "kernel acts in. (0 for x, 1 for y, 2 for z)"); 28 175 : return params; 29 0 : } 30 : 31 94 : HomogenizedHeatConduction::HomogenizedHeatConduction(const InputParameters & parameters) 32 : : Kernel(parameters), 33 94 : _diffusion_coefficient(getMaterialProperty<Real>("diffusion_coefficient")), 34 282 : _component(getParam<unsigned int>("component")) 35 : { 36 94 : } 37 : 38 : Real 39 9061632 : HomogenizedHeatConduction::computeQpResidual() 40 : { 41 : // Compute positive value since we are computing a residual not a rhs 42 9061632 : return _diffusion_coefficient[_qp] * _grad_test[_i][_qp](_component); 43 : }