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 "NSMomentumConvectiveWeakStagnationBC.h" 11 : 12 : registerMooseObject("NavierStokesApp", NSMomentumConvectiveWeakStagnationBC); 13 : 14 : InputParameters 15 82 : NSMomentumConvectiveWeakStagnationBC::validParams() 16 : { 17 82 : InputParameters params = NSWeakStagnationBaseBC::validParams(); 18 82 : params.addClassDescription("The convective part (sans pressure term) of the momentum equation " 19 : "boundary integral evaluated at specified stagnation temperature, " 20 : "stagnation pressure, and flow direction values."); 21 164 : params.addRequiredParam<unsigned>( 22 : "component", "(0,1,2) = (x,y,z) for which momentum component this BC is applied to"); 23 82 : return params; 24 0 : } 25 : 26 44 : NSMomentumConvectiveWeakStagnationBC::NSMomentumConvectiveWeakStagnationBC( 27 44 : const InputParameters & parameters) 28 88 : : NSWeakStagnationBaseBC(parameters), _component(getParam<unsigned>("component")) 29 : { 30 44 : } 31 : 32 : Real 33 228480 : NSMomentumConvectiveWeakStagnationBC::computeQpResidual() 34 : { 35 : // Compute stagnation values 36 228480 : Real T_s = 0.0, p_s = 0.0, rho_s = 0.0; 37 228480 : staticValues(T_s, p_s, rho_s); 38 : 39 : // The specified flow direction, as a vector 40 : RealVectorValue s(_sx, _sy, _sz); 41 : 42 : // (rho_s * |u|^2 * s_k * (s.n)) * phi_i 43 228480 : return (rho_s * this->velmag2() * s(_component) * this->sdotn()) * _test[_i][_qp]; 44 : } 45 : 46 : Real 47 139776 : NSMomentumConvectiveWeakStagnationBC::computeQpJacobian() 48 : { 49 : // TODO 50 139776 : return 0.0; 51 : } 52 : 53 : Real 54 419328 : NSMomentumConvectiveWeakStagnationBC::computeQpOffDiagJacobian(unsigned /*jvar*/) 55 : { 56 : // TODO 57 419328 : return 0.0; 58 : }