https://mooseframework.inl.gov
Loading...
Searching...
No Matches
INSFVBodyForce.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
10#include "INSFVBodyForce.h"
11
13
16{
17 auto params = FVElementalKernel::validParams();
19 params.addClassDescription("Body force that contributes to the Rhie-Chow interpolation");
20 params.addParam<Real>("scaling_factor", 1.0, "Coefficient to multiply by the body force term");
21 params.addParam<MooseFunctorName>("functor", "1", "A functor that describes the body force");
22 params.addParam<PostprocessorName>(
23 "postprocessor", 1, "A postprocessor whose value is multiplied by the body force");
24 params.declareControllable("scaling_factor");
25 return params;
26}
27
29 : FVElementalKernel(parameters),
31 _scale(getParam<Real>("scaling_factor")),
32 _functor(getFunctor<ADReal>("functor")),
33 _postprocessor(getPostprocessorValue("postprocessor"))
34{
35}
36
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", INSFVBodyForce)
static InputParameters validParams()
const Elem *const & _current_elem
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
Body force that contributes to the Rhie-Chow interpolation.
const Real & _scale
Scale factor.
const Moose::Functor< ADReal > & _functor
The functor describing the body force.
ADReal computeQpResidual() override
static InputParameters validParams()
const PostprocessorValue & _postprocessor
Optional postprocessor scaling factor of the body force.
INSFVBodyForce(const InputParameters &params)
All objects that contribute to pressure-based (e.g.
Moose::StateArg determineState() const