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 "INSFVMomentumMeshAdvection.h" 11 : 12 : registerMooseObject("NavierStokesApp", INSFVMomentumMeshAdvection); 13 : 14 : InputParameters 15 206 : INSFVMomentumMeshAdvection::validParams() 16 : { 17 206 : InputParameters params = INSFVMeshAdvection::validParams(); 18 206 : params += INSFVMomentumResidualObject::validParams(); 19 206 : params.addClassDescription( 20 : "Implements a momentum source/sink term proportional to the divergence of the mesh velocity"); 21 206 : params.suppressParameter<MooseFunctorName>("advected_quantity"); 22 412 : params.addParam<bool>( 23 412 : "add_to_a", true, "Whether to add this object's contribution to the Rhie-Chow coefficients"); 24 206 : return params; 25 0 : } 26 : 27 104 : INSFVMomentumMeshAdvection::INSFVMomentumMeshAdvection(const InputParameters & parameters) 28 : : INSFVMeshAdvection(parameters), 29 : INSFVMomentumResidualObject(*this), 30 208 : _add_to_a(getParam<bool>("add_to_a")) 31 : { 32 104 : } 33 : 34 : void 35 24282 : INSFVMomentumMeshAdvection::gatherRCData(const Elem & elem) 36 : { 37 24282 : if (_add_to_a) 38 : { 39 8322 : const auto elem_arg = makeElemArg(&elem); 40 8322 : const auto state = determineState(); 41 8322 : _rc_uo.addToA(&elem, _index, advQuantCoeff(elem_arg, state)); 42 : } 43 24282 : }