www.mooseframework.org
NSMassBC.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 #include "NSMassBC.h"
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<NSIntegratedBC>();
14  params.addClassDescription(
15  "This class corresponds to the 'natural' boundary condition for the mass equation.");
16  return params;
17 }
18 
19 NSMassBC::NSMassBC(const InputParameters & parameters) : NSIntegratedBC(parameters) {}
20 
21 Real
23 {
24  return rhoun * _test[_i][_qp];
25 }
26 
27 Real
28 NSMassBC::qpJacobianHelper(unsigned var_number)
29 {
30  switch (var_number)
31  {
32  case 0: // density
33  case 4: // energy
34  return 0.0;
35 
36  case 1:
37  case 2:
38  case 3: // momentums
39  // If one of the momentums, the derivative is a mass
40  // matrix times that normal component...
41  return _phi[_j][_qp] * _test[_i][_qp] * _normals[_qp](var_number - 1);
42 
43  default:
44  mooseError("Should not get here!");
45  break;
46  }
47 }
Real qpResidualHelper(Real rhoun)
Compute the residual contribution for a given value of rho*(u.n).
Definition: NSMassBC.C:22
This class couples together all the variables for the compressible Navier-Stokes equations to allow t...
InputParameters validParams< NSMassBC >()
Definition: NSMassBC.C:11
NSMassBC(const InputParameters &parameters)
Definition: NSMassBC.C:19
InputParameters validParams< NSIntegratedBC >()
Real qpJacobianHelper(unsigned var_number)
Compute the Jacobian contribution due to variable number &#39;var_number&#39;.
Definition: NSMassBC.C:28