www.mooseframework.org
NSMomentumInviscidSpecifiedPressureBC.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("Momentum equation boundary condition in which pressure is specified "
15  "(given) and the value of the convective part is allowed to vary (is "
16  "computed implicitly).");
17  params.addRequiredParam<Real>("specified_pressure", "The specified pressure for this boundary");
18  return params;
19 }
20 
22  const InputParameters & parameters)
23  : NSMomentumInviscidBC(parameters), _specified_pressure(getParam<Real>("specified_pressure"))
24 {
25 }
26 
27 Real
29 {
30  // Velocity vector object
31  RealVectorValue vel(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
32 
33  // Velocity vector dotted with normal
34  Real u_dot_n = vel * _normals[_qp];
35 
36  // The current value of the vector (rho*u)(u.n)
37  RealVectorValue rhou_udotn = u_dot_n * _rho[_qp] * vel;
38 
41 }
42 
43 Real
45 {
46  // There is no Jacobian for the pressure term when the pressure is specified,
47  // so all we have left is the convective part. The on-diagonal variable number
48  // is _component+1
50 }
51 
52 Real
54 {
55  if (isNSVariable(jvar))
57  else
58  return 0.0;
59 }
InputParameters validParams< NSMomentumInviscidBC >()
bool isNSVariable(unsigned var)
This class corresponds to the inviscid part of the "natural" boundary condition for the momentum equa...
InputParameters validParams< NSMomentumInviscidSpecifiedPressureBC >()
NSMomentumInviscidSpecifiedPressureBC(const InputParameters &parameters)
Real convectiveQpResidualHelper(Real rhou_udotn)
const VariableValue & _w_vel
const VariableValue & _rho
Real convectiveQpJacobianHelper(unsigned var_number)
unsigned mapVarNumber(unsigned var)
const VariableValue & _v_vel
Real pressureQpResidualHelper(Real pressure)
const VariableValue & _u_vel