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 83 : HomogenizedHeatConduction::validParams() 16 : { 17 83 : InputParameters params = Kernel::validParams(); 18 83 : params.addClassDescription( 19 : "Kernel for asymptotic expansion homogenization for thermal conductivity"); 20 166 : params.addParam<MaterialPropertyName>("diffusion_coefficient", 21 : "thermal_conductivity", 22 : "The diffusion coefficient for the temperature gradient"); 23 166 : 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 83 : return params; 29 0 : } 30 : 31 44 : HomogenizedHeatConduction::HomogenizedHeatConduction(const InputParameters & parameters) 32 : : Kernel(parameters), 33 44 : _diffusion_coefficient(getMaterialProperty<Real>("diffusion_coefficient")), 34 132 : _component(getParam<unsigned int>("component")) 35 : { 36 44 : } 37 : 38 : Real 39 6018048 : HomogenizedHeatConduction::computeQpResidual() 40 : { 41 : // Compute positive value since we are computing a residual not a rhs 42 6018048 : return _diffusion_coefficient[_qp] * _grad_test[_i][_qp](_component); 43 : }