https://mooseframework.inl.gov
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 {
16  params.addClassDescription(
17  "This class corresponds to the 'natural' boundary condition for the mass equation.");
18  return params;
19 }
20 
21 NSMassBC::NSMassBC(const InputParameters & parameters) : NSIntegratedBC(parameters) {}
22 
23 Real
25 {
26  return rhoun * _test[_i][_qp];
27 }
28 
29 Real
30 NSMassBC::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 }
const VariableTestValue & _test
unsigned int _j
Real qpResidualHelper(Real rhoun)
Compute the residual contribution for a given value of rho*(u.n).
Definition: NSMassBC.C:24
This class couples together all the variables for the compressible Navier-Stokes equations to allow t...
const MooseArray< Point > & _normals
unsigned int _i
const VariablePhiValue & _phi
unsigned int _qp
NSMassBC(const InputParameters &parameters)
Definition: NSMassBC.C:21
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real qpJacobianHelper(unsigned var_number)
Compute the Jacobian contribution due to variable number &#39;var_number&#39;.
Definition: NSMassBC.C:30
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
Definition: NSMassBC.C:13
static InputParameters validParams()