www.mooseframework.org
NSMomentumInviscidNoPressureImplicitFlowBC.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 /****************************************************************/
8 
9 template <>
10 InputParameters
12 {
13  InputParameters params = validParams<NSMomentumInviscidBC>();
14  params.addClassDescription(
15  "Momentum equation boundary condition used when pressure *is not* integrated by parts.");
16  return params;
17 }
18 
20  const InputParameters & parameters)
21  : NSMomentumInviscidBC(parameters)
22 {
23 }
24 
25 Real
27 {
28  // Velocity vector object
29  RealVectorValue vel(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
30 
31  // Velocity vector dotted with normal
32  Real u_dot_n = vel * _normals[_qp];
33 
34  // The current value of the vector (rho*u)(u.n)
35  RealVectorValue rhou_udotn = u_dot_n * _rho[_qp] * vel;
36 
37  return convectiveQpResidualHelper(rhou_udotn(_component));
38 }
39 
40 Real
42 {
43  // There is no Jacobian for the pressure term when the pressure is specified,
44  // so all we have left is the convective part. 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 }
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)
const VariableValue & _w_vel
const VariableValue & _rho
Real convectiveQpJacobianHelper(unsigned var_number)
InputParameters validParams< NSMomentumInviscidNoPressureImplicitFlowBC >()
NSMomentumInviscidNoPressureImplicitFlowBC(const InputParameters &parameters)
unsigned mapVarNumber(unsigned var)
const VariableValue & _v_vel
const VariableValue & _u_vel