www.mooseframework.org
NSMomentumInviscidSpecifiedNormalFlowBC.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 
8 // Navier-Stokes includes
9 #include "NS.h"
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<NSMomentumInviscidBC>();
17  params.addClassDescription("Momentum equation boundary condition in which pressure is specified "
18  "(given) and the value of the convective part is allowed to vary (is "
19  "computed implicitly).");
20  params.addRequiredCoupledVar(NS::pressure, "pressure");
21  params.addRequiredParam<Real>(
22  "rhou_udotn", "The _component'th entry of the (rho*u)(u.n) vector for this boundary");
23  return params;
24 }
25 
27  const InputParameters & parameters)
28  : NSMomentumInviscidBC(parameters),
29  _pressure(coupledValue(NS::pressure)),
30  _rhou_udotn(getParam<Real>("rhou_udotn"))
31 {
32 }
33 
34 Real
36 {
38 }
39 
40 Real
42 {
43  // There is no Jacobian for the convective term when (rho*u)(u.n) is specified,
44  // so all we have left is the pressure jacobian. The on-diagonal variable number
45  // is _component+1
47 }
48 
49 Real
51 {
52  if (isNSVariable(jvar))
54  else
55  return 0.0;
56 }
Definition: NS.h:13
InputParameters validParams< NSMomentumInviscidBC >()
bool isNSVariable(unsigned var)
This class corresponds to the inviscid part of the "natural" boundary condition for the momentum equa...
Real convectiveQpResidualHelper(Real rhou_udotn)
NSMomentumInviscidSpecifiedNormalFlowBC(const InputParameters &parameters)
Real pressureQpJacobianHelper(unsigned var_number)
unsigned mapVarNumber(unsigned var)
InputParameters validParams< NSMomentumInviscidSpecifiedNormalFlowBC >()
const std::string pressure
Definition: NS.h:24
Real pressureQpResidualHelper(Real pressure)