https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NSMomentumInviscidSpecifiedPressureBC.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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("Momentum equation boundary condition in which pressure is specified "
19 "(given) and the value of the convective part is allowed to vary (is "
20 "computed implicitly).");
21 return params;
22}
23
25 const InputParameters & parameters)
26 : NSMomentumInviscidBC(parameters), _specified_pressure(getParam<Real>("specified_pressure"))
27{
28}
29
30Real
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
44}
45
46Real
48{
49 // There is no Jacobian for the pressure term when the pressure is specified,
50 // so all we have left is the convective part. The on-diagonal variable number
51 // is _component+1
53}
54
55Real
57{
58 if (isNSVariable(jvar))
60 else
61 return 0.0;
62}
registerMooseObject("NavierStokesApp", NSMomentumInviscidSpecifiedPressureBC)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
const MooseArray< Point > & _normals
const VariableValue & _w_vel
const VariableValue & _v_vel
const VariableValue & _rho
const VariableValue & _u_vel
bool isNSVariable(unsigned var)
unsigned mapVarNumber(unsigned var)
This class corresponds to the inviscid part of the "natural" boundary condition for the momentum equa...
Real convectiveQpJacobianHelper(unsigned var_number)
static InputParameters validParams()
Real convectiveQpResidualHelper(Real rhou_udotn)
Real pressureQpResidualHelper(Real pressure)
Momentum equation boundary condition in which pressure is specified (given) and the value of the conv...
NSMomentumInviscidSpecifiedPressureBC(const InputParameters &parameters)