https://mooseframework.inl.gov
INSFVPump.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 "INSFVPump.h"
11 #include "Function.h"
12 
13 registerMooseObject("NavierStokesApp", INSFVPump);
14 
17 {
18  auto params = FVElementalKernel::validParams();
20  params.addClassDescription(
21  "Effective body force for a pump that contributes to the Rhie-Chow interpolation");
22  params.addParam<MooseFunctorName>(
23  "pump_volume_force", "pump_volume_force", "Functor for the pump force.");
24  return params;
25 }
26 
28  : FVElementalKernel(parameters),
30  _pump_volume_force(getFunctor<Real>("pump_volume_force"))
31 {
32 }
33 
34 ADReal
36 {
37  const auto elem_arg = makeElemArg(_current_elem);
38  const auto state = determineState();
39 
40  return _pump_volume_force(elem_arg, state);
41 }
registerMooseObject("NavierStokesApp", INSFVPump)
ADReal computeQpResidual() override
Definition: INSFVPump.C:35
Moose::StateArg determineState() const
Body force that contributes to the Rhie-Chow interpolation.
Definition: INSFVPump.h:18
const Moose::Functor< Real > & _pump_volume_force
Pump Functor Material.
Definition: INSFVPump.h:31
DualNumber< Real, DNDerivativeType, true > ADReal
INSFVPump(const InputParameters &params)
Definition: INSFVPump.C:27
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
static InputParameters validParams()
Definition: INSFVPump.C:16
const Elem *const & _current_elem
static InputParameters validParams()
All objects that contribute to pressure-based (e.g.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()