www.mooseframework.org
INSADMassPSPG.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 registerADMooseObject("NavierStokesApp", INSADMassPSPG);
13 
15  ADKernelGrad,
16  params.addClassDescription(
17  "This class adds PSPG stabilization to the mass equation, enabling use of "
18  "equal order shape functions for pressure and velocity variables");
19  params.addParam<MaterialPropertyName>("rho_name",
20  "rho",
21  "The name of the density"););
22 
23 template <ComputeStage compute_stage>
24 INSADMassPSPG<compute_stage>::INSADMassPSPG(const InputParameters & parameters)
25  : ADKernelGrad<compute_stage>(parameters),
26  _rho(getADMaterialProperty<Real>("rho_name")),
27  _tau(getADMaterialProperty<Real>("tau")),
28  _momentum_strong_residual(getADMaterialProperty<RealVectorValue>("momentum_strong_residual"))
29 {
30 }
31 
32 template <ComputeStage compute_stage>
33 ADRealVectorValue
35 {
36  return -_tau[_qp] / _rho[_qp] * _momentum_strong_residual[_qp];
37 }
INSADMassPSPG.h
INSADMassPSPG
This class adds PSPG stabilization to the mass equation, enabling use of equal order shape functions ...
Definition: INSADMassPSPG.h:16
registerADMooseObject
registerADMooseObject("NavierStokesApp", INSADMassPSPG)
INSADMassPSPG::INSADMassPSPG
INSADMassPSPG(const InputParameters &parameters)
Definition: INSADMassPSPG.C:24
defineADValidParams
defineADValidParams(INSADMassPSPG, ADKernelGrad, params.addClassDescription("This class adds PSPG stabilization to the mass equation, enabling use of " "equal order shape functions for pressure and velocity variables");params.addParam< MaterialPropertyName >("rho_name", "rho", "The name of the density");)
INSADMassPSPG::precomputeQpResidual
ADRealVectorValue precomputeQpResidual() override
Definition: INSADMassPSPG.C:34