www.mooseframework.org
ADHeatConductionTimeDerivative.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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  ADTimeDerivative,
17  params.addClassDescription(
18  "AD Time derivative term $\\rho c_p \\frac{\\partial T}{\\partial t}$ of "
19  "the heat equation for quasi-constant specific heat $c_p$ and the density $\\rho$.");
20  params.set<bool>("use_displaced_mesh") = true;
21  params.addParam<MaterialPropertyName>("specific_heat",
22  "specific_heat",
23  "Property name of the specific heat material property");
24  params.addParam<MaterialPropertyName>("density_name",
25  "density",
26  "Property name of the density material property"););
27 
28 template <ComputeStage compute_stage>
30  const InputParameters & parameters)
31  : ADTimeDerivative<compute_stage>(parameters),
32  _specific_heat(adGetADMaterialProperty<Real>("specific_heat")),
33  _density(adGetADMaterialProperty<Real>("density_name"))
34 {
35 }
36 
37 template <ComputeStage compute_stage>
38 ADResidual
40 {
41  return _specific_heat[_qp] * _density[_qp] *
42  ADTimeDerivative<compute_stage>::precomputeQpResidual();
43 }
virtual ADResidual precomputeQpResidual() override
ADHeatConductionTimeDerivative(const InputParameters &parameters)
registerADMooseObject("HeatConductionApp", ADHeatConductionTimeDerivative)
defineADValidParams(ADHeatConductionTimeDerivative, ADTimeDerivative, params.addClassDescription("AD Time derivative term $\ho c_p \rac{\artial T}{\artial t}$ of " "the heat equation for quasi-constant specific heat $c_p$ and the density $\ho$.");params.set< bool >("use_displaced_mesh")=true;params.addParam< MaterialPropertyName >("specific_heat", "specific_heat", "Property name of the specific heat material property");params.addParam< MaterialPropertyName >("density_name", "density", "Property name of the density material property");)