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 "INSADMassPSPG.h" 11 : 12 : registerMooseObject("NavierStokesApp", INSADMassPSPG); 13 : 14 : InputParameters 15 1887 : INSADMassPSPG::validParams() 16 : { 17 1887 : InputParameters params = ADKernelGrad::validParams(); 18 1887 : params.addClassDescription( 19 : "This class adds PSPG stabilization to the mass equation, enabling use of " 20 : "equal order shape functions for pressure and velocity variables"); 21 3774 : params.addParam<MaterialPropertyName>("rho_name", "rho", "The name of the density"); 22 1887 : return params; 23 0 : } 24 : 25 1029 : INSADMassPSPG::INSADMassPSPG(const InputParameters & parameters) 26 : : ADKernelGrad(parameters), 27 1029 : _rho(getADMaterialProperty<Real>("rho_name")), 28 2058 : _tau(getADMaterialProperty<Real>("tau")), 29 3087 : _momentum_strong_residual(getADMaterialProperty<RealVectorValue>("momentum_strong_residual")) 30 : { 31 1029 : } 32 : 33 : ADRealVectorValue 34 22238882 : INSADMassPSPG::precomputeQpResidual() 35 : { 36 44477764 : return -_tau[_qp] / _rho[_qp] * _momentum_strong_residual[_qp]; 37 : }