https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NSPressureNeumannBC.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 inclues
11#include "NS.h"
12#include "NSPressureNeumannBC.h"
13
15
18{
20
21 params.addClassDescription("This kernel is appropriate for use with a 'zero normal flow' "
22 "boundary condition in the context of the Euler equations.");
23 params.addRequiredCoupledVar(NS::pressure, "The current value of the pressure");
24 params.addRequiredParam<unsigned>(
25 "component", "(0,1,2) = (x,y,z) for which momentum component this BC is applied to");
26
27 return params;
28}
29
31 : NSIntegratedBC(parameters),
32 _pressure(coupledValue(NS::pressure)),
33 _component(getParam<unsigned>("component")),
34 _pressure_derivs(*this)
35{
36}
37
38Real
43
44Real
46{
48 1); // <-- the on-diagonal variable number is _component+1
49}
50
51Real
53{
54 if (isNSVariable(jvar))
56 else
57 return 0.0;
58}
59
60Real
registerMooseObject("NavierStokesApp", NSPressureNeumannBC)
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
unsigned int _i
unsigned int _j
const VariablePhiValue & _phi
const MooseArray< Point > & _normals
const VariableTestValue & _test
This class couples together all the variables for the compressible Navier-Stokes equations to allow t...
static InputParameters validParams()
bool isNSVariable(unsigned var)
unsigned mapVarNumber(unsigned var)
Real get_grad(unsigned i)
The primary interfaces for computing pressure derivatives.
This kernel is appropriate for use with a "zero normal flow" boundary condition in the context of the...
NSPressureNeumannBC(const InputParameters &parameters)
Real computeJacobianHelper(unsigned m)
static InputParameters validParams()
virtual Real computeQpOffDiagJacobian(unsigned jvar)
virtual Real computeQpJacobian()
virtual Real computeQpResidual()
const VariableValue & _pressure
NSPressureDerivs< NSPressureNeumannBC > _pressure_derivs
static const std::string pressure
Definition NS.h:57