https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NSEnergyInviscidSpecifiedNormalFlowBC.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.addRequiredCoupledVar(NS::pressure, "pressure");
21 params.addRequiredParam<Real>("un", "The specified value of u.n for this boundary");
22 return params;
23}
24
26 const InputParameters & parameters)
27 : NSEnergyInviscidBC(parameters), _pressure(coupledValue(NS::pressure)), _un(getParam<Real>("un"))
28{
29}
30
31Real
36
37Real
39{
40 return computeJacobianHelper(/*on-diagonal variable is energy=*/4);
41}
42
43Real
45{
46 if (isNSVariable(jvar))
48 else
49 return 0.0;
50}
51
52Real
54{
55 // For specified u.n, term "A" is zero, see base class for details.
56 return qpJacobianTermB(var_number, _un) + qpJacobianTermC(var_number, _un);
57}
registerMooseObject("NavierStokesApp", NSEnergyInviscidSpecifiedNormalFlowBC)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredParam(const std::string &name, const std::string &doc_string)
unsigned int _qp
This class corresponds to the inviscid part of the "natural" boundary condition for the energy equati...
static InputParameters validParams()
Real qpResidualHelper(Real pressure, Real un)
Real qpJacobianTermC(unsigned var_number, Real un)
Real qpJacobianTermB(unsigned var_number, Real un)
The inviscid energy BC term with specified normal flow.
NSEnergyInviscidSpecifiedNormalFlowBC(const InputParameters &parameters)
bool isNSVariable(unsigned var)
unsigned mapVarNumber(unsigned var)
static const std::string pressure
Definition NS.h:57