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 "FVHeatConductionTimeDerivative.h" 11 : 12 : registerMooseObject("HeatTransferApp", FVHeatConductionTimeDerivative); 13 : 14 : InputParameters 15 287 : FVHeatConductionTimeDerivative::validParams() 16 : { 17 287 : InputParameters params = FVTimeKernel::validParams(); 18 287 : params.addClassDescription( 19 : "AD Time derivative term $\\rho c_p \\frac{\\partial T}{\\partial t}$ of " 20 : "the heat equation for quasi-constant specific heat $c_p$ and the density $\\rho$."); 21 574 : params.addParam<MaterialPropertyName>( 22 : "specific_heat", "specific_heat", "Property name of the specific heat material property"); 23 574 : params.addParam<MaterialPropertyName>( 24 : "density_name", "density", "Property name of the density material property"); 25 287 : return params; 26 0 : } 27 : 28 154 : FVHeatConductionTimeDerivative::FVHeatConductionTimeDerivative(const InputParameters & parameters) 29 : : FVTimeKernel(parameters), 30 154 : _specific_heat(getADMaterialProperty<Real>("specific_heat")), 31 462 : _density(getADMaterialProperty<Real>("density_name")) 32 : { 33 154 : } 34 : 35 : ADReal 36 150 : FVHeatConductionTimeDerivative::computeQpResidual() 37 : { 38 150 : return _specific_heat[_qp] * _density[_qp] * FVTimeKernel::computeQpResidual(); 39 : }