https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NSMassBC.C
Go to the documentation of this file.
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
14{
17 "This class corresponds to the 'natural' boundary condition for the mass equation.");
18 return params;
19}
20
21NSMassBC::NSMassBC(const InputParameters & parameters) : NSIntegratedBC(parameters) {}
22
23Real
25{
26 return rhoun * _test[_i][_qp];
27}
28
29Real
30NSMassBC::qpJacobianHelper(unsigned var_number)
31{
32 switch (var_number)
33 {
34 case 0: // density
35 case 4: // energy
36 return 0.0;
37
38 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 return _phi[_j][_qp] * _test[_i][_qp] * _normals[_qp](var_number - 1);
44
45 default:
46 mooseError("Should not get here!");
47 break;
48 }
49}
void addClassDescription(const std::string &doc_string)
unsigned int _qp
unsigned int _i
unsigned int _j
const VariablePhiValue & _phi
const MooseArray< Point > & _normals
const VariableTestValue & _test
void mooseError(Args &&... args) const
This class couples together all the variables for the compressible Navier-Stokes equations to allow t...
static InputParameters validParams()
Real qpJacobianHelper(unsigned var_number)
Compute the Jacobian contribution due to variable number 'var_number'.
Definition NSMassBC.C:30
Real qpResidualHelper(Real rhoun)
Compute the residual contribution for a given value of rho*(u.n).
Definition NSMassBC.C:24
NSMassBC(const InputParameters &parameters)
Definition NSMassBC.C:21
static InputParameters validParams()
Definition NSMassBC.C:13