Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 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 : 10 : #include "INSTemperatureTimeDerivative.h" 11 : 12 : registerMooseObject("NavierStokesApp", INSTemperatureTimeDerivative); 13 : 14 : InputParameters 15 43 : INSTemperatureTimeDerivative::validParams() 16 : { 17 43 : InputParameters params = TimeDerivative::validParams(); 18 43 : params.addClassDescription("This class computes the time derivative for the incompressible " 19 : "Navier-Stokes momentum equation."); 20 86 : params.addParam<MaterialPropertyName>("rho_name", "rho", "density name"); 21 86 : params.addParam<MaterialPropertyName>("cp_name", "cp", "specific heat name"); 22 43 : return params; 23 0 : } 24 : 25 23 : INSTemperatureTimeDerivative::INSTemperatureTimeDerivative(const InputParameters & parameters) 26 : : TimeDerivative(parameters), 27 23 : _rho(getMaterialProperty<Real>("rho_name")), 28 69 : _cp(getMaterialProperty<Real>("cp_name")) 29 : { 30 23 : } 31 : 32 : Real 33 4316723 : INSTemperatureTimeDerivative::computeQpResidual() 34 : { 35 4316723 : return _rho[_qp] * _cp[_qp] * TimeDerivative::computeQpResidual(); 36 : } 37 : 38 : Real 39 28183833 : INSTemperatureTimeDerivative::computeQpJacobian() 40 : { 41 28183833 : return _rho[_qp] * _cp[_qp] * TimeDerivative::computeQpJacobian(); 42 : } 43 : 44 : Real 45 68886774 : INSTemperatureTimeDerivative::computeQpOffDiagJacobian(unsigned) 46 : { 47 68886774 : return 0.; 48 : }