www.mooseframework.org
NSMomentumInviscidSpecifiedPressureBC.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("Momentum equation boundary condition in which pressure is specified "
20  "(given) and the value of the convective part is allowed to vary (is "
21  "computed implicitly).");
22  return params;
23 }
24 
26  const InputParameters & parameters)
27  : NSMomentumInviscidBC(parameters), _specified_pressure(getParam<Real>("specified_pressure"))
28 {
29 }
30 
31 Real
33 {
34  // Velocity vector object
35  RealVectorValue vel(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
36 
37  // Velocity vector dotted with normal
38  Real u_dot_n = vel * _normals[_qp];
39 
40  // The current value of the vector (rho*u)(u.n)
41  RealVectorValue rhou_udotn = u_dot_n * _rho[_qp] * vel;
42 
45 }
46 
47 Real
49 {
50  // There is no Jacobian for the pressure term when the pressure is specified,
51  // so all we have left is the convective part. The on-diagonal variable number
52  // is _component+1
54 }
55 
56 Real
58 {
59  if (isNSVariable(jvar))
61  else
62  return 0.0;
63 }
NSIntegratedBC::mapVarNumber
unsigned mapVarNumber(unsigned var)
Definition: NSIntegratedBC.C:90
NSMomentumInviscidSpecifiedPressureBC::computeQpJacobian
virtual Real computeQpJacobian()
Definition: NSMomentumInviscidSpecifiedPressureBC.C:48
validParams< NSMomentumInviscidSpecifiedPressureBC >
InputParameters validParams< NSMomentumInviscidSpecifiedPressureBC >()
Definition: NSMomentumInviscidSpecifiedPressureBC.C:16
NSMomentumInviscidSpecifiedPressureBC::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned jvar)
Definition: NSMomentumInviscidSpecifiedPressureBC.C:57
registerMooseObject
registerMooseObject("NavierStokesApp", NSMomentumInviscidSpecifiedPressureBC)
NSIntegratedBC::_w_vel
const VariableValue & _w_vel
Definition: NSIntegratedBC.h:37
NSIntegratedBC::isNSVariable
bool isNSVariable(unsigned var)
Definition: NSIntegratedBC.C:80
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
NSMomentumInviscidSpecifiedPressureBC::computeQpResidual
virtual Real computeQpResidual()
Definition: NSMomentumInviscidSpecifiedPressureBC.C:32
NSMomentumInviscidBC::pressureQpResidualHelper
Real pressureQpResidualHelper(Real pressure)
Definition: NSMomentumInviscidBC.C:33
NSIntegratedBC::_v_vel
const VariableValue & _v_vel
Definition: NSIntegratedBC.h:36
NSMomentumInviscidSpecifiedPressureBC.h
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
NSMomentumInviscidSpecifiedPressureBC
Momentum equation boundary condition in which pressure is specified (given) and the value of the conv...
Definition: NSMomentumInviscidSpecifiedPressureBC.h:24
NSMomentumInviscidBC::_component
const unsigned _component
Definition: NSMomentumInviscidBC.h:67
NSMomentumInviscidSpecifiedPressureBC::NSMomentumInviscidSpecifiedPressureBC
NSMomentumInviscidSpecifiedPressureBC(const InputParameters &parameters)
Definition: NSMomentumInviscidSpecifiedPressureBC.C:25
NSMomentumInviscidBC::convectiveQpJacobianHelper
Real convectiveQpJacobianHelper(unsigned var_number)
Definition: NSMomentumInviscidBC.C:64
NSMomentumInviscidSpecifiedPressureBC::_specified_pressure
Real _specified_pressure
Definition: NSMomentumInviscidSpecifiedPressureBC.h:38