https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
16 PNSFVMomentumPressureRZ,
17 "05/01/2022 00:01",
19
22{
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
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}
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObjectRenamed("NavierStokesApp", PNSFVMomentumPressureRZ, "05/01/2022 00:01", PNSFVMomentumPressureFluxRZ)
registerMooseObject("NavierStokesApp", PNSFVMomentumPressureFluxRZ)
static InputParameters validParams()
const unsigned int _qp
const Elem *const & _current_elem
const MooseArray< Point > & _q_point
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
All objects that contribute to pressure-based (e.g.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
This object adds a residual equivalent to.
PNSFVMomentumPressureFluxRZ(const InputParameters &params)
const Moose::Functor< ADReal > & _eps
const Moose::Functor< ADReal > & _p
SubProblem & _subproblem
unsigned int getAxisymmetricRadialCoord() const
Moose::CoordinateSystemType getCoordSystem(SubdomainID sid) const
Moose::StateArg determineState() const
static const std::string porosity
Definition NS.h:108
static const std::string pressure
Definition NS.h:57