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 
16 template <>
17 InputParameters
19 {
20  InputParameters params = validParams<NSMomentumInviscidBC>();
21  params.addClassDescription("Momentum equation boundary condition in which pressure is specified "
22  "(given) and the value of the convective part is allowed to vary (is "
23  "computed implicitly).");
24  params.addRequiredCoupledVar(NS::pressure, "pressure");
25  params.addRequiredParam<Real>(
26  "rhou_udotn", "The _component'th entry of the (rho*u)(u.n) vector for this boundary");
27  return params;
28 }
29 
31  const InputParameters & parameters)
32  : NSMomentumInviscidBC(parameters),
33  _pressure(coupledValue(NS::pressure)),
34  _rhou_udotn(getParam<Real>("rhou_udotn"))
35 {
36 }
37 
38 Real
40 {
42 }
43 
44 Real
46 {
47  // There is no Jacobian for the convective term when (rho*u)(u.n) is specified,
48  // so all we have left is the pressure jacobian. The on-diagonal variable number
49  // is _component+1
51 }
52 
53 Real
55 {
56  if (isNSVariable(jvar))
58  else
59  return 0.0;
60 }
NSIntegratedBC::mapVarNumber
unsigned mapVarNumber(unsigned var)
Definition: NSIntegratedBC.C:90
NSMomentumInviscidSpecifiedNormalFlowBC::computeQpResidual
virtual Real computeQpResidual()
Definition: NSMomentumInviscidSpecifiedNormalFlowBC.C:39
NSMomentumInviscidSpecifiedNormalFlowBC
Momentum equation boundary condition in which pressure is specified (given) and the value of the conv...
Definition: NSMomentumInviscidSpecifiedNormalFlowBC.h:24
NSMomentumInviscidSpecifiedNormalFlowBC::_rhou_udotn
const Real _rhou_udotn
Definition: NSMomentumInviscidSpecifiedNormalFlowBC.h:35
NSIntegratedBC::isNSVariable
bool isNSVariable(unsigned var)
Definition: NSIntegratedBC.C:80
NSMomentumInviscidSpecifiedNormalFlowBC.h
NS
Definition: NS.h:14
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
NSMomentumInviscidSpecifiedNormalFlowBC::computeQpJacobian
virtual Real computeQpJacobian()
Definition: NSMomentumInviscidSpecifiedNormalFlowBC.C:45
validParams< NSMomentumInviscidSpecifiedNormalFlowBC >
InputParameters validParams< NSMomentumInviscidSpecifiedNormalFlowBC >()
Definition: NSMomentumInviscidSpecifiedNormalFlowBC.C:18
NSMomentumInviscidBC::pressureQpResidualHelper
Real pressureQpResidualHelper(Real pressure)
Definition: NSMomentumInviscidBC.C:33
NSMomentumInviscidBC::convectiveQpResidualHelper
Real convectiveQpResidualHelper(Real rhou_udotn)
Definition: NSMomentumInviscidBC.C:52
NS.h
NSMomentumInviscidSpecifiedNormalFlowBC::computeQpOffDiagJacobian
virtual Real computeQpOffDiagJacobian(unsigned jvar)
Definition: NSMomentumInviscidSpecifiedNormalFlowBC.C:54
NSMomentumInviscidBC::pressureQpJacobianHelper
Real pressureQpJacobianHelper(unsigned var_number)
Definition: NSMomentumInviscidBC.C:45
NSMomentumInviscidBC::_component
const unsigned _component
Definition: NSMomentumInviscidBC.h:67
NSMomentumInviscidSpecifiedNormalFlowBC::NSMomentumInviscidSpecifiedNormalFlowBC
NSMomentumInviscidSpecifiedNormalFlowBC(const InputParameters &parameters)
Definition: NSMomentumInviscidSpecifiedNormalFlowBC.C:30
NSMomentumInviscidSpecifiedNormalFlowBC::_pressure
const VariableValue & _pressure
Definition: NSMomentumInviscidSpecifiedNormalFlowBC.h:34
registerMooseObject
registerMooseObject("NavierStokesApp", NSMomentumInviscidSpecifiedNormalFlowBC)
NS::pressure
const std::string pressure
Definition: NS.h:25