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 79 : INSTemperatureTimeDerivative::validParams() 16 : { 17 79 : InputParameters params = TimeDerivative::validParams(); 18 79 : params.addClassDescription("This class computes the time derivative for the incompressible " 19 : "Navier-Stokes momentum equation."); 20 158 : params.addParam<MaterialPropertyName>("rho_name", "rho", "density name"); 21 158 : params.addParam<MaterialPropertyName>("cp_name", "cp", "specific heat name"); 22 79 : return params; 23 0 : } 24 : 25 43 : INSTemperatureTimeDerivative::INSTemperatureTimeDerivative(const InputParameters & parameters) 26 : : TimeDerivative(parameters), 27 43 : _rho(getMaterialProperty<Real>("rho_name")), 28 129 : _cp(getMaterialProperty<Real>("cp_name")) 29 : { 30 43 : } 31 : 32 : Real 33 5877593 : INSTemperatureTimeDerivative::computeQpResidual() 34 : { 35 5877593 : return _rho[_qp] * _cp[_qp] * TimeDerivative::computeQpResidual(); 36 : } 37 : 38 : Real 39 38449611 : INSTemperatureTimeDerivative::computeQpJacobian() 40 : { 41 38449611 : return _rho[_qp] * _cp[_qp] * TimeDerivative::computeQpJacobian(); 42 : } 43 : 44 : Real 45 93980898 : INSTemperatureTimeDerivative::computeQpOffDiagJacobian(unsigned) 46 : { 47 93980898 : return 0.; 48 : }