www.mooseframework.org
INSTemperatureTimeDerivative.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("This class computes the time derivative for the incompressible "
15  "Navier-Stokes momentum equation.");
16  params.addParam<MaterialPropertyName>("rho_name", "rho", "density name");
17  params.addParam<MaterialPropertyName>("cp_name", "cp", "specific heat name");
18  return params;
19 }
20 
22  : TimeDerivative(parameters),
23  _rho(getMaterialProperty<Real>("rho_name")),
24  _cp(getMaterialProperty<Real>("cp_name"))
25 {
26 }
27 
28 Real
30 {
31  return _rho[_qp] * _cp[_qp] * TimeDerivative::computeQpResidual();
32 }
33 
34 Real
36 {
37  return _rho[_qp] * _cp[_qp] * TimeDerivative::computeQpJacobian();
38 }
39 
40 Real
42 {
43  return 0.;
44 }
InputParameters validParams< INSTemperatureTimeDerivative >()
INSTemperatureTimeDerivative(const InputParameters &parameters)
const MaterialProperty< Real > & _cp
const MaterialProperty< Real > & _rho
virtual Real computeQpOffDiagJacobian(unsigned jvar)