https://mooseframework.inl.gov
Loading...
Searching...
No Matches
INSFVMomentumGravity.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#include "NS.h"
12
14
17{
21 "Computes a body force due to gravity in Rhie-Chow based simulations.");
22 params.addRequiredParam<RealVectorValue>("gravity", "Direction of the gravity vector");
23 params.addParam<MooseFunctorName>(NS::density, NS::density, "The value for the density");
24 return params;
25}
26
28 : FVElementalKernel(params),
30 _gravity(getParam<RealVectorValue>("gravity")),
31 _rho(getFunctor<ADReal>(NS::density))
32{
33}
34
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", INSFVMomentumGravity)
static InputParameters validParams()
const Elem *const & _current_elem
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
Imposes a gravitational force on the momentum equation in Rhie-Chow (incompressible) contexts.
const RealVectorValue _gravity
The gravity vector.
ADReal computeQpResidual() override
const Moose::Functor< ADReal > & _rho
The density.
INSFVMomentumGravity(const InputParameters &params)
static InputParameters validParams()
All objects that contribute to pressure-based (e.g.
const unsigned int _index
index x|y|z
void addRequiredParam(const std::string &name, const std::string &doc_string)
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)
Moose::StateArg determineState() const
static const std::string density
Definition NS.h:34