https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NSMomentumInviscidSpecifiedNormalFlowBC.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
10// Navier-Stokes includes
11#include "NS.h"
13
15
18{
20 params.addClassDescription("Momentum equation boundary condition in which pressure is specified "
21 "(given) and the value of the convective part is allowed to vary (is "
22 "computed implicitly).");
23 params.addRequiredCoupledVar(NS::pressure, "pressure");
24 params.addRequiredParam<Real>(
25 "rhou_udotn", "The _component'th entry of the (rho*u)(u.n) vector for this boundary");
26 return params;
27}
28
30 const InputParameters & parameters)
31 : NSMomentumInviscidBC(parameters),
32 _pressure(coupledValue(NS::pressure)),
33 _rhou_udotn(getParam<Real>("rhou_udotn"))
34{
35}
36
37Real
42
43Real
45{
46 // There is no Jacobian for the convective term when (rho*u)(u.n) is specified,
47 // so all we have left is the pressure jacobian. The on-diagonal variable number
48 // is _component+1
50}
51
52Real
54{
55 if (isNSVariable(jvar))
57 else
58 return 0.0;
59}
registerMooseObject("NavierStokesApp", NSMomentumInviscidSpecifiedNormalFlowBC)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
unsigned int _qp
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 pressureQpJacobianHelper(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...
NSMomentumInviscidSpecifiedNormalFlowBC(const InputParameters &parameters)
static const std::string pressure
Definition NS.h:57