www.mooseframework.org
HeatConductionTimeDerivative.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<TimeDerivative>();
14  params.addClassDescription(
15  "Time derivative term $\\rho c_p \\frac{\\partial T}{\\partial t}$ of "
16  "the heat equation for quasi-constant specific heat $c_p$ and the density $\\rho$.");
17 
18  // Density may be changing with deformation, so we must integrate
19  // over current volume by setting the use_displaced_mesh flag.
20  params.set<bool>("use_displaced_mesh") = true;
21 
22  params.addParam<MaterialPropertyName>(
23  "specific_heat", "specific_heat", "Property name of the specific heat material property");
24 
30  params.addParam<MaterialPropertyName>(
31  "density_name", "density", "Property name of the density material property");
32  return params;
33 }
34 
36  : TimeDerivative(parameters),
37  _specific_heat(getMaterialProperty<Real>("specific_heat")),
38  _density(getMaterialProperty<Real>("density_name"))
39 {
40 }
41 
42 Real
44 {
45  return _specific_heat[_qp] * _density[_qp] * TimeDerivative::computeQpResidual();
46 }
47 
48 Real
50 {
51  return _specific_heat[_qp] * _density[_qp] * TimeDerivative::computeQpJacobian();
52 }
const MaterialProperty< Real > & _specific_heat
virtual Real computeQpJacobian()
Compute the jacobian of the Heat Equation time derivative.
InputParameters validParams< HeatConductionTimeDerivative >()
const MaterialProperty< Real > & _density
virtual Real computeQpResidual()
Compute the residual of the Heat Equation time derivative.
HeatConductionTimeDerivative(const InputParameters &parameters)
Contructor for Heat Equation time derivative term.