www.mooseframework.org
HeatConductionTimeDerivative.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 
15 
16 InputParameters
18 {
19  InputParameters params = TimeDerivative::validParams();
20  params.addClassDescription(
21  "Time derivative term $\\rho c_p \\frac{\\partial T}{\\partial t}$ of "
22  "the heat equation for quasi-constant specific heat $c_p$ and the density $\\rho$.");
23 
24  // Density may be changing with deformation, so we must integrate
25  // over current volume by setting the use_displaced_mesh flag.
26  params.set<bool>("use_displaced_mesh") = true;
27 
28  params.addParam<MaterialPropertyName>(
29  "specific_heat", "specific_heat", "Property name of the specific heat material property");
30 
36  params.addParam<MaterialPropertyName>(
37  "density_name", "density", "Property name of the density material property");
38  return params;
39 }
40 
42  : TimeDerivative(parameters),
43  _specific_heat(getMaterialProperty<Real>("specific_heat")),
44  _density(getMaterialProperty<Real>("density_name"))
45 {
46 }
47 
48 Real
50 {
51  return _specific_heat[_qp] * _density[_qp] * TimeDerivative::computeQpResidual();
52 }
53 
54 Real
56 {
57  return _specific_heat[_qp] * _density[_qp] * TimeDerivative::computeQpJacobian();
58 }
HeatConductionTimeDerivative::validParams
static InputParameters validParams()
Contructor for Heat Equation time derivative term.
Definition: HeatConductionTimeDerivative.C:17
HeatConductionTimeDerivative.h
defineLegacyParams
defineLegacyParams(HeatConductionTimeDerivative)
HeatConductionTimeDerivative::HeatConductionTimeDerivative
HeatConductionTimeDerivative(const InputParameters &parameters)
Definition: HeatConductionTimeDerivative.C:41
validParams
InputParameters validParams()
registerMooseObject
registerMooseObject("HeatConductionApp", HeatConductionTimeDerivative)
HeatConductionTimeDerivative
A class for defining the time derivative of the heat equation.
Definition: HeatConductionTimeDerivative.h:30
HeatConductionTimeDerivative::_specific_heat
const MaterialProperty< Real > & _specific_heat
Definition: HeatConductionTimeDerivative.h:45
HeatConductionTimeDerivative::computeQpJacobian
virtual Real computeQpJacobian()
Compute the jacobian of the Heat Equation time derivative.
Definition: HeatConductionTimeDerivative.C:55
HeatConductionTimeDerivative::_density
const MaterialProperty< Real > & _density
Definition: HeatConductionTimeDerivative.h:46
HeatConductionTimeDerivative::computeQpResidual
virtual Real computeQpResidual()
Compute the residual of the Heat Equation time derivative.
Definition: HeatConductionTimeDerivative.C:49