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 : #pragma once 11 : 12 : #include "IntegratedBC.h" 13 : 14 : // Forward Declarations 15 : 16 : /** 17 : * Base class for the "No BC" boundary condition. Subclasses will 18 : * implement the computeQpXYZ() functions differently based on whether the 19 : * "traction" or "Laplacian" form of the viscous stress tensor is 20 : * used. The idea behind this is discussed by Griffiths, Papanastiou, 21 : * and others. Note that this BC, unlike the natural BC, is 22 : * insufficient to set the value of the pressure in outflow problems, 23 : * and therefore you will need to implement a pressure pin or similar 24 : * approach for constraining the null space of constant pressures. 25 : */ 26 : class INSMomentumNoBCBCBase : public IntegratedBC 27 : { 28 : public: 29 : static InputParameters validParams(); 30 : 31 : INSMomentumNoBCBCBase(const InputParameters & parameters); 32 : 33 132 : virtual ~INSMomentumNoBCBCBase() {} 34 : 35 : protected: 36 : // Coupled variables 37 : const VariableValue & _u_vel; 38 : const VariableValue & _v_vel; 39 : const VariableValue & _w_vel; 40 : const VariableValue & _p; 41 : 42 : // Gradients 43 : const VariableGradient & _grad_u_vel; 44 : const VariableGradient & _grad_v_vel; 45 : const VariableGradient & _grad_w_vel; 46 : 47 : // Variable numberings 48 : unsigned _u_vel_var_number; 49 : unsigned _v_vel_var_number; 50 : unsigned _w_vel_var_number; 51 : unsigned _p_var_number; 52 : 53 : RealVectorValue _gravity; 54 : unsigned _component; 55 : bool _integrate_p_by_parts; 56 : 57 : const MaterialProperty<Real> & _mu; 58 : const MaterialProperty<Real> & _rho; 59 : };