https://mooseframework.inl.gov
Loading...
Searching...
No Matches
NSEnergyInviscidSpecifiedBC.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
11
13
16{
18 params.addRequiredParam<Real>("un", "The specified value of u.n for this boundary");
19 return params;
20}
21
23 : NSEnergyInviscidBC(parameters),
24 _specified_pressure(getParam<Real>("specified_pressure")),
25 _un(getParam<Real>("un"))
26{
27}
28
29Real
34
35Real
37{
38 return this->computeJacobianHelper(/*on-diagonal variable is energy=*/4);
39}
40
41Real
43{
44 if (isNSVariable(jvar))
46 else
47 return 0.0;
48}
49
50Real
52{
53 // When both pressure and u.n are specified, only term B of the Jacobian is non-zero.
54 return qpJacobianTermB(var_number, _un);
55}
registerMooseObject("NavierStokesApp", NSEnergyInviscidSpecifiedBC)
void addRequiredParam(const std::string &name, const std::string &doc_string)
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 qpJacobianTermB(unsigned var_number, Real un)
The inviscid energy BC term with specified pressure.
NSEnergyInviscidSpecifiedBC(const InputParameters &parameters)
virtual Real computeQpOffDiagJacobian(unsigned jvar)
Real computeJacobianHelper(unsigned var_number)
bool isNSVariable(unsigned var)
unsigned mapVarNumber(unsigned var)