https://mooseframework.inl.gov
PNSFVMomentumPressureFluxRZ.C
Go to the documentation of this file.
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 
11 
12 #include "NS.h"
13 
15 registerMooseObjectRenamed("NavierStokesApp",
16  PNSFVMomentumPressureRZ,
17  "05/01/2022 00:01",
19 
22 {
25  params.addClassDescription(
26  "Adds the porous $-p/r$ term into the radial component of the Navier-Stokes "
27  "momentum equation for the problems in the RZ coordinate system when integrating by parts.");
28  params.addParam<MooseFunctorName>(NS::pressure, "Pressure variable");
29  params.addParam<MooseFunctorName>(NS::porosity, "Porosity variable");
30 
31  return params;
32 }
33 
35  : FVElementalKernel(params),
37  _p(getFunctor<ADReal>(NS::pressure)),
38  _eps(getFunctor<ADReal>(NS::porosity))
39 {
40 }
41 
42 ADReal
44 {
45  mooseAssert(_subproblem.getCoordSystem(_current_elem->subdomain_id()) == Moose::COORD_RZ,
46  "This object should only be active in an RZ coordinate system.");
47 
48  auto rz_radial_coord = _subproblem.getAxisymmetricRadialCoord();
49  const auto state = determineState();
50 
51  return -_eps(makeElemArg(_current_elem), state) * _p(makeElemArg(_current_elem), state) /
52  _q_point[_qp](rz_radial_coord);
53 }
unsigned int getAxisymmetricRadialCoord() const
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
registerMooseObjectRenamed("NavierStokesApp", PNSFVMomentumPressureRZ, "05/01/2022 00:01", PNSFVMomentumPressureFluxRZ)
Moose::StateArg determineState() const
const Moose::Functor< ADReal > & _eps
DualNumber< Real, DNDerivativeType, true > ADReal
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
static const std::string porosity
Definition: NS.h:104
registerMooseObject("NavierStokesApp", PNSFVMomentumPressureFluxRZ)
const Elem *const & _current_elem
const MooseArray< Point > & _q_point
SubProblem & _subproblem
static InputParameters validParams()
const Moose::Functor< ADReal > & _p
PNSFVMomentumPressureFluxRZ(const InputParameters &params)
All objects that contribute to pressure-based (e.g.
static InputParameters validParams()
static const std::string pressure
Definition: NS.h:56
const unsigned int _qp
This object adds a residual equivalent to.
void addClassDescription(const std::string &doc_string)
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
static InputParameters validParams()