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 "PCNSFVImplicitMomentumPressureBC.h" 11 : #include "NS.h" 12 : 13 : registerMooseObject("NavierStokesApp", PCNSFVImplicitMomentumPressureBC); 14 : 15 : InputParameters 16 244 : PCNSFVImplicitMomentumPressureBC::validParams() 17 : { 18 244 : InputParameters params = FVFluxBC::validParams(); 19 244 : params.addClassDescription( 20 : "Specifies an implicit pressure at a boundary for the momentum equations."); 21 488 : MooseEnum momentum_component("x=0 y=1 z=2"); 22 488 : params.addRequiredParam<MooseEnum>( 23 : "momentum_component", 24 : momentum_component, 25 : "The component of the momentum equation that this kernel applies to."); 26 244 : return params; 27 244 : } 28 : 29 134 : PCNSFVImplicitMomentumPressureBC::PCNSFVImplicitMomentumPressureBC(const InputParameters & params) 30 : : FVFluxBC(params), 31 134 : _pressure(getADMaterialProperty<Real>(NS::pressure)), 32 134 : _eps(getMaterialProperty<Real>(NS::porosity)), 33 402 : _index(getParam<MooseEnum>("momentum_component")) 34 : { 35 134 : } 36 : 37 : ADReal 38 1562920 : PCNSFVImplicitMomentumPressureBC::computeQpResidual() 39 : { 40 : 41 1562920 : return _normal(_index) * _eps[_qp] * _pressure[_qp]; 42 : }