Line data Source code
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 : 15 : InputParameters 16 44 : INSFVPump::validParams() 17 : { 18 44 : auto params = FVElementalKernel::validParams(); 19 44 : params += INSFVMomentumResidualObject::validParams(); 20 44 : params.addClassDescription( 21 : "Effective body force for a pump that contributes to the Rhie-Chow interpolation"); 22 88 : params.addParam<MooseFunctorName>( 23 : "pump_volume_force", "pump_volume_force", "Functor for the pump force."); 24 44 : return params; 25 0 : } 26 : 27 24 : INSFVPump::INSFVPump(const InputParameters & parameters) 28 : : FVElementalKernel(parameters), 29 : INSFVMomentumResidualObject(*this), 30 48 : _pump_volume_force(getFunctor<Real>("pump_volume_force")) 31 : { 32 24 : } 33 : 34 : ADReal 35 1440 : INSFVPump::computeQpResidual() 36 : { 37 1440 : const auto elem_arg = makeElemArg(_current_elem); 38 1440 : const auto state = determineState(); 39 : 40 1440 : return _pump_volume_force(elem_arg, state); 41 : }