www.mooseframework.org
NSMomentumInviscidNoPressureImplicitFlowBC.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 
11 
13 
16 {
18  params.addClassDescription(
19  "Momentum equation boundary condition used when pressure *is not* integrated by parts.");
20  return params;
21 }
22 
24  const InputParameters & parameters)
25  : NSMomentumInviscidBC(parameters)
26 {
27 }
28 
29 Real
31 {
32  // Velocity vector object
34 
35  // Velocity vector dotted with normal
36  Real u_dot_n = vel * _normals[_qp];
37 
38  // The current value of the vector (rho*u)(u.n)
39  RealVectorValue rhou_udotn = u_dot_n * _rho[_qp] * vel;
40 
41  return convectiveQpResidualHelper(rhou_udotn(_component));
42 }
43 
44 Real
46 {
47  // There is no Jacobian for the pressure term when the pressure is specified,
48  // so all we have left is the convective part. The on-diagonal variable number
49  // is _component+1
51 }
52 
53 Real
55 {
56  if (isNSVariable(jvar))
58  else
59  return 0.0;
60 }
bool isNSVariable(unsigned var)
registerMooseObject("NavierStokesApp", NSMomentumInviscidNoPressureImplicitFlowBC)
This class corresponds to the inviscid part of the "natural" boundary condition for the momentum equa...
const MooseArray< Point > & _normals
Momentum equation boundary condition used when pressure is not integrated by parts, i.e.
Real convectiveQpResidualHelper(Real rhou_udotn)
const VariableValue & _w_vel
const VariableValue & _rho
unsigned int _qp
Real convectiveQpJacobianHelper(unsigned var_number)
NSMomentumInviscidNoPressureImplicitFlowBC(const InputParameters &parameters)
unsigned mapVarNumber(unsigned var)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableValue & _v_vel
void addClassDescription(const std::string &doc_string)
const VariableValue & _u_vel
static InputParameters validParams()