www.mooseframework.org
INSMomentumTimeDerivative.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  return params;
18 }
19 
20 INSMomentumTimeDerivative::INSMomentumTimeDerivative(const InputParameters & parameters)
21  : TimeDerivative(parameters), _rho(getMaterialProperty<Real>("rho_name"))
22 {
23 }
24 
25 Real
27 {
28  return _rho[_qp] * TimeDerivative::computeQpResidual();
29 }
30 
31 Real
33 {
34  return _rho[_qp] * TimeDerivative::computeQpJacobian();
35 }
36 
37 Real
39 {
40  return 0.;
41 }
INSMomentumTimeDerivative(const InputParameters &parameters)
InputParameters validParams< INSMomentumTimeDerivative >()
virtual Real computeQpOffDiagJacobian(unsigned jvar)
const MaterialProperty< Real > & _rho