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 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<NSMomentumInviscidBC>();
19  params.addClassDescription(
20  "Momentum equation boundary condition used when pressure *is not* integrated by parts.");
21  return params;
22 }
23 
25  const InputParameters & parameters)
26  : NSMomentumInviscidBC(parameters)
27 {
28 }
29 
30 Real
32 {
33  // Velocity vector object
34  RealVectorValue vel(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
35 
36  // Velocity vector dotted with normal
37  Real u_dot_n = vel * _normals[_qp];
38 
39  // The current value of the vector (rho*u)(u.n)
40  RealVectorValue rhou_udotn = u_dot_n * _rho[_qp] * vel;
41 
42  return convectiveQpResidualHelper(rhou_udotn(_component));
43 }
44 
45 Real
47 {
48  // There is no Jacobian for the pressure term when the pressure is specified,
49  // so all we have left is the convective part. The on-diagonal variable number
50  // is _component+1
52 }
53 
54 Real
56 {
57  if (isNSVariable(jvar))
59  else
60  return 0.0;
61 }
NSIntegratedBC::mapVarNumber
unsigned mapVarNumber(unsigned var)
Definition: NSIntegratedBC.C:90
NSMomentumInviscidNoPressureImplicitFlowBC::computeQpJacobian
virtual Real computeQpJacobian()
Definition: NSMomentumInviscidNoPressureImplicitFlowBC.C:46
NSIntegratedBC::_w_vel
const VariableValue & _w_vel
Definition: NSIntegratedBC.h:37
NSIntegratedBC::isNSVariable
bool isNSVariable(unsigned var)
Definition: NSIntegratedBC.C:80
registerMooseObject
registerMooseObject("NavierStokesApp", NSMomentumInviscidNoPressureImplicitFlowBC)
NSMomentumInviscidNoPressureImplicitFlowBC::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned jvar)
Definition: NSMomentumInviscidNoPressureImplicitFlowBC.C:55
NSMomentumInviscidBC
This class corresponds to the inviscid part of the "natural" boundary condition for the momentum equa...
Definition: NSMomentumInviscidBC.h:59
validParams< NSMomentumInviscidBC >
InputParameters validParams< NSMomentumInviscidBC >()
Definition: NSMomentumInviscidBC.C:14
NSMomentumInviscidNoPressureImplicitFlowBC.h
NSIntegratedBC::_v_vel
const VariableValue & _v_vel
Definition: NSIntegratedBC.h:36
NSIntegratedBC::_u_vel
const VariableValue & _u_vel
Definition: NSIntegratedBC.h:35
NSMomentumInviscidBC::convectiveQpResidualHelper
Real convectiveQpResidualHelper(Real rhou_udotn)
Definition: NSMomentumInviscidBC.C:52
NSIntegratedBC::_rho
const VariableValue & _rho
Definition: NSIntegratedBC.h:39
NSMomentumInviscidNoPressureImplicitFlowBC::computeQpResidual
virtual Real computeQpResidual()
Definition: NSMomentumInviscidNoPressureImplicitFlowBC.C:31
validParams< NSMomentumInviscidNoPressureImplicitFlowBC >
InputParameters validParams< NSMomentumInviscidNoPressureImplicitFlowBC >()
Definition: NSMomentumInviscidNoPressureImplicitFlowBC.C:16
NSMomentumInviscidNoPressureImplicitFlowBC
Momentum equation boundary condition used when pressure is not integrated by parts,...
Definition: NSMomentumInviscidNoPressureImplicitFlowBC.h:26
NSMomentumInviscidBC::_component
const unsigned _component
Definition: NSMomentumInviscidBC.h:67
NSMomentumInviscidBC::convectiveQpJacobianHelper
Real convectiveQpJacobianHelper(unsigned var_number)
Definition: NSMomentumInviscidBC.C:64
NSMomentumInviscidNoPressureImplicitFlowBC::NSMomentumInviscidNoPressureImplicitFlowBC
NSMomentumInviscidNoPressureImplicitFlowBC(const InputParameters &parameters)
Definition: NSMomentumInviscidNoPressureImplicitFlowBC.C:24