Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
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 {
19  params.addClassDescription(
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 
34 void
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 }
const bool _add_to_a
Whether to add this object&#39;s contribution to the Rhie-Chow coefficients.
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
ADReal advQuantCoeff(const Moose::ElemArg &elem_arg, const Moose::StateArg &state) const
Moose::StateArg determineState() const
const unsigned int _index
index x|y|z
void suppressParameter(const std::string &name)
RhieChowInterpolatorBase & _rc_uo
The Rhie Chow user object that is responsible for generating face velocities for advection terms...
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
Implements a source/sink term for this object&#39;s variable/advected-quantity proportional to the diverg...
Implements a momentum source/sink term proportional to the divergence of the mesh velocity...
All objects that contribute to pressure-based (e.g.
registerMooseObject("NavierStokesApp", INSFVMomentumMeshAdvection)
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.
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
static InputParameters validParams()
virtual void gatherRCData(const Elem &elem) override
Should be a non-empty implementation if the residual object is a FVElementalKernel and introduces res...
INSFVMomentumMeshAdvection(const InputParameters &parameters)