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