https://mooseframework.inl.gov
Loading...
Searching...
No Matches
INSFVMomentumMeshAdvection.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
13
16{
20 "Implements a momentum source/sink term proportional to the divergence of the mesh velocity");
21 params.suppressParameter<MooseFunctorName>("advected_quantity");
22 params.addParam<bool>(
23 "add_to_a", true, "Whether to add this object's contribution to the Rhie-Chow coefficients");
24 return params;
25}
26
28 : INSFVMeshAdvection(parameters),
30 _add_to_a(getParam<bool>("add_to_a"))
31{
32}
33
34void
36{
37 if (_add_to_a)
38 {
39 const auto elem_arg = makeElemArg(&elem);
40 const auto state = determineState();
41 _rc_uo.addToA(&elem, _index, advQuantCoeff(elem_arg, state));
42 }
43}
registerMooseObject("NavierStokesApp", INSFVMomentumMeshAdvection)
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
Implements a source/sink term for this object's variable/advected-quantity proportional to the diverg...
static InputParameters validParams()
ADReal advQuantCoeff(const Moose::ElemArg &elem_arg, const Moose::StateArg &state) const
Implements a momentum source/sink term proportional to the divergence of the mesh velocity.
static InputParameters validParams()
const bool _add_to_a
Whether to add this object's contribution to the Rhie-Chow coefficients.
INSFVMomentumMeshAdvection(const InputParameters &parameters)
virtual void gatherRCData(const Elem &elem) override
Should be a non-empty implementation if the residual object is a FVElementalKernel and introduces res...
All objects that contribute to pressure-based (e.g.
const unsigned int _index
index x|y|z
RhieChowInterpolatorBase & _rc_uo
The Rhie Chow user object that is responsible for generating face velocities for advection terms.
void suppressParameter(const std::string &name)
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)
virtual void addToA(const libMesh::Elem *elem, unsigned int component, const ADReal &value)=0
API for momentum residual objects that have on-diagonals for velocity call.
Moose::StateArg determineState() const