https://mooseframework.inl.gov
FVFunctorHeatConductionTimeDerivative.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 
11 
13 
16 {
18  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  params.addParam<MooseFunctorName>(
22  "specific_heat", "specific_heat", "Property name of the specific heat at constant pressure");
23  params.addParam<MooseFunctorName>("density", "density", "Property name of the density");
24  return params;
25 }
26 
28  const InputParameters & parameters)
29  : FVFunctorTimeKernel(parameters),
30  _specific_heat(getFunctor<ADReal>("specific_heat")),
31  _density(getFunctor<ADReal>("density"))
32 {
33 }
34 
35 ADReal
37 {
38  // FV kernels dont use the quadrature
39  mooseAssert(_q_point.size() == 1, "Only 1 QP per element in FV");
40  const Moose::ElemArg elem_arg = {_current_elem, /*correct_skewness=*/true};
41  const auto & time_arg = determineState();
42  return _specific_heat(elem_arg, time_arg) * _density(elem_arg, time_arg) *
44 }
FVFunctorHeatConductionTimeDerivative(const InputParameters &parameters)
const Moose::Functor< ADReal > & _specific_heat
Specific heat capacity at constant pressure.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
Moose::StateArg determineState() const
DualNumber< Real, DNDerivativeType, true > ADReal
unsigned int size() const
static InputParameters validParams()
const Elem *const & _current_elem
const MooseArray< Point > & _q_point
A finite volume kernel to add the time derivative term in the heat conduction equation, using functors for the material properties.
ADReal computeQpResidual() override
void addClassDescription(const std::string &doc_string)
const Moose::Functor< ADReal > & _density
Density.
registerMooseObject("HeatTransferApp", FVFunctorHeatConductionTimeDerivative)