www.mooseframework.org
NSMomentumInviscidSpecifiedNormalFlowBC.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 
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 
37 Real
39 {
41 }
42 
43 Real
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 
52 Real
54 {
55  if (isNSVariable(jvar))
57  else
58  return 0.0;
59 }
bool isNSVariable(unsigned var)
This class corresponds to the inviscid part of the "natural" boundary condition for the momentum equa...
Real convectiveQpResidualHelper(Real rhou_udotn)
NSMomentumInviscidSpecifiedNormalFlowBC(const InputParameters &parameters)
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
Real pressureQpJacobianHelper(unsigned var_number)
registerMooseObject("NavierStokesApp", NSMomentumInviscidSpecifiedNormalFlowBC)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
unsigned mapVarNumber(unsigned var)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string pressure
Definition: NS.h:56
Real pressureQpResidualHelper(Real pressure)
void addClassDescription(const std::string &doc_string)
Momentum equation boundary condition in which pressure is specified (given) and the value of the conv...
static InputParameters validParams()