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 "NSMassBC.h" 11 : 12 : InputParameters 13 41 : NSMassBC::validParams() 14 : { 15 41 : InputParameters params = NSIntegratedBC::validParams(); 16 41 : params.addClassDescription( 17 : "This class corresponds to the 'natural' boundary condition for the mass equation."); 18 41 : return params; 19 0 : } 20 : 21 22 : NSMassBC::NSMassBC(const InputParameters & parameters) : NSIntegratedBC(parameters) {} 22 : 23 : Real 24 114240 : NSMassBC::qpResidualHelper(Real rhoun) 25 : { 26 114240 : return rhoun * _test[_i][_qp]; 27 : } 28 : 29 : Real 30 279552 : NSMassBC::qpJacobianHelper(unsigned var_number) 31 : { 32 279552 : switch (var_number) 33 : { 34 : case 0: // density 35 : case 4: // energy 36 : return 0.0; 37 : 38 139776 : case 1: 39 : case 2: 40 : case 3: // momentums 41 : // If one of the momentums, the derivative is a mass 42 : // matrix times that normal component... 43 139776 : return _phi[_j][_qp] * _test[_i][_qp] * _normals[_qp](var_number - 1); 44 : 45 0 : default: 46 0 : mooseError("Should not get here!"); 47 : break; 48 : } 49 : }