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 "INSMomentumTimeDerivative.h" 11 : 12 : registerMooseObject("NavierStokesApp", INSMomentumTimeDerivative); 13 : 14 : InputParameters 15 877 : INSMomentumTimeDerivative::validParams() 16 : { 17 877 : InputParameters params = TimeDerivative::validParams(); 18 877 : params.addClassDescription("This class computes the time derivative for the incompressible " 19 : "Navier-Stokes momentum equation."); 20 1754 : params.addParam<MaterialPropertyName>("rho_name", "rho", "density name"); 21 877 : return params; 22 0 : } 23 : 24 486 : INSMomentumTimeDerivative::INSMomentumTimeDerivative(const InputParameters & parameters) 25 972 : : TimeDerivative(parameters), _rho(getMaterialProperty<Real>("rho_name")) 26 : { 27 486 : } 28 : 29 : Real 30 63801398 : INSMomentumTimeDerivative::computeQpResidual() 31 : { 32 63801398 : return _rho[_qp] * TimeDerivative::computeQpResidual(); 33 : } 34 : 35 : Real 36 437622128 : INSMomentumTimeDerivative::computeQpJacobian() 37 : { 38 437622128 : return _rho[_qp] * TimeDerivative::computeQpJacobian(); 39 : } 40 : 41 : Real 42 710582038 : INSMomentumTimeDerivative::computeQpOffDiagJacobian(unsigned) 43 : { 44 710582038 : return 0.; 45 : }