https://mooseframework.inl.gov
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 
12 registerMooseObject("NavierStokesApp", INSFVBodyForce);
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 
37 ADReal
39 {
41 }
INSFVBodyForce(const InputParameters &params)
registerMooseObject("NavierStokesApp", INSFVBodyForce)
static InputParameters validParams()
Body force that contributes to the Rhie-Chow interpolation.
Moose::StateArg determineState() const
DualNumber< Real, DNDerivativeType, true > ADReal
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
ADReal computeQpResidual() override
const Elem *const & _current_elem
static InputParameters validParams()
const Real & _scale
Scale factor.
const PostprocessorValue & _postprocessor
Optional postprocessor scaling factor of the body force.
All objects that contribute to pressure-based (e.g.
const Moose::Functor< ADReal > & _functor
The functor describing the body force.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()